Help in ZCOSCH19 - ZCOPREP

Problem Link
My Solution

Please give test cases and some reason plsss

1
10 2 10
1 1 1 1 1 1 1 1 1 11

1 Like

Hey,
Thanks for the test case will the answer be 2

we are in the same boat at the moment… https://www.codechef.com/viewsolution/34888005

i dont know if there are any other corner cases

Edit there are no corner cases indeed, i had little error in my code above : AC

1 Like

Your code is very correct except a minor mistake…

you are breaking loop if you are at last element of the array. and not actually computing last element of the array.

here is your AC.

1 Like

hey @sirearsh thanks a lot got AC: Solution