結果
| 問題 | No.2918 Divide Applicants Fairly | 
| ユーザー |  | 
| 提出日時 | 2024-10-12 03:48:58 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 265 bytes | 
| コンパイル時間 | 1,019 ms | 
| コンパイル使用メモリ | 82,176 KB | 
| 実行使用メモリ | 675,504 KB | 
| 最終ジャッジ日時 | 2024-10-12 03:49:03 | 
| 合計ジャッジ時間 | 4,221 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | MLE * 1 -- * 60 | 
ソースコード
N = int(input())
R = list(map(int, input().split()))
L = set()
for r in R:
    LL = L.copy()
    for l in L:
        LL.add(l + r)
        LL.add(l - r)
    LL.add(r)
    LL.add(-r)
    L = LL.copy()
ans = 10**10
for l in L:
    ans = min(ans, abs(l))
print(ans)
            
            
            
        