結果

問題 No.851 テストケース
ユーザー Ueki
提出日時 2019-07-27 16:20:27
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 348 bytes
コンパイル時間 212 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-02 11:01:17
合計ジャッジ時間 1,433 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 15 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import heapq
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N = int(input())
try:
    A = [int(input()) for _ in range(N)]
    cand = []
    for i in range(N):
        for j in range(i+1, N):
            heapq.heappush(cand, -A[i]-A[j])
    _ = heapq.heappop(cand)
    print(-heapq.heappop(cand))


except:
    print("assert")
0