結果

問題 No.4 おもりと天秤
コンテスト
ユーザー Makorominiris
提出日時 2016-05-26 09:09:52
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 252 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 342 ms
コンパイル使用メモリ 20,824 KB
実行使用メモリ 15,488 KB
最終ジャッジ日時 2026-04-24 05:11:38
合計ジャッジ時間 3,847 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N=int(input())
A=list(map(int,input().split()))
def chk(li):
  s=sum(li)
  if s%2==1: return "impossible"
  li.sort()
  c=0
  for v in li:
    c+=v
    if c==s//2: return "possible"
    if c>s//2: return "impossible"
  return "impossible"
print(chk(A))
0