結果
| 問題 | No.1219 Mancala Combo |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-27 17:21:15 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 74 ms / 2,000 ms |
| コード長 | 312 bytes |
| 記録 | |
| コンパイル時間 | 355 ms |
| コンパイル使用メモリ | 85,200 KB |
| 実行使用メモリ | 134,316 KB |
| 最終ジャッジ日時 | 2026-03-20 12:25:53 |
| 合計ジャッジ時間 | 2,956 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
n=int(input())
*a,=map(int,input().split())
a=[0]+a
for i in range(n+1):
if i<a[i]:
print('No')
exit()
from itertools import accumulate
acc=list(accumulate(a))
modacc=[]
for i in range(1,n+1):
modacc.append((acc[-1]-acc[i-1])%i)
if sum(modacc)==0:
print('Yes')
else:
print('No')