結果

問題 No.851 テストケース
ユーザー guriceringuricerin
提出日時 2020-01-13 17:38:11
言語 F#
(.NET 7)
結果
WA  
実行時間 -
コード長 1,152 bytes
コンパイル時間 4,345 ms
コンパイル使用メモリ 165,532 KB
実行使用メモリ 24,584 KB
最終ジャッジ日時 2023-08-23 07:20:49
合計ジャッジ時間 7,144 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
24,380 KB
testcase_01 AC 70 ms
22,156 KB
testcase_02 AC 66 ms
22,464 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 67 ms
22,372 KB
testcase_20 AC 66 ms
22,312 KB
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

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.Length > 1 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()
0