結果
| 問題 | No.4 おもりと天秤 |
| コンテスト | |
| ユーザー |
Kiri8128
|
| 提出日時 | 2020-09-06 00:03:05 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 27 ms / 5,000 ms |
| + 753µs | |
| コード長 | 207 bytes |
| 記録 | |
| コンパイル時間 | 73 ms |
| コンパイル使用メモリ | 82,672 KB |
| 実行使用メモリ | 55,900 KB |
| 最終ジャッジ日時 | 2026-10-01 21:04:47 |
| 合計ジャッジ時間 | 2,088 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
N = int(input())
W = [int(a) for a in input().split()]
su = sum(W)
if su & 1:
print("impossible")
exit()
s = 1 << (su // 2)
for w in W:
s |= s >> w
print("possible" if s & 1 else "impossible")
Kiri8128