Problem B. Seeing People
时间限制 3000 ms
内存限制 128 MB
There are two kinds of people.
If person i is the first kind of people, it locates at position (pi, 0) initially, starts moving at time ti with a constant velocity of (0, v1), and then sees every person sits at the line segment (xi, yi), (xi + wi, yi), include the two points, where (xi, yi) is the position of person i at that time and wi is its vision.
If person i is the second kind of people, it locates at position (0, pi) initially, starts moving at time ti with a constant velocity of (v2, 0), and then sees every person sits at the line segment (xi, yi), (xi, yi + wi), include the two points, where (xi, yi) is the position of person i at that time and wi is its vision.
Now given the position of people, please calculate the number of distinct people every person has finally seen.
输入数据
输出数据
For each case, you should output "Case #k:" first, where k indicates the case number and counts from 1.
Then output N lines, each lines is an integer, indicates the number of distinct people the i-th person finally recorded.
样例输入
复制
1
2 1 1
1 1 1 1
2 2 2 1
样例输出
$ Mathjax font initiator $