记录详情

Compile Error

[1 of 1] Compiling Main             ( /in/foo.hs, /tmp/Main.o )

/in/foo.hs:1:35: error:
    * Couldn't match type `[b0]' with `Int'
      Expected type: String -> Int
        Actual type: String -> [b0]
    * In the second argument of `(.)', namely `map read . words'
      In the second argument of `(.)', namely
        `(\ n p -> solve p !! (n - p)) . map read . words'
      In the first argument of `(=<<)', namely
        `print . (\ n p -> solve p !! (n - p)) . map read . words'

/in/foo.hs:3:34: error:
    * Couldn't match expected type `Int -> [Int]'
                  with actual type `[a0]'
    * The function `tail' is applied to two arguments,
      but its type `[a0] -> [a0]' has only one
      In the second argument of `zipWith', namely `(tail solve x)'
      In the second argument of `(:)', namely
        `zipWith (+) (tail solve x) [x .. ]'

/in/foo.hs:3:39: error:
    * Couldn't match expected type `[a0]'
                  with actual type `Int -> [Int]'
    * Probable cause: `solve' is applied to too few arguments
      In the first argument of `tail', namely `solve'
      In the second argument of `zipWith', namely `(tail solve x)'
      In the second argument of `(:)', namely
        `zipWith (+) (tail solve x) [x .. ]'

信息

递交者
类型
自测
题目
平面分割(surface.pas/c/cpp)
语言
Haskell
递交时间
2017-11-27 13:00:50
评测时间
2019-01-10 22:28:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes