Solution: 50525294 | CodeChef - Can anyone tell me where I went wrong? some corner case would be very helpful.
Consider the test input:
1 4 NNNN 1000000000 1000000000
(I think it’s a valid one, based on a quick read of the Problem)
I too have some issue
WA Solution: 50508878 | CodeChef
This fails on the sample test input.
Hint: you are calculating
right wrongly; you’re updating it based on the wrong titan direction!
Wow, Thank you. I should have used 1e18 as the initial value of ans instead of 1e9. Thanks a lot!
wooh thanks man really helpful.