ignus deoria the great city...

Problem:-CodeChef: Practical coding for everyone
My solution:-CodeChef: Practical coding for everyone
Can someone explain what is wrong with my algorithm or my code?

I think you should reset the values of arr for each case!
2
2 2
1 1
1 1

2 2
2 1
2 1

have u tried this test case:

1 1

1 2

1 2

2 1

2 2
for which the answer shld be YES for both the queries.

thanx @iam_the_best

@admin Plz move this ques to practice …
Thnx