| Task: | HIIT Generation |
| Sender: | Puhi~ |
| Submission time: | 2018-05-26 11:54:16 +0300 |
| Language: | Haskell |
| Status: | READY |
| Result: | TIME LIMIT EXCEEDED |
| test | verdict | time | |
|---|---|---|---|
| #1 | ACCEPTED | 0.06 s | details |
| #2 | TIME LIMIT EXCEEDED | -- | details |
| #3 | ACCEPTED | 0.05 s | details |
| #4 | ACCEPTED | 0.01 s | details |
Compiler report
input/code.hs:1:1: warning: [-Wmissing-signatures]
Top-level binding with no type signature: main :: IO ()
input/code.hs:2:5: warning: [-Wunused-do-bind]
A do-notation statement discarded a result of type `String'
Suppress this warning by saying `_ <- getLine'
input/code.hs:10:1: warning: [-Wmissing-signatures]
Top-level binding with no type signature:
asd :: Foldable t => t Char -> Char -> [Char]
input/code.hs:13:1: warning: [-Wmissing-signatures]
Top-level binding with no type signature: hiit :: [Char]Code
main = do
getLine
c <- getContents
putStrLn $ solve $ map head $ lines c
solve :: [Char] -> String
solve =
foldl asd hiit
asd t x =
concatMap (\c -> if c == x then hiit else [c]) t
hiit = "HIIT"Test details
Test 1
Verdict: ACCEPTED
| input |
|---|
| 17 I I I I ... |
| correct output |
|---|
| HHHHHHHHHHHHHHHHHHIITHIITTHHII... |
| user output |
|---|
| HHHHHHHHHHHHHHHHHHIITHIITTHHII... |
Test 2
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 333332 H H H H ... |
| correct output |
|---|
| HIITIITIITIITIITIITIITIITIITII... |
| user output |
|---|
| (empty) |
Test 3
Verdict: ACCEPTED
| input |
|---|
| 24 H T H T ... |
| correct output |
|---|
| HIIHIITIIHIIHIITIIHIITIIHIIHII... |
| user output |
|---|
| HIIHIITIIHIIHIITIIHIITIIHIIHII... |
Test 4
Verdict: ACCEPTED
| input |
|---|
| 0 |
| correct output |
|---|
| HIIT |
| user output |
|---|
| HIIT |
