結果
| 問題 |
No.4 おもりと天秤
|
| コンテスト | |
| ユーザー |
👑 SPD_9X2
|
| 提出日時 | 2020-01-09 23:24:58 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 120 ms / 5,000 ms |
| コード長 | 304 bytes |
| コンパイル時間 | 310 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,392 KB |
| 最終ジャッジ日時 | 2024-11-23 05:03:26 |
| 合計ジャッジ時間 | 2,465 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
N = int(input())
W = list(map(int,input().split()))
dic = {}
dic[0] = 1
for i in range(N):
loop = len(dic)
q = []
for j in dic:
q.append(j+W[i])
for j in q:
dic[j] = 1
if sum(W) % 2 == 0 and sum(W) // 2 in dic:
print ("possible")
else:
print ("impossible")
SPD_9X2