結果
問題 |
No.4 おもりと天秤
|
ユーザー |
![]() |
提出日時 | 2017-06-19 00:40:27 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 276 bytes |
コンパイル時間 | 214 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,392 KB |
最終ジャッジ日時 | 2024-10-01 21:06:17 |
合計ジャッジ時間 | 1,901 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 23 |
ソースコード
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 L else "impossible")