結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
27,548 KB
testcase_01 AC 119 ms
25,540 KB
testcase_02 AC 120 ms
27,476 KB
testcase_03 AC 118 ms
25,676 KB
testcase_04 AC 119 ms
25,680 KB
testcase_05 AC 119 ms
23,636 KB
testcase_06 AC 117 ms
25,816 KB
testcase_07 AC 118 ms
27,664 KB
testcase_08 AC 118 ms
23,536 KB
testcase_09 AC 120 ms
25,660 KB
testcase_10 AC 117 ms
25,528 KB
testcase_11 AC 117 ms
25,592 KB
testcase_12 AC 118 ms
25,480 KB
testcase_13 AC 119 ms
25,800 KB
testcase_14 AC 119 ms
25,588 KB
testcase_15 AC 118 ms
27,528 KB
testcase_16 AC 120 ms
25,480 KB
testcase_17 AC 120 ms
27,700 KB
testcase_18 AC 120 ms
25,912 KB
testcase_19 AC 121 ms
25,660 KB
testcase_20 AC 119 ms
27,884 KB
testcase_21 AC 118 ms
25,568 KB
testcase_22 AC 118 ms
25,540 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

/home/judge/data/code/Main.fs(12,11): warning FS0025: Incomplete pattern matches on this expression. For example, the value '[|_; _; _; _; _|]' may indicate a case not covered by the pattern(s).

ソースコード

diff #

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

let get() =
    stdin.ReadToEnd().Trim().Split [|' '; '\n'|]
    |> Array.map float
    |> fun xyxy ->
        match xyxy with
        | [|_; _; _; _|] -> xyxy
        | _ -> 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