結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
27,804 KB
testcase_01 AC 115 ms
27,724 KB
testcase_02 AC 114 ms
25,840 KB
testcase_03 AC 114 ms
27,772 KB
testcase_04 AC 114 ms
25,596 KB
testcase_05 AC 116 ms
27,864 KB
testcase_06 AC 115 ms
25,808 KB
testcase_07 AC 114 ms
27,636 KB
testcase_08 AC 115 ms
25,700 KB
testcase_09 AC 115 ms
25,660 KB
testcase_10 AC 115 ms
25,724 KB
testcase_11 AC 114 ms
25,620 KB
testcase_12 AC 114 ms
27,800 KB
testcase_13 AC 112 ms
25,744 KB
testcase_14 AC 114 ms
25,784 KB
testcase_15 AC 113 ms
25,824 KB
testcase_16 AC 113 ms
25,632 KB
testcase_17 AC 113 ms
25,700 KB
testcase_18 AC 114 ms
27,712 KB
testcase_19 AC 119 ms
25,768 KB
testcase_20 AC 115 ms
25,716 KB
testcase_21 AC 113 ms
25,640 KB
testcase_22 AC 114 ms
23,592 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