結果

問題 No.4 おもりと天秤
ユーザー _matumo_
提出日時 2019-11-15 14:56:54
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 91 ms / 5,000 ms
コード長 162 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,264 KB
最終ジャッジ日時 2024-09-24 22:59:01
合計ジャッジ時間 2,179 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
PV=[int(s) for s in input().split()]
M=sum(PV)/2
sa={0}
for x in PV:
    sa |={x+y for y in sa if x+y<=M}
print(["impossible","possible"][M in sa])
0