結果

問題 No.1594 Three Classes
ユーザー 👑 KazunKazun
提出日時 2021-07-09 21:25:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 82,708 KB
実行使用メモリ 76,092 KB
最終ジャッジ日時 2024-04-27 23:52:59
合計ジャッジ時間 3,000 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
75,248 KB
testcase_01 AC 38 ms
52,352 KB
testcase_02 AC 38 ms
51,712 KB
testcase_03 AC 115 ms
75,644 KB
testcase_04 AC 108 ms
75,228 KB
testcase_05 AC 114 ms
75,520 KB
testcase_06 AC 113 ms
75,632 KB
testcase_07 AC 110 ms
76,092 KB
testcase_08 AC 109 ms
75,660 KB
testcase_09 AC 109 ms
75,660 KB
testcase_10 AC 106 ms
75,448 KB
testcase_11 AC 108 ms
75,648 KB
testcase_12 AC 108 ms
75,304 KB
testcase_13 AC 44 ms
59,392 KB
testcase_14 AC 109 ms
75,848 KB
testcase_15 AC 108 ms
75,660 KB
testcase_16 AC 71 ms
76,076 KB
testcase_17 AC 108 ms
75,596 KB
testcase_18 AC 42 ms
58,368 KB
testcase_19 AC 43 ms
59,648 KB
testcase_20 AC 49 ms
65,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import product

N=int(input())
E=list(map(int,input().split()))

X=0
for c in product((0,1,2),repeat=N):
    P=[0,0,0]

    for i in range(N):
        P[c[i]]+=E[i]

    if P[0]==P[1]==P[2]:
        X=1

print("Yes" if X else "No")
0