結果

問題 No.1594 Three Classes
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-07-09 21:27:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 82,180 KB
実行使用メモリ 76,160 KB
最終ジャッジ日時 2024-04-27 23:54:28
合計ジャッジ時間 2,698 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
75,520 KB
testcase_01 AC 40 ms
51,840 KB
testcase_02 AC 41 ms
51,968 KB
testcase_03 AC 50 ms
65,152 KB
testcase_04 AC 111 ms
75,508 KB
testcase_05 AC 108 ms
76,136 KB
testcase_06 AC 44 ms
59,008 KB
testcase_07 AC 49 ms
62,336 KB
testcase_08 AC 118 ms
75,392 KB
testcase_09 AC 110 ms
75,520 KB
testcase_10 AC 116 ms
76,160 KB
testcase_11 AC 109 ms
75,520 KB
testcase_12 AC 111 ms
75,376 KB
testcase_13 AC 40 ms
52,352 KB
testcase_14 AC 59 ms
75,752 KB
testcase_15 AC 61 ms
75,776 KB
testcase_16 AC 50 ms
66,560 KB
testcase_17 AC 47 ms
64,128 KB
testcase_18 AC 40 ms
51,712 KB
testcase_19 AC 45 ms
59,776 KB
testcase_20 AC 44 ms
59,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
n = int(input())
E = list(map(int,input().split()))


for i in itertools.product([0,1,2],repeat=n):
    l = [0]*3
    for j in range(n):
        l[i[j]] += E[j]
    if l[0] == l[1] == l[2]:
        print("Yes")
        exit()
print("No")
0