結果

問題 No.2836 Comment Out
ユーザー titia
提出日時 2024-08-09 22:27:15
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 279 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 33,000 KB
最終ジャッジ日時 2024-08-09 22:27:22
合計ジャッジ時間 6,821 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 30 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

from collections import deque

N=int(input())
A=list(map(int,input().split()))

Q=deque(A)

for i in range(1,N+1):
    if Q[0]<=i:
        Q.popleft()
    elif Q[-1]<=i:
        Q.pop()

if len(Q)==0:
    print("Yes")
else:
    print("No")
0