You are viewing a single comment's thread. Return to all comments →
If the given input n (here 3 and 4) is equal to 1, then only we have to print yes.
Oops i think i misunderstood the test description.
2 -> how many test case will coming
3 -> how many element in the first test case
1 2 3 -> the actual first test case
4 -> how many element in the second test case
1 2 3 4 -> the actual second test case
I thought the 2, 3 and 4 are also test cases :(
But now it's clear to me , thanks #warrior_of_light
If n == 1, then definitely answer is YES, for n > 1, you have to check.