結果
問題 | No.1010 折って重ねて |
ユーザー | ikd |
提出日時 | 2020-05-03 14:34:05 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,036 bytes |
コンパイル時間 | 5,871 ms |
コンパイル使用メモリ | 167,000 KB |
実行使用メモリ | 27,304 KB |
最終ジャッジ日時 | 2023-09-02 20:15:13 |
合計ジャッジ時間 | 12,744 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 87 ms
23,100 KB |
testcase_01 | AC | 88 ms
22,964 KB |
testcase_02 | AC | 88 ms
23,088 KB |
testcase_03 | AC | 87 ms
20,940 KB |
testcase_04 | WA | - |
testcase_05 | AC | 88 ms
23,192 KB |
testcase_06 | AC | 88 ms
25,004 KB |
testcase_07 | AC | 88 ms
25,132 KB |
testcase_08 | AC | 88 ms
23,160 KB |
testcase_09 | AC | 88 ms
23,188 KB |
testcase_10 | AC | 88 ms
23,096 KB |
testcase_11 | AC | 88 ms
23,104 KB |
testcase_12 | AC | 88 ms
23,100 KB |
testcase_13 | AC | 90 ms
25,084 KB |
testcase_14 | AC | 88 ms
23,028 KB |
testcase_15 | AC | 87 ms
23,104 KB |
testcase_16 | AC | 87 ms
22,976 KB |
testcase_17 | AC | 87 ms
21,088 KB |
testcase_18 | AC | 88 ms
23,100 KB |
testcase_19 | AC | 87 ms
20,932 KB |
testcase_20 | AC | 88 ms
23,100 KB |
testcase_21 | AC | 88 ms
25,032 KB |
testcase_22 | AC | 87 ms
25,168 KB |
testcase_23 | AC | 88 ms
23,024 KB |
testcase_24 | AC | 87 ms
22,988 KB |
testcase_25 | AC | 87 ms
22,992 KB |
testcase_26 | AC | 88 ms
23,100 KB |
testcase_27 | AC | 88 ms
20,972 KB |
testcase_28 | AC | 88 ms
25,172 KB |
testcase_29 | AC | 88 ms
23,104 KB |
testcase_30 | AC | 89 ms
25,140 KB |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | AC | 88 ms
23,044 KB |
testcase_34 | AC | 88 ms
25,140 KB |
testcase_35 | AC | 89 ms
23,192 KB |
testcase_36 | AC | 88 ms
25,052 KB |
testcase_37 | AC | 87 ms
22,988 KB |
testcase_38 | AC | 88 ms
23,180 KB |
testcase_39 | AC | 87 ms
22,932 KB |
testcase_40 | AC | 87 ms
25,120 KB |
testcase_41 | AC | 87 ms
25,136 KB |
testcase_42 | AC | 87 ms
23,112 KB |
testcase_43 | AC | 88 ms
25,192 KB |
testcase_44 | AC | 88 ms
23,072 KB |
testcase_45 | AC | 88 ms
23,108 KB |
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0 Copyright (c) Microsoft Corporation. All Rights Reserved. /home/judge/data/code/Main.fs(13,9): warning FS0025: Incomplete pattern matches on this expression. For example, the value '[|_; _; _; _|]' may indicate a case not covered by the pattern(s).
ソースコード
// Learn more about F# at http://fsharp.org open System let rec pow a x = if x = 0L then 1L elif x = 1L then a elif x % 2L = 0L then pow (a * a) (x / 2L) else a * (pow a (x - 1L)) [<EntryPoint>] let main argv = let [| xx; yy; h |] = stdin.ReadLine().Split() |> Array.map int64 let x, y = Math.Min(xx, yy), Math.Max(xx, yy) let ans = seq { for a in 0L .. 16L do for b in 0L .. 16L do // x を a 回折れるか // x / 2^(a - 1) > h * 2^(a - 1) if a = 0L || x * 1000L > h * (pow 2L (a - 1L)) * (pow 2L (a - 1L)) then if b = 0L || y * 1000L > h * (pow 2L a) * (pow 2L (b - 1L)) * (pow 2L (b - 1L)) then yield (a, b) } |> Seq.map (fun tup -> (fst tup) + (snd tup)) |> Seq.max printfn "%d" ans 0 // return an integer exit code