Problem: CodeChef: Practical coding for everyone
In the 1st and 3rd output, 2 is repeating multiple times. Here, in output #1 we are outputting 0 for the first repeating 2. However, in output #3, we are outputting 0 for the last repeating 2. Can you please explain what is the required format of output?
Example Input
3
3
2 2 3
2
1 2
3
1 2 2
Example Output
0 6 1
2 1
3 4 0