結果
問題 | No.33 アメーバがたくさん |
ユーザー | anony |
提出日時 | 2014-10-03 00:22:03 |
言語 | Haskell (9.8.2) |
結果 |
MLE
|
実行時間 | - |
コード長 | 363 bytes |
コンパイル時間 | 3,941 ms |
コンパイル使用メモリ | 165,732 KB |
実行使用メモリ | 818,932 KB |
最終ジャッジ日時 | 2023-10-24 17:38:09 |
合計ジャッジ時間 | 11,230 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | MLE | - |
testcase_01 | AC | 2 ms
5,132 KB |
testcase_02 | AC | 3 ms
5,120 KB |
testcase_03 | AC | 3 ms
5,196 KB |
testcase_04 | AC | 3 ms
5,216 KB |
testcase_05 | AC | 3 ms
5,248 KB |
testcase_06 | AC | 6 ms
8,324 KB |
testcase_07 | AC | 7 ms
9,328 KB |
testcase_08 | MLE | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
module Main where eval :: Int -> Int -> [Int] -> [Int] eval 0 _ = id eval t d = eval (t - 1) d . filt . (>>= \x -> [x+d, x, x-d]) where filt [] = [] filt (x:xs) = x : filt (filter (/= x) xs) main :: IO () main = do [_, d, t] <- fmap (map read . words) getLine xs <- fmap (map read . words) getLine print $ length $ eval t d xs