結果
| 問題 |
No.33 アメーバがたくさん
|
| コンテスト | |
| ユーザー |
anony
|
| 提出日時 | 2014-10-03 00:23:14 |
| 言語 | Haskell (9.10.1) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 363 bytes |
| コンパイル時間 | 6,567 ms |
| コンパイル使用メモリ | 171,264 KB |
| 実行使用メモリ | 820,516 KB |
| 最終ジャッジ日時 | 2024-09-24 09:50:33 |
| 合計ジャッジ時間 | 11,400 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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