結果

問題 No.1594 Three Classes
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-07-09 21:27:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 489 ms
コンパイル使用メモリ 87,008 KB
実行使用メモリ 77,428 KB
最終ジャッジ日時 2023-08-10 06:36:39
合計ジャッジ時間 3,498 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
76,948 KB
testcase_01 AC 73 ms
71,184 KB
testcase_02 AC 72 ms
71,304 KB
testcase_03 AC 80 ms
76,532 KB
testcase_04 AC 133 ms
76,928 KB
testcase_05 AC 133 ms
77,200 KB
testcase_06 AC 74 ms
76,636 KB
testcase_07 AC 77 ms
76,660 KB
testcase_08 AC 138 ms
77,428 KB
testcase_09 AC 135 ms
76,924 KB
testcase_10 AC 135 ms
77,016 KB
testcase_11 AC 135 ms
77,052 KB
testcase_12 AC 134 ms
76,948 KB
testcase_13 AC 71 ms
71,324 KB
testcase_14 AC 85 ms
76,696 KB
testcase_15 AC 84 ms
77,088 KB
testcase_16 AC 77 ms
76,640 KB
testcase_17 AC 77 ms
76,576 KB
testcase_18 AC 71 ms
71,344 KB
testcase_19 AC 77 ms
76,644 KB
testcase_20 AC 76 ms
76,612 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