結果

問題 No.4 おもりと天秤
ユーザー popketle
提出日時 2019-12-24 11:28:52
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 224 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2024-09-21 18:42:19
合計ジャッジ時間 6,995 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 TLE * 1 -- * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
W=list(map(int,input().split()))

for i in range(2**n):
  wr,wl=0,0
  for j in range(n):
    if i>>j&1:
      wr+=W[j]
    else:
      wl+=W[j]
  if wr==wl:
    print('possible')
    exit()
print('impossible')
0