結果

問題 No.410 出会い
ユーザー Leonardone
提出日時 2016-08-13 06:08:04
言語 F#
(F# 4.0)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 7,801 ms
コンパイル使用メモリ 189,480 KB
実行使用メモリ 32,512 KB
最終ジャッジ日時 2024-06-28 11:04:34
合計ジャッジ時間 10,232 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (258 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

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