結果
問題 | No.4 おもりと天秤 |
ユーザー | popketle |
提出日時 | 2019-12-24 11:36:39 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 250 bytes |
コンパイル時間 | 103 ms |
コンパイル使用メモリ | 11,824 KB |
実行使用メモリ | 14,480 KB |
最終ジャッジ日時 | 2023-10-21 17:37:53 |
合計ジャッジ時間 | 7,066 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 29 ms
10,100 KB |
testcase_01 | WA | - |
testcase_02 | AC | 78 ms
10,100 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | TLE | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
ソースコード
n=int(input()) W=list(map(int,input().split())) half=sum(W)/n for i in range(2**n): total=0 for j in range(n): if i>>j&1: total+=W[j] if total>half: break if total==half: print('possible') exit() print('impossible')