結果

問題 No.1219 Mancala Combo
ユーザー anagohirameanagohirame
提出日時 2020-06-26 14:18:10
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 268 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 82,376 KB
実行使用メモリ 102,996 KB
最終ジャッジ日時 2024-05-03 11:44:58
合計ジャッジ時間 4,787 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
60,288 KB
testcase_01 AC 35 ms
52,028 KB
testcase_02 AC 36 ms
51,904 KB
testcase_03 AC 35 ms
52,696 KB
testcase_04 AC 46 ms
63,508 KB
testcase_05 AC 45 ms
63,708 KB
testcase_06 AC 50 ms
63,572 KB
testcase_07 AC 46 ms
62,840 KB
testcase_08 AC 46 ms
62,496 KB
testcase_09 AC 36 ms
53,072 KB
testcase_10 AC 36 ms
52,128 KB
testcase_11 AC 47 ms
62,716 KB
testcase_12 AC 43 ms
62,020 KB
testcase_13 AC 46 ms
62,372 KB
testcase_14 AC 36 ms
51,964 KB
testcase_15 AC 36 ms
52,624 KB
testcase_16 AC 35 ms
52,364 KB
testcase_17 TLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import exit
n = int(input())
a = list(map(int, input().split()))

s = sum(a)
for _ in range(s):
	for i, x in enumerate(a):
		if x == i+1:
			cur = i
			a[cur] = 0
			break
	else:
		print("No")
		exit()
	for i in range(cur-1, -1, -1):
		a[i] += 1

print("Yes")
0