結果
問題 | No.131 マンハッタン距離 |
ユーザー |
|
提出日時 | 2023-07-30 16:02:15 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 342 ms / 5,000 ms |
コード長 | 203 bytes |
コンパイル時間 | 9,896 ms |
コンパイル使用メモリ | 202,560 KB |
実行使用メモリ | 34,748 KB |
最終ジャッジ日時 | 2024-10-09 11:15:00 |
合計ジャッジ時間 | 18,025 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (232 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) /home/judge/data/code/Main.fs(1,5): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '[|_; _; _; _|]' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj] main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
let [|x; y; d|] = stdin.ReadLine().Split " " |> Array.map intif d > x + y then0elif d < min x y thend + 1elif d > x + y - min x y thenx + y - d + 1elsemin x y + 1|> printfn "%d"