SANSKAR give some test case where the code fails?

The link to the code is given below:

http://www.codechef.com/viewsolution/5525391

Thank you!

Always try giving ideone link of the code. However, try this:

1
1 2
0

Answer should be no.

1 Like

Hey @amritkrs

Check these cases:

1 2
0
no
10 2
4 5 1 5 5 0 5 1 4 8
yes

Your code fails on these cases…

hey @damn_me why i’m getting wrong answer in task 7 in alok nath and sanskar

Hey @damn_me

btw as far i know K cannot be 0…

so this is not a valid test case as…

Constraints
1 ≤ T ≤ 10
1 ≤ N ≤ 21
1 ≤ K ≤ 8

@rishabhprsd7 That was a typo, thanks for pointing out. I corrected that.

okay… yes @amritkrs 's code fails on this test case…