結果
問題 |
No.2836 Comment Out
|
ユーザー |
![]() |
提出日時 | 2024-08-09 22:25:09 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 371 bytes |
コンパイル時間 | 375 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 33,020 KB |
最終ジャッジ日時 | 2024-08-09 22:25:23 |
合計ジャッジ時間 | 10,204 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 WA * 19 |
ソースコード
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] S=N*(N+1)//2 if max(LIST[:N])==N and sum(A)<=S: print("Yes") else: print("No")