結果

問題 No.4 おもりと天秤
コンテスト
ユーザー 달콤한마시로
提出日時 2026-02-11 23:30:35
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
結果
AC  
実行時間 152 ms / 5,000 ms
コード長 181 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 603 ms
コンパイル使用メモリ 20,824 KB
実行使用メモリ 15,488 KB
最終ジャッジ日時 2026-02-11 23:30:41
合計ジャッジ時間 5,102 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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