結果

問題 No.4 おもりと天秤
ユーザー _matumo__matumo_
提出日時 2019-11-15 14:56:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 70 ms / 5,000 ms
コード長 162 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 11,660 KB
実行使用メモリ 10,620 KB
最終ジャッジ日時 2023-10-25 03:30:05
合計ジャッジ時間 2,362 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,996 KB
testcase_01 AC 28 ms
9,996 KB
testcase_02 AC 29 ms
10,020 KB
testcase_03 AC 29 ms
9,996 KB
testcase_04 AC 29 ms
10,084 KB
testcase_05 AC 65 ms
10,620 KB
testcase_06 AC 29 ms
9,996 KB
testcase_07 AC 68 ms
10,620 KB
testcase_08 AC 29 ms
9,996 KB
testcase_09 AC 29 ms
10,000 KB
testcase_10 AC 70 ms
10,620 KB
testcase_11 AC 29 ms
9,996 KB
testcase_12 AC 30 ms
9,996 KB
testcase_13 AC 30 ms
9,996 KB
testcase_14 AC 29 ms
9,996 KB
testcase_15 AC 28 ms
9,996 KB
testcase_16 AC 29 ms
9,996 KB
testcase_17 AC 29 ms
9,996 KB
testcase_18 AC 49 ms
10,388 KB
testcase_19 AC 62 ms
10,388 KB
testcase_20 AC 62 ms
10,388 KB
testcase_21 AC 60 ms
10,388 KB
testcase_22 AC 62 ms
10,388 KB
権限があれば一括ダウンロードができます

ソースコード

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