結果

問題 No.1219 Mancala Combo
ユーザー stnkienstnkien
提出日時 2020-09-04 22:46:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 30,692 KB
最終ジャッジ日時 2024-05-05 03:21:08
合計ジャッジ時間 2,546 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
10,880 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 25 ms
10,752 KB
testcase_03 AC 26 ms
10,752 KB
testcase_04 WA -
testcase_05 AC 28 ms
10,752 KB
testcase_06 WA -
testcase_07 AC 24 ms
10,752 KB
testcase_08 WA -
testcase_09 AC 25 ms
10,752 KB
testcase_10 WA -
testcase_11 AC 25 ms
10,880 KB
testcase_12 WA -
testcase_13 AC 24 ms
10,752 KB
testcase_14 AC 25 ms
10,880 KB
testcase_15 AC 25 ms
10,752 KB
testcase_16 WA -
testcase_17 AC 95 ms
21,264 KB
testcase_18 WA -
testcase_19 AC 86 ms
20,136 KB
testcase_20 WA -
testcase_21 AC 83 ms
19,128 KB
testcase_22 WA -
testcase_23 AC 109 ms
23,324 KB
testcase_24 WA -
testcase_25 AC 86 ms
19,780 KB
testcase_26 WA -
testcase_27 AC 128 ms
25,396 KB
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import accumulate
N = int(input())
*A, = map(int, input().split())
last = 0
for i, a in enumerate(A):
    if a:
        last = i
A = A[:last+1]
C = list(range(last, -1, -1))

if all((a+c) % (i+1) == 0 for i, (a, c) in enumerate(zip(A, C))):
    print('Yes')
else:
    print('No')
0