my code: https://ide.codingblocks.com/#/s/21824
Ques link:https://hack.codingblocks.com/contests/c/452/76
I am not getting desired output. Each output is getting printed multiple times. How can i make changes to this approach to get correct output.