Andy is travelling through the galaxy. His mission is to categorize the planets that he passes. There are
Input Specification
Line
Line
Output Specification
Line
Line
Constraints
Subtasks
Subtask 1 [10%]
Subtask 2 [10%]
Subtask 3 [80%]
No additional constraints.
Sample Input
5 4
1
4
4
3
4
Sample Output
0
0
1
0
2
3
Comments
for python 3, try using a dictionary instead of a list