#D5583. Distribution Center
Distribution Center
Distribution Center
Example
Input
4 3 1000 1 2000 2 3000 3
Output
2 3 4 4
inputFormat
Input
4 3 1000 1 2000 2 3000 3
outputFormat
Output
2 3 4 4
样例
4 3
1000 1
2000 2
3000 3
2 3 4 4
Example
Input
4 3 1000 1 2000 2 3000 3
Output
2 3 4 4
Input
4 3 1000 1 2000 2 3000 3
Output
2 3 4 4
4 3
1000 1
2000 2
3000 3
2 3 4 4
By signing up a OpenJudge universal account, you can submit code and join discussions in all online judging services provided by us.