提出 #9410338


ソースコード 拡げる

let fx = fun n  y  i  -> y - n - 9 * i
let fj = fun x -> x / 4
let fk = fun n i j -> n - i - j

let fc4 = fun j k -> j >= 0 && k >= 0
let fc3 = fun n i j -> fc4 j (fk n i j)
let fc2 = fun n i x -> if x % 4 = 0 then (fc3 n i (fj x)) else false
let fc1 = fun n y i -> fc2 n i (fx n  y  i)

let fo4 = fun i j k -> sprintf "%d %d %d" i j k
let fo3 = fun n i j -> fo4 i j (fk n i j)
let fo2 = fun n i x -> fo3 n i (fj x)
let fo1 = fun n y i -> match i with | Some i -> fo2 n i (fx n y i) | None -> "-1 -1 -1"

let fc = fun n y -> [0..(min 2000 (y / 10))] |> List.tryFind (fc1 n y)
let fo = fun n y -> fo1 n y (fc n y)

stdin.ReadLine()
|> fun x -> x.Split(' ')
|> Array.map int
|> fun x -> fo x.[0] (x.[1] / 1000)
|> printfn "%s"

提出情報

提出日時
問題 ABC085C - Otoshidama
ユーザ dsudo
言語 F# (Mono 4.0)
得点 300
コード長 745 Byte
結果 AC
実行時間 50 ms
メモリ 14172 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 4
AC × 24
セット名 テストケース
Sample a01, a02, a03, a04
All a01, a02, a03, a04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24
ケース名 結果 実行時間 メモリ
a01 AC 50 ms 12240 KiB
a02 AC 44 ms 14160 KiB
a03 AC 49 ms 12124 KiB
a04 AC 50 ms 12124 KiB
b05 AC 50 ms 14172 KiB
b06 AC 49 ms 12124 KiB
b07 AC 48 ms 10076 KiB
b08 AC 49 ms 12124 KiB
b09 AC 49 ms 10076 KiB
b10 AC 43 ms 9948 KiB
b11 AC 43 ms 11996 KiB
b12 AC 48 ms 10076 KiB
b13 AC 49 ms 10192 KiB
b14 AC 49 ms 14172 KiB
b15 AC 50 ms 12124 KiB
b16 AC 49 ms 12124 KiB
b17 AC 49 ms 10192 KiB
b18 AC 49 ms 10076 KiB
b19 AC 49 ms 12240 KiB
b20 AC 49 ms 12124 KiB
b21 AC 44 ms 14044 KiB
b22 AC 44 ms 11996 KiB
b23 AC 43 ms 11996 KiB
b24 AC 44 ms 11996 KiB