Hey! I want an explaination for this scenario :
Problem LINK
In soltion 1 , i’m taking no. of test cases as input through cin and then ignoring the remaining line by using cin.ignore(). This results in WA.
While in Solution 2 , i’m taking the no.of test cases as input using getline and then converting it into int. This gives AC. Why is that so?? thanks in advance!