結果

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

ソースコード

diff #

import sys
input = sys.stdin.readline

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

LIST=[0]*(N+5)

for i in range(N):
    x=N-A[i]

    if i-x<N:
        LIST[max(i-x,0)]+=1

    if i+x+1>=0:
        LIST[min(i+x+1,N+4)]-=1

for i in range(1,len(LIST)):
    LIST[i]+=LIST[i-1]

if max(LIST)==N:
    print("Yes")
else:
    print("No")
0