結果
問題 |
No.4 おもりと天秤
|
ユーザー |
![]() |
提出日時 | 2017-06-19 00:41:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 283 bytes |
コンパイル時間 | 304 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 11,392 KB |
最終ジャッジ日時 | 2024-10-01 21:06:51 |
合計ジャッジ時間 | 1,961 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 RE * 2 |
ソースコード
N=int(input()) weights=list(map(int,input().split())) S=sum(weights) sum_list=set([0]) if S&1: L.clear() else: for weight in weights: sum_list |= set([weight + l for l in sum_list]) if S/2 in sum_list: break print("possible" if S/2 in sum_list else "impossible")