Help needed for a problem

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)

2 Likes

I too have some issue
WA CodeChef: Practical coding for everyone
Please help.

This fails on the sample test input.

Hint: you are calculating right wrongly; you’re updating it based on the wrong titan direction!

1 Like

Wow, Thank you. I should have used 1e18 as the initial value of ans instead of 1e9. Thanks a lot!

1 Like

wooh thanks man really helpful.

1 Like