Sort 3 Discussions, By:
Please Login in order to post a comment
R > 1 makes this difficult. I can handle n=10^5 when r=1, but when r=1.5 I can only handle n=10^4 before I run out of time. Can someone confirm them solved this without using hardcoded data sets?
Well, Haskell's built-in read :: String -> Double is quite slow, so I write my own version of reader. After many times of submission I found that the input format does not follow what it should be:
read :: String -> Double
The input r is written with at most 6 decimal digits behind the decimal point.
It confused me for a whole day, and later I just tried to read 8 decimal digits behind the decimal point and that was accepted.
Although the outputs from my code are correct, even then the there is a timeout message when the code is executed?
No more comments