結果
| 問題 | No.4 おもりと天秤 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-06-19 03:15:56 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 320 bytes | 
| コンパイル時間 | 296 ms | 
| コンパイル使用メモリ | 82,824 KB | 
| 実行使用メモリ | 61,076 KB | 
| 最終ジャッジ日時 | 2024-06-26 13:52:31 | 
| 合計ジャッジ時間 | 2,828 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 11 WA * 12 | 
ソースコード
N = int(input())
W = list(map(int, input().split()))
dp = [False for _ in range(100*100+1)]
dp[0] = True
for i in range(N):
    for j in range(10001):
        if dp[j] and dp[j]+W[i]<=10000:
            dp[dp[j]+W[i]] = True
# print(dp[sum(W)//2])
if dp[sum(W)//2+1]:
    print("possible")
else:
    print("impossible")
            
            
            
        