what's wrong with the code-likecs03

solution link:CodeChef: Practical coding for everyone

Why a[0] = 1

Consider array
2 3 4 K = 3

I believe your code gives 0 while correct answer is 1.

Have a look at editorials i wrote… here

Hope that clarifies…

I tried hard, seems perfect to me :expressionless: