結果
| 問題 | No.4 おもりと天秤 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-19 03:00:46 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 231 ms |
| コンパイル使用メモリ | 95,848 KB |
| 実行使用メモリ | 84,096 KB |
| 最終ジャッジ日時 | 2026-07-30 13:46:49 |
| 合計ジャッジ時間 | 7,812 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 TLE * 1 -- * 17 |
ソースコード
N = int(input())
W = list(map(int, input().split()))
W_sum = sum(W)
from itertools import combinations
# from collections import defaultdict
# d = defaultdict(int)
for i in range(1, N+1):
for j in combinations(W, i):
j_sum = sum(j)
if j_sum == W_sum-j_sum:
print("possible")
exit()
print("impossible")