結果

問題 No.4 おもりと天秤
ユーザー TawaraTawara
提出日時 2015-12-26 08:37:49
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 153 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 7,124 KB
実行使用メモリ 46,148 KB
最終ジャッジ日時 2023-10-19 04:00:14
合計ジャッジ時間 16,757 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,464 KB
testcase_01 AC 12 ms
6,504 KB
testcase_02 AC 106 ms
9,168 KB
testcase_03 AC 44 ms
7,956 KB
testcase_04 AC 128 ms
9,864 KB
testcase_05 AC 4,762 ms
25,304 KB
testcase_06 AC 15 ms
7,008 KB
testcase_07 AC 4,790 ms
25,516 KB
testcase_08 AC 75 ms
6,780 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

input();W=map(int,raw_input().split());S=sum(W)
H=S/2;D=[0]*(H+101);D[0]=1
for w in W:i=H;exec("i-=1;D[i+w]|=D[i];"*H)
print"impossible"[2*D[H]*(S%2^1):]
0