However, due to some lore hidden in this game, some champions are friends with other champions, as such, they refuse to fight, and the result of their fight will be a draw.
You are given
Input Specification
First line, two integers
Second line,
Next
Output Specification
For each champion, output the number champions that they can defeat, output the answer on one line separated by spaces.
Constraints
- All pairs of
and are unique, and
Sample Input
4 2
10 4 10 15
1 2
4 3
Sample Output
0 0 1 2
Explanation for Sample Output
The first champion can only win against the second champion, but since they are friends, he cannot defeat any champion. The second champion has the lowest value, and thus he cannot defeat any other champion. The third champion can only defeat the second champion. The last champion can defeat all the champions except for the third champion, as they are friends.
Comments
Why can't I use NumPy for my program?
im kind of late but i think it's a third-party library that's not a part of the standard python modules