結果
問題 | No.4 おもりと天秤 |
ユーザー | mahiro |
提出日時 | 2020-01-11 21:52:54 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 317 bytes |
コンパイル時間 | 327 ms |
コンパイル使用メモリ | 86,996 KB |
実行使用メモリ | 81,084 KB |
最終ジャッジ日時 | 2023-08-17 06:59:02 |
合計ジャッジ時間 | 7,406 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 71 ms
75,852 KB |
testcase_01 | AC | 73 ms
71,376 KB |
testcase_02 | AC | 86 ms
76,380 KB |
testcase_03 | AC | 81 ms
76,380 KB |
testcase_04 | AC | 78 ms
76,440 KB |
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 = [int(i) for i in input().split()] ans = "impossible" for bits in range(1 << N): left = 0 right = 0 for i in range(N): if (bits >> i) & 1: left += W[i] else: right += W[i] if left == right: ans = "possible" break print(ans)