We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Hi,
I also get "Runtime Error" for the exact same testcases - other testcases solved. I'm sure it is not because of a time limit since you would get "Timeout" as a result.
To be more specific: I'm using Haskell, a self-defined segment tree (should be quite fast), and the following approach to read the next command:
solve _ 0 = return ()
solve tree q = do
commandTemp <- getLine
let splittedCommand = map (\x -> read x :: Int) $ words commandTemp
...
No idea, how the Runtime Error occurs, to be honest.
EDIT: I changed my IO approach and now i get the Runtime Error in some other testcases aswell.
EDIT: It has something to do with lazy input reading - no time to dig deeper.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Fighting Armies
You are viewing a single comment's thread. Return to all comments →
Hi, I also get "Runtime Error" for the exact same testcases - other testcases solved. I'm sure it is not because of a time limit since you would get "Timeout" as a result.
To be more specific: I'm using Haskell, a self-defined segment tree (should be quite fast), and the following approach to read the next command:
No idea, how the Runtime Error occurs, to be honest.
EDIT: I changed my IO approach and now i get the Runtime Error in some other testcases aswell.
EDIT: It has something to do with lazy input reading - no time to dig deeper.