結果
問題 |
No.4 おもりと天秤
|
ユーザー |
![]() |
提出日時 | 2016-04-10 08:49:24 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 404 bytes |
コンパイル時間 | 149 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-04 05:27:57 |
合計ジャッジ時間 | 4,394 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 WA * 3 |
ソースコード
#!/usr/bin/env python3 #fileencoding: utf-8 N = int(input().strip()) max_weight = 100*100 weight = [False] * (max_weight+1) weight[0] = True total = 0 for i in input().strip().split(" "): w = int(i) total += w for j in range(max_weight): if weight[j] and (j+w <= max_weight): weight[j+w] = True print("possible" if (total%2 == 0 and weight[total//2]) else "impossible")