結果

問題 No.1594 Three Classes
ユーザー reatoretchreatoretch
提出日時 2021-07-09 22:20:59
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 354 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 394 ms
使用メモリ 81,648 KB
最終ジャッジ日時 2022-12-17 02:03:23
合計ジャッジ時間 6,113 ms
ジャッジサーバーID
(参考情報)
judge14 / judge16
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 354 ms
81,524 KB
testcase_01 AC 86 ms
75,408 KB
testcase_02 AC 85 ms
75,800 KB
testcase_03 AC 101 ms
80,680 KB
testcase_04 AC 352 ms
81,268 KB
testcase_05 AC 349 ms
81,172 KB
testcase_06 AC 106 ms
81,112 KB
testcase_07 AC 112 ms
81,412 KB
testcase_08 AC 353 ms
81,648 KB
testcase_09 AC 352 ms
81,232 KB
testcase_10 AC 354 ms
81,412 KB
testcase_11 AC 352 ms
81,624 KB
testcase_12 AC 351 ms
81,408 KB
testcase_13 AC 89 ms
75,736 KB
testcase_14 AC 153 ms
81,612 KB
testcase_15 AC 127 ms
81,584 KB
testcase_16 AC 114 ms
81,496 KB
testcase_17 AC 111 ms
81,352 KB
testcase_18 AC 88 ms
75,452 KB
testcase_19 AC 98 ms
80,928 KB
testcase_20 AC 100 ms
80,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
E=list(map(int,input().split()))
for i in range(3**N):
  S=[0,0,0]
  for j in range(N):
    bit=(i//3**j)%3
    S[bit]+=E[j]
  if all(item==S[0]for item in S):
    print("Yes");exit()
print("No")
0