Can anyone please help me in figuring out why the code below is giving WA:
https://www.codechef.com/viewsolution/31852549
Hi @sipun
Check your code for the following test case :
5 3
1 1 1 1 1
It should give 5 but it’s giving 0 as the output
1 Like
Thanks. Its done now.