結果

問題 No.1594 Three Classes
ユーザー 👑 KazunKazun
提出日時 2021-07-09 21:25:59
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 305 ms
使用メモリ 81,332 KB
最終ジャッジ日時 2022-12-17 01:24:52
合計ジャッジ時間 4,739 ms
ジャッジサーバーID
(参考情報)
judge10 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 153 ms
81,024 KB
testcase_01 AC 88 ms
75,800 KB
testcase_02 AC 87 ms
75,884 KB
testcase_03 AC 155 ms
81,052 KB
testcase_04 AC 150 ms
81,000 KB
testcase_05 AC 151 ms
80,852 KB
testcase_06 AC 159 ms
81,332 KB
testcase_07 AC 150 ms
80,940 KB
testcase_08 AC 149 ms
81,108 KB
testcase_09 AC 148 ms
80,852 KB
testcase_10 AC 150 ms
81,308 KB
testcase_11 AC 153 ms
81,048 KB
testcase_12 AC 150 ms
81,232 KB
testcase_13 AC 91 ms
80,844 KB
testcase_14 AC 148 ms
81,096 KB
testcase_15 AC 150 ms
81,144 KB
testcase_16 AC 112 ms
81,096 KB
testcase_17 AC 148 ms
81,148 KB
testcase_18 AC 90 ms
80,712 KB
testcase_19 AC 90 ms
80,868 KB
testcase_20 AC 95 ms
80,756 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