CSES - Harjoituskisa 14.1.2018 - Results
Submission details
Task:Kasihymiö
Sender:FSMnArmosta
Submission time:2018-01-15 08:28:40 +0200
Language:Haskell
Status:READY
Result:23
Feedback
groupverdictscore
#1ACCEPTED23
#20
Test results
testverdicttimegroup
#1ACCEPTED0.05 s1details
#2ACCEPTED0.04 s1details
#3ACCEPTED0.04 s1details
#4ACCEPTED0.05 s1details
#5ACCEPTED0.04 s1details
#6ACCEPTED0.27 s2details
#70.38 s2details
#80.31 s2details
#90.34 s2details
#100.32 s2details

Compiler report

input/code.hs:3:1: Warning:
    Top-level binding with no type signature:
      t :: forall t. Num t => (t, t) -> Char -> (t, t)

input/code.hs:6:1: Warning:
    Top-level binding with no type signature: main :: IO ()

input/code.hs:6:47: Warning:
    Defaulting the following constraint(s) to type `Integer'
      (Num a0) arising from a use of `t' at input/code.hs:6:47
      (Show a0) arising from a use of `print' at input/code.hs:6:27-31
    In the first argument of foldl', namely `(t)'
    In the first argument of `snd', namely `(foldl' (t) (0, 0) l)'
    In the first argument of `print', namely
      `(snd (foldl' (t) (0, 0) l))'

Code

import Data.Foldable

t (kasit, score) '8' = (kasit+1, score)
t (kasit, score) _ = (kasit, score+kasit)

main = getLine >>= (\l -> print (snd (foldl' (t) (0, 0) l )))

Test details

Test 1

Group: 1

Verdict: ACCEPTED

input
888888888888888888888888888888...

correct output
0

user output
0

Test 2

Group: 1

Verdict: ACCEPTED

input
))))))))))))))))))))))))))))))...

correct output
0

user output
0

Test 3

Group: 1

Verdict: ACCEPTED

input
888888888888888888888888888888...

correct output
250000

user output
250000

Test 4

Group: 1

Verdict: ACCEPTED

input
8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)...

correct output
125250

user output
125250

Test 5

Group: 1

Verdict: ACCEPTED

input
8)88))))88))8)))8))8))888))888...

correct output
127050

user output
127050

Test 6

Group: 2

Verdict: ACCEPTED

input
888888888888888888888888888888...

correct output
0

user output
0

Test 7

Group: 2

Verdict:

input
))))))))))))))))))))))))))))))...

correct output
0

user output
(empty)

Error:
Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize -RTS' to increase it.

Test 8

Group: 2

Verdict:

input
888888888888888888888888888888...

correct output
250000000000

user output
(empty)

Error:
Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize -RTS' to increase it.

Test 9

Group: 2

Verdict:

input
8)8)8)8)8)8)8)8)8)8)8)8)8)8)8)...

correct output
125000250000

user output
(empty)

Error:
Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize -RTS' to increase it.

Test 10

Group: 2

Verdict:

input
888)888))8)88)8))88)888)88))8)...

correct output
125162819188

user output
(empty)

Error:
Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize -RTS' to increase it.