SUBSFREQ - Incorrect output?

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
1 Like

Please don’t discuss Problems from ongoing Contests on the forums, even in general terms.

You can use the “Comments” section of the Problem for asking for clarifications etc about Problem Statements if anything is unclear/ ambiguous :slight_smile: Note that it might take several hours to get a reply, so please be patient!

Closing this thread.

1 Like