結果
| 問題 | No.4 おもりと天秤 |
| コンテスト | |
| ユーザー |
Snark86
|
| 提出日時 | 2016-04-25 02:02:50 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 92 ms / 5,000 ms |
| コード長 | 231 bytes |
| 記録 | |
| コンパイル時間 | 116 ms |
| コンパイル使用メモリ | 77,648 KB |
| 最終ジャッジ日時 | 2025-12-03 20:31:08 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
n = int(raw_input()) W = map(int, raw_input().split()) a = [0 for _ in range(sum(W)+1)] a[0] = 1 for i in W: for j in range(sum(W))[::-1]: if a[j]: a[i+j] = 1 print "possible" if sum(W)%2==0 and a[sum(W)/2] else "impossible"
Snark86