結果
| 問題 |
No.1594 Three Classes
|
| コンテスト | |
| ユーザー |
m1k__
|
| 提出日時 | 2021-07-10 02:30:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 2,000 ms |
| コード長 | 290 bytes |
| コンパイル時間 | 156 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 75,136 KB |
| 最終ジャッジ日時 | 2024-11-16 08:23:50 |
| 合計ジャッジ時間 | 2,231 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
N = int(input())
A = [int(x) for x in input().split()]
def dfs(i, a, b, c):
if i==N:
if a==b and b==c:
print('Yes')
exit()
else:
dfs(i+1, a+A[i], b, c)
dfs(i+1, a, b+A[i], c)
dfs(i+1, a, b, c+A[i])
dfs(0, 0, 0, 0)
print('No')
m1k__