結果
| 問題 |
No.1594 Three Classes
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-09 21:51:57 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 114 ms / 2,000 ms |
| コード長 | 279 bytes |
| コンパイル時間 | 167 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 75,520 KB |
| 最終ジャッジ日時 | 2024-11-16 07:40:55 |
| 合計ジャッジ時間 | 2,496 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
import itertools
n = int(input())
elst = list(map(int, input().split()))
for lst in itertools.product(range(3), repeat = n):
tot = [0] * 3
for e, l in zip(elst, lst):
tot[l] += e
if tot[0] == tot[1] == tot[2]:
print("Yes")
exit()
print("No")