Segmentation fault in the friends pairing problem

here is the link to my code… can you please help me correct it

Sorry, it’s not segmentation fault, it is given incorrect output

https://ide.codingblocks.com/s/335972 - Please refer this link instead

@prerna_gupta31
You forgot to print endl after printing the answer of each test case. Also use long long in place of int.
If my answer was able to resolve your query, please mark the doubt as resolved.