結果
| 問題 |
No.33 アメーバがたくさん
|
| コンテスト | |
| ユーザー |
anony
|
| 提出日時 | 2014-10-03 00:22:03 |
| 言語 | Haskell (9.10.1) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 363 bytes |
| コンパイル時間 | 7,353 ms |
| コンパイル使用メモリ | 169,984 KB |
| 実行使用メモリ | 813,952 KB |
| 最終ジャッジ日時 | 2024-09-24 09:49:52 |
| 合計ジャッジ時間 | 9,638 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 MLE * 1 -- * 2 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.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
anony