結果
問題 | No.851 テストケース |
ユーザー | guricerin |
提出日時 | 2020-01-13 17:39:42 |
言語 | F# (F# 4.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,155 bytes |
コンパイル時間 | 4,622 ms |
コンパイル使用メモリ | 165,632 KB |
実行使用メモリ | 26,536 KB |
最終ジャッジ日時 | 2023-08-23 07:23:13 |
合計ジャッジ時間 | 7,966 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 70 ms
24,324 KB |
testcase_01 | AC | 70 ms
24,360 KB |
testcase_02 | AC | 66 ms
22,524 KB |
testcase_03 | AC | 69 ms
26,536 KB |
testcase_04 | AC | 71 ms
26,456 KB |
testcase_05 | AC | 71 ms
22,340 KB |
testcase_06 | AC | 69 ms
24,432 KB |
testcase_07 | AC | 71 ms
24,452 KB |
testcase_08 | AC | 71 ms
24,436 KB |
testcase_09 | AC | 71 ms
24,416 KB |
testcase_10 | AC | 69 ms
24,420 KB |
testcase_11 | AC | 70 ms
26,424 KB |
testcase_12 | AC | 70 ms
24,364 KB |
testcase_13 | AC | 68 ms
24,456 KB |
testcase_14 | AC | 69 ms
26,372 KB |
testcase_15 | AC | 69 ms
24,476 KB |
testcase_16 | AC | 69 ms
24,308 KB |
testcase_17 | AC | 70 ms
26,476 KB |
testcase_18 | AC | 71 ms
22,276 KB |
testcase_19 | AC | 68 ms
22,540 KB |
testcase_20 | AC | 68 ms
22,448 KB |
testcase_21 | RE | - |
testcase_22 | RE | - |
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0 Copyright (c) Microsoft Corporation. All Rights Reserved.
ソースコード
open System open System.Collections.Generic [<AutoOpen>] module Cin = let read f = stdin.ReadLine() |> f let reada f = stdin.ReadLine().Split() |> Array.map f let readChars() = read string |> Seq.toArray let readInts() = readChars() |> Array.map (fun x -> Convert.ToInt32(x.ToString())) [<AutoOpen>] module Cout = let writer = new IO.StreamWriter(new IO.BufferedStream(Console.OpenStandardOutput())) let print (s: string) = writer.Write s let println (s: string) = writer.WriteLine s let inline puts (s: ^a) = string s |> println let main() = read int |> ignore let a = Array.zeroCreate 3 for i in 0 .. 2 do let s = read string if s.Contains(" ") then printfn "\"assert\"" exit 0 a.[i] <- Convert.ToInt32(s) let lim = a |> Array.length let b = ResizeArray<int>() for i in 0 .. lim - 1 do for j in i + 1 .. lim - 1 do let c = a.[i] + a.[j] b.Add(c) let b = b.ToArray() let b = b |> Array.sort |> Array.rev |> Array.distinct b.[1] |> puts () main() writer.Close()