結果

問題 No.4 おもりと天秤
コンテスト
ユーザー 달콤한마시로
提出日時 2026-02-11 23:30:35
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 98 ms / 5,000 ms
+ 341µs
コード長 181 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 983 ms
コンパイル使用メモリ 21,284 KB
実行使用メモリ 15,740 KB
最終ジャッジ日時 2026-07-21 07:00:04
合計ジャッジ時間 4,296 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

a = 1
input()
s = 0
for v in map(int, input().split()):
    s += v
    a |= a << v
success = s % 2 == 0 and (a & (1 << (s // 2))) != 0
print('possible' if success else 'impossible')
0