红题居然MLE了

P1554 梦中的统计

```haskell count' :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> String -> [Int] count' zero one two three four five six seven eight nine [] = [zero, one, two, three, four, five, six, seven, eight, nine] count' zero one two three four five six seven eight nine ('0':str) = count' (zero + 1) one two three four five six seven eight nine str count' zero one two three four five six seven eight nine ('1':str) = count' zero (one + 1) two three four five six seven eight nine str count' zero one two three four five six seven eight nine ('2':str) = count' zero one (two + 1) three four five six seven eight nine str count' zero one two three four five six seven eight nine ('3':str) = count' zero one two (three + 1) four five six seven eight nine str count' zero one two three four five six seven eight nine ('4':str) = count' zero one two three (four + 1) five six seven eight nine str count' zero one two three four five six seven eight nine ('5':str) = count' zero one two three four (five + 1) six seven eight nine str count' zero one two three four five six seven eight nine ('6':str) = count' zero one two three four five (six + 1) seven eight nine str count' zero one two three four five six seven eight nine ('7':str) = count' zero one two three four five six (seven + 1) eight nine str count' zero one two three four five six seven eight nine ('8':str) = count' zero one two three four five six seven (eight + 1) nine str count' zero one two three four five six seven eight nine ('9':str) = count' zero one two three four five six seven eight (nine + 1) str count :: Int -> Int -> [Int] count begin end = count' 0 0 0 0 0 0 0 0 0 0 $ foldr (\x l -> show x ++ l) [] [begin..end] main :: IO () main = do [begin, end] <- (map read . words) <$> getLine putStrLn $ foldr (\x l -> show x ++ " " ++ l) [] $ count begin end return () ```
by HoshinoTented @ 2018-12-21 23:19:52


~~你不告诉我们语言,我们怎么给你调啊~~
by pjykk @ 2018-12-21 23:23:02


[Haskell](https://haskell.org) ~~委屈.png~~
by HoshinoTented @ 2018-12-21 23:25:07


这语言。。。。
by sky_fackr @ 2018-12-22 02:04:09


**希望更丰富的展现?使用Markdown**
by DepletedPrism @ 2018-12-22 07:30:21


@[HoshinoTented](/space/show?uid=124166) 这。。。 希望更丰富的展现?使用Markdown
by Purple_sword @ 2018-12-22 07:30:48


神马语言
by 海洋 @ 2018-12-22 07:53:11


TQL
by lqhsr @ 2018-12-22 08:01:57


你是啥语言~~(C吗)~~
by 涛宝是我 @ 2018-12-22 08:08:05


%%%%haskell
by LinkinPony @ 2018-12-22 09:09:32


| 下一页