結果
| 問題 | No.4 おもりと天秤 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-06-19 03:00:46 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 355 bytes | 
| コンパイル時間 | 360 ms | 
| コンパイル使用メモリ | 82,120 KB | 
| 実行使用メモリ | 82,696 KB | 
| 最終ジャッジ日時 | 2024-06-26 13:37:17 | 
| 合計ジャッジ時間 | 7,537 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 5 TLE * 1 -- * 17 | 
ソースコード
N = int(input())
W = list(map(int, input().split()))
W_sum = sum(W)
from itertools import combinations
# from collections import defaultdict
# d = defaultdict(int)
for i in range(1, N+1):
    for j in combinations(W, i):
        j_sum = sum(j)
        if j_sum == W_sum-j_sum:
            print("possible")
            exit()
        
print("impossible")
            
            
            
        