結果

問題 No.1594 Three Classes
ユーザー c-yan
提出日時 2021-07-09 21:44:04
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 290 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-07-01 15:43:34
合計ジャッジ時間 24,820 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 9 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import product

N, *E = map(int, open(0).read().split())

for p in product([0,1,2], repeat=N):
    t = [0] * 3
    for i in range(N):
        t[p[i]] += E[i]
    if t[0] != t[1] or [1] != t[2] or [0] != t[2]:
        continue
    print('Yes')
    break
else:
    print('No')
0