Hi! I won’t tell you whats actually wrong with your solution. Here’s a test case that fails your solution:
1 2 3 4 5 6 7 8 1 2
Expected Output: 88
Your Output: 00
Hint: First, try out the test case manually and see how you will approach it. Next, dry run your code with the given input.
Thanks for that test case.
I’ve remove that bug but again getting W.A.What to do…
Problem link: http://www.codechef.com/viewsolution/4928485