Knight Tournament
https://codeforces.com/contest/357/problem/C
Input Format
Check Link
Output Format
Check Link
Question Video
Constraints
Check Link
Sample Input
4 3
1 2 1
1 3 3
1 4 4
Sample Output
3 1 4 0
Your profile is incomplete!
Please click here to complete your profile
to continue submitting
questions.