結果

問題 No.4 おもりと天秤
ユーザー convexineqconvexineq
提出日時 2020-11-22 23:49:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 201 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 86,960 KB
実行使用メモリ 71,492 KB
最終ジャッジ日時 2023-09-30 23:08:26
合計ジャッジ時間 3,199 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,216 KB
testcase_01 AC 73 ms
71,180 KB
testcase_02 AC 73 ms
71,336 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 73 ms
71,296 KB
testcase_07 WA -
testcase_08 AC 72 ms
71,232 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 73 ms
71,220 KB
testcase_12 AC 74 ms
71,448 KB
testcase_13 AC 73 ms
71,124 KB
testcase_14 AC 73 ms
71,356 KB
testcase_15 AC 72 ms
71,124 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 71 ms
71,184 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline = sys.stdin.readline
read = sys.stdin.read

n,*w = map(int,read().split())
dp = 1
for i in w:
    dp |= 1<<i
print("possible" if sum(w)%2==0 and dp>>(sum(w)//2)&1 else "impossible")
0