結果
| 問題 |
No.1594 Three Classes
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-10 19:15:55 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 160 ms / 2,000 ms |
| コード長 | 250 bytes |
| コンパイル時間 | 471 ms |
| コンパイル使用メモリ | 82,540 KB |
| 実行使用メモリ | 76,444 KB |
| 最終ジャッジ日時 | 2024-09-10 19:15:59 |
| 合計ジャッジ時間 | 3,952 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
from itertools import product
N = int(input())
E = list(map(int, input().split()))
ans = 0
for p in product([0, 1, 2], repeat = N):
c = [0] * 3
for i in range(N):
c[p[i]] += E[i]
if len(set(c)) == 1:
ans += 1
print("Yes" if ans > 0 else "No")