March LOng Challenge | Chef and Groups

can anyone help me with what I am missing, my solution passes all the test cases in the example test cases but the solution when submitted comes wrong.

find my solution here.

https://www.codechef.com/viewsolution/43867713

Thanks in advance

You didn’t add a newline while printing the output. Below is the link to your AC soln
AC Soln

1 Like