結果

問題 No.410 出会い
ユーザー LeonardoneLeonardone
提出日時 2016-08-13 06:08:04
言語 F#
(F# 4.0)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 3,372 ms
コンパイル使用メモリ 153,860 KB
実行使用メモリ 27,880 KB
最終ジャッジ日時 2023-09-10 19:58:16
合計ジャッジ時間 7,209 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
25,612 KB
testcase_01 AC 113 ms
23,548 KB
testcase_02 AC 113 ms
25,644 KB
testcase_03 AC 114 ms
25,512 KB
testcase_04 AC 115 ms
25,572 KB
testcase_05 AC 114 ms
25,768 KB
testcase_06 AC 113 ms
23,764 KB
testcase_07 AC 114 ms
25,752 KB
testcase_08 AC 114 ms
27,504 KB
testcase_09 AC 114 ms
27,880 KB
testcase_10 AC 114 ms
25,700 KB
testcase_11 AC 114 ms
27,692 KB
testcase_12 AC 114 ms
23,676 KB
testcase_13 AC 114 ms
25,468 KB
testcase_14 AC 116 ms
27,740 KB
testcase_15 AC 114 ms
27,536 KB
testcase_16 AC 114 ms
27,672 KB
testcase_17 AC 116 ms
25,576 KB
testcase_18 AC 113 ms
25,680 KB
testcase_19 AC 115 ms
25,476 KB
testcase_20 AC 113 ms
25,688 KB
testcase_21 AC 114 ms
25,488 KB
testcase_22 AC 112 ms
25,624 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

// yukicoder My Practice
// author: Leonardone @ NEETSDKASU

let get() =
    stdin.ReadToEnd().Trim().Split [|' '; '\n'|]
    |> Array.map float

let solve input =
    match input with
    | [|Px; Py; Qx; Qy|] ->
        let diff k = abs << (-) k
        diff Px Qx + diff Py Qy |> (/) <| 2.0
    | _ -> failwith "Err"

[<EntryPoint>]
let main _ =
    printfn "%A" << solve << get <| ()
    0
0