結果

問題 No.1594 Three Classes
ユーザー KeroruKeroru
提出日時 2021-07-10 15:04:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 603 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 82,340 KB
実行使用メモリ 191,988 KB
最終ジャッジ日時 2024-04-28 00:38:31
合計ジャッジ時間 10,733 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 579 ms
191,668 KB
testcase_01 AC 38 ms
52,736 KB
testcase_02 AC 38 ms
52,620 KB
testcase_03 AC 603 ms
191,896 KB
testcase_04 AC 574 ms
191,508 KB
testcase_05 AC 586 ms
191,416 KB
testcase_06 AC 584 ms
191,416 KB
testcase_07 AC 581 ms
191,552 KB
testcase_08 AC 576 ms
191,624 KB
testcase_09 AC 585 ms
191,560 KB
testcase_10 AC 569 ms
191,488 KB
testcase_11 AC 581 ms
191,200 KB
testcase_12 AC 572 ms
191,624 KB
testcase_13 AC 48 ms
62,724 KB
testcase_14 AC 578 ms
191,888 KB
testcase_15 AC 578 ms
191,988 KB
testcase_16 AC 225 ms
108,660 KB
testcase_17 AC 585 ms
191,504 KB
testcase_18 AC 45 ms
60,972 KB
testcase_19 AC 52 ms
65,512 KB
testcase_20 AC 75 ms
78,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def bit_combination(n,base=2):
    rt=[]
    for tb in range(base**n):s=[tb//(base**bt)%base for bt in range(n)];rt+=[s]
    return rt

n=int(input())
e=[int(i)for i in input().split()]
f=1
for x in bit_combination(n,3):
    a=[0]*3
    for i in range(n):a[x[i]]+=e[i]
    if len(set(a))==1:f=0
print('YNeos'[f::2])
0