結果
| 問題 | No.1594 Three Classes |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-10 19:15:55 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 2,000 ms |
| コード長 | 250 bytes |
| 記録 | |
| コンパイル時間 | 198 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 80,828 KB |
| 最終ジャッジ日時 | 2026-04-04 01:40:23 |
| 合計ジャッジ時間 | 2,663 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")