結果

問題 No.1594 Three Classes
ユーザー marroncastlemarroncastle
提出日時 2021-07-09 21:39:47
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 320 bytes
コンパイル時間 334 ms
使用メモリ 81,396 KB
最終ジャッジ日時 2022-12-17 01:43:32
合計ジャッジ時間 4,149 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 158 ms
80,956 KB
testcase_01 AC 89 ms
75,540 KB
testcase_02 AC 88 ms
75,564 KB
testcase_03 AC 98 ms
80,944 KB
testcase_04 AC 149 ms
81,252 KB
testcase_05 AC 149 ms
81,200 KB
testcase_06 AC 94 ms
80,736 KB
testcase_07 AC 96 ms
80,712 KB
testcase_08 AC 152 ms
81,044 KB
testcase_09 AC 150 ms
81,288 KB
testcase_10 AC 150 ms
81,196 KB
testcase_11 AC 150 ms
80,952 KB
testcase_12 AC 153 ms
81,112 KB
testcase_13 AC 89 ms
75,800 KB
testcase_14 AC 105 ms
81,396 KB
testcase_15 AC 102 ms
81,236 KB
testcase_16 AC 98 ms
80,732 KB
testcase_17 AC 97 ms
80,764 KB
testcase_18 AC 88 ms
75,540 KB
testcase_19 AC 95 ms
80,732 KB
testcase_20 AC 95 ms
80,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
E = list(map(int, input().split()))
from itertools import groupby, accumulate, product, permutations, combinations
ans = 'No'
for pro in product([0,1,2], repeat=N):
    lis = [0]*3
    for i,p in enumerate(pro): lis[p] += E[i]
    if lis[0]==lis[1]==lis[2]: 
        ans = 'Yes'
        break
print(ans)
0