#Lutece1584. Washi与Sonochi的约定
Washi与Sonochi的约定
Migrated from Lutece 1584 Washi与Sonochi的约定
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
,明年再一起看烟花。——
为了实现和的约定,必须要打败眼前强大的怪物。
怪物分布在二维平面上,
某个怪物的被定义为坐标不大于其坐标,且坐标不大于其坐标的怪物的数量。(不含其自身)
要你输出行,每行一个整数,分别代表为的怪物数量。
Input
输入第一行为一个正整数,
接下来行,第行两个整数、,表示一个怪物的坐标。
保证输入的坐标两两不同。
Output
包含行,每行一个整数,第行的数代表为的怪物数量。
Samples
5
1 1
5 1
7 1
3 3
5 5
1
2
1
1
0
Note
Resources
17暑假前集训-数据结构专题 By AutSky_JadeK,思路非原创 - poj 2352