結果

問題 No.410 出会い
ユーザー LeonardoneLeonardone
提出日時 2016-08-13 05:55:18
言語 F#
(F# 4.0)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 4,413 ms
コンパイル使用メモリ 155,812 KB
実行使用メモリ 27,964 KB
最終ジャッジ日時 2023-09-10 19:57:32
合計ジャッジ時間 7,049 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
27,796 KB
testcase_01 AC 115 ms
25,756 KB
testcase_02 AC 117 ms
25,792 KB
testcase_03 AC 115 ms
27,752 KB
testcase_04 AC 115 ms
27,772 KB
testcase_05 AC 114 ms
27,760 KB
testcase_06 AC 116 ms
25,964 KB
testcase_07 AC 114 ms
25,708 KB
testcase_08 AC 115 ms
27,964 KB
testcase_09 AC 114 ms
27,692 KB
testcase_10 AC 115 ms
25,708 KB
testcase_11 AC 114 ms
27,872 KB
testcase_12 AC 113 ms
25,680 KB
testcase_13 AC 112 ms
25,664 KB
testcase_14 AC 114 ms
25,852 KB
testcase_15 AC 117 ms
25,900 KB
testcase_16 AC 121 ms
27,880 KB
testcase_17 AC 114 ms
27,796 KB
testcase_18 AC 116 ms
25,716 KB
testcase_19 AC 114 ms
25,828 KB
testcase_20 AC 114 ms
27,828 KB
testcase_21 AC 114 ms
25,868 KB
testcase_22 AC 114 ms
27,676 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
    |> fun xyxy ->
        match xyxy with
        | [|px; py; qx; qy|] -> px, py, qx, qy
        | _ -> failwith "Error"

let solve(Px, Py, Qx, Qy) =
    let diff k = abs << (-) k
    diff Px Qx + diff Py Qy |> (/) <| 2.0

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