結果
問題 | No.851 テストケース |
ユーザー |
|
提出日時 | 2019-09-03 05:04:03 |
言語 | Nim (2.2.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 2,740 ms |
コンパイル使用メモリ | 62,400 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-02 16:06:18 |
合計ジャッジ時間 | 3,291 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 18 WA * 2 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(13, 11) Warning: Deprecated since v0.20, use 'initHashSet'; initSet is deprecated [Deprecated]
ソースコード
import sequtils,sets,algorithm proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" ,discardable.} proc scan(): int = while true: let k = getchar_unlocked() if k < '0': if k == ' ' : quit "\"assert\"",0 return result = 10 * result + k.ord - '0'.ord let n = scan() let A = newSeqWith(n,scan()) var ans = initSet[int]() for i in 0..<n: for j in (i+1)..<n: ans.incl A[i] + A[j] echo toSeq(ans.items).sorted(cmp)[^2]