結果
| 問題 |
No.4 おもりと天秤
|
| コンテスト | |
| ユーザー |
hiro_hiro_hirop
|
| 提出日時 | 2018-06-04 22:48:07 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 299 bytes |
| コンパイル時間 | 79 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 11,912 KB |
| 最終ジャッジ日時 | 2024-06-30 09:48:59 |
| 合計ジャッジ時間 | 1,671 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 10 |
ソースコード
n = int(input())
w = list(map(int, input().split()))
summation = sum(w)
l = {0}
z = False
if sum(w)%2==0:
for i in w:
l_plus = {i + x for x in l}
if summation / 2 in l_plus:
z = True
break
l = l|l_plus
print('possible' if True else 'impossible')
hiro_hiro_hirop