結果

問題 No.3705 ビバ子とマカロン (Bibako and Macaron)
コンテスト
ユーザー acphot2
提出日時 2026-09-11 17:48:20
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
TLE  
実行時間 -
コード長 626 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 75 ms
コンパイル使用メモリ 80,640 KB
実行使用メモリ 146,772 KB
最終ジャッジ日時 2026-09-11 17:48:45
合計ジャッジ時間 18,040 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
サブタスク 配点 結果
小課題1 10 % AC * 5
小課題2 30 % AC * 8
小課題3 60 % TLE * 1 -- * 14
合計 40 点
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys

N= int(input())
A = list(map(int, input().split()))
R = [0 for _ in range(N+1)]
for i in range(N):
    R[A[i]] += 1 

Q = int(input())
for i in range(Q):
    flag = True
    x = list(map(int, input().split()))
  
    for j in range(min(x[0], x[2]), max(x[1], x[3])+1):
        if max(x[0], x[2])<= j <= min(x[1], x[3]):
            if R[j] <2:
                flag = False
        elif (x[0] <= j  <= x[1] ) or (x[2] <= j  <= x[3] ):
            if R[j] <1:
                flag = False
            
        if not flag:
            break

    if flag:
        print('Yes')
    else:
        print("No")
        

0