結果

問題 No.131 マンハッタン距離
ユーザー natoriusannatoriusan
提出日時 2023-07-30 16:02:15
言語 F#
(F# 4.0)
結果
AC  
実行時間 333 ms / 5,000 ms
コード長 203 bytes
コンパイル時間 7,887 ms
コンパイル使用メモリ 203,128 KB
実行使用メモリ 34,868 KB
最終ジャッジ日時 2024-04-17 17:07:06
合計ジャッジ時間 14,491 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 284 ms
34,340 KB
testcase_01 AC 279 ms
34,616 KB
testcase_02 AC 282 ms
34,616 KB
testcase_03 AC 280 ms
34,596 KB
testcase_04 AC 283 ms
34,624 KB
testcase_05 AC 285 ms
34,492 KB
testcase_06 AC 300 ms
34,492 KB
testcase_07 AC 288 ms
34,744 KB
testcase_08 AC 281 ms
34,496 KB
testcase_09 AC 287 ms
34,744 KB
testcase_10 AC 286 ms
34,624 KB
testcase_11 AC 280 ms
33,800 KB
testcase_12 AC 333 ms
34,064 KB
testcase_13 AC 306 ms
34,868 KB
testcase_14 AC 283 ms
33,680 KB
testcase_15 AC 284 ms
34,212 KB
testcase_16 AC 285 ms
34,752 KB
testcase_17 AC 283 ms
34,192 KB
testcase_18 AC 283 ms
34,628 KB
testcase_19 AC 287 ms
33,944 KB
testcase_20 AC 285 ms
34,472 KB
testcase_21 AC 284 ms
34,752 KB
testcase_22 AC 282 ms
34,596 KB
testcase_23 AC 285 ms
34,484 KB
testcase_24 AC 281 ms
34,592 KB
testcase_25 AC 285 ms
34,484 KB
testcase_26 AC 283 ms
34,372 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (280 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/

ソースコード

diff #

let [|x; y; d|] = stdin.ReadLine().Split " " |> Array.map int

if d > x + y then
    0
elif d < min x y then
    d + 1
elif d > x + y - min x y then
    x + y - d + 1
else
    min x y + 1
|> printfn "%d"
0