Input:
1
a a
4
a
a
a
a
Your Output:
YES
Correct Output:
NO
in this testcase, A + B = “aa” and C = “aaaa”. C is not a substring of any permutation of A+B. Therefore the answer is NO
Input:
1
a a
4
a
a
a
a
Your Output:
YES
Correct Output:
NO
in this testcase, A + B = “aa” and C = “aaaa”. C is not a substring of any permutation of A+B. Therefore the answer is NO