結果
問題 | No.804 野菜が苦手 |
ユーザー |
![]() |
提出日時 | 2019-03-27 16:11:37 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 62 ms / 2,000 ms |
コード長 | 386 bytes |
コンパイル時間 | 9,524 ms |
コンパイル使用メモリ | 186,356 KB |
実行使用メモリ | 29,696 KB |
最終ジャッジ日時 | 2024-10-11 02:23:05 |
合計ジャッジ時間 | 9,321 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (260 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/
ソースコード
open System let solve a b c d = let isEnable a b c d = let j1 = a * c <= b let j2 = a + b <= d j1 && j2 [ for iA in 0 .. a do for iB in 0 .. b do if isEnable iA iB c d then yield iA ] |> Seq.max let a, b, c, d = let t = Console.ReadLine().Split() |> Array.map int t.[0], t.[1], t.[2], t.[3] solve a b c d |> Console.WriteLine