WALK prob WA


#1

I tried solving the WALK problem using the editorial but I am getting WA. Kindly tell me the error :slight_smile:

www.codechef.com/viewsolution/3649113


#2

@sandy999 : You logic is wrong . The answer to the problem is max(a*+i) for i from 0 to n-1 .


#3

try this test case:

1

6

6 1 2 3 4 5

your output is 6 but correct answer is 10


#4

Thanks @vineetpaliwal I finally got AC :smiley: