WALKFAST problem

Hey, I am getting wrong answer to WALKFAST problem. I tried to figure out which test case is failing but to no avail. Please help me out

https://www.codechef.com/viewsolution/31874106

Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

1 Like

Thanks! I am new to CodeChef. I just pasted the solution link instead. :slight_smile:

1 Like

Thanks :slight_smile: Your solution gives the wrong answer for the following test input:

1
8 1 8 1 4 92 70 45
-70 -56 -49 -7 -1 2 19 45

(the answer should be 9239).

2 Likes

Thanks! It seems I was returning time instead of time1. I corrected it and your test case works now. Still, the submission is showing wrong :frowning:

updated: CodeChef: Practical coding for everyone

Any help is appreciated. TIA

1 Like

Whats even more interesting is that some guy copied my code (including the variable names) and submitted . He got it correct.
Here’s his code : CodeChef: Practical coding for everyone

There’s one obvious bug remaining now, and it’s an easy one - just compare your solution with @everule1’s (they are not identical copies of each other) and you’ll see what it is :slight_smile:

2 Likes