結果
| 問題 |
No.1594 Three Classes
|
| コンテスト | |
| ユーザー |
nohakai3
|
| 提出日時 | 2022-11-05 11:59:35 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 688 ms / 2,000 ms |
| コード長 | 331 bytes |
| コンパイル時間 | 202 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 77,328 KB |
| 最終ジャッジ日時 | 2024-07-19 06:21:12 |
| 合計ジャッジ時間 | 8,615 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
n=int(input())
A=list(map(int,input().split()))
from itertools import product
for bits in product([0,1,2],repeat=n):
a=[x for bit,x in zip(bits,A) if bit==0]
b=[x for bit,x in zip(bits,A) if bit==1]
c=[x for bit,x in zip(bits,A) if bit==2]
if sum(a)==sum(b)==sum(c):
print("Yes")
exit()
print("No")
nohakai3