HDU 4946 Area of Mushroom(凸包)
如果一個人能統治無窮遠處,那麼他的速度一定是最大的。除了那幾種很坑的數據,比如同一個點速度相同的兩個人。永遠都是不可能。所以你要處理出來所有速度最大的點,然後用他們構成一個凸包,你把端點的點求出來了,還得判斷一下在邊上的情況。然後頂點和在邊上的點所構成的就是可以到達無窮遠處的人。
PS:抄了芳姐的模版。。哈哈哈
Area of Mushroom
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 676 Accepted Submission(s): 120
Problem Description
Teacher Mai has a kingdom with the infinite area.
He has n students guarding the kingdom.
The i-th student stands at the position (x
i,y
i), and his walking speed is v
i.
If a point can be reached by a student, and the time this student walking to this point is
strictly less than other students, this point is in the charge of this student.
For every student, Teacher Mai wants to know if the area in the charge of him is infinite.
Input
There are multiple test cases, terminated by a line "0".
For each test case, the first line contains one integer n(1<=n<=500).
In following n lines, each line contains three integers x
i,y
i,v
i(0<=|x
i|,|y
i|,v
i<=10^4).
Output
For each case, output "Case #k: s", where k is the case number counting from 1, and s is a string consisting of n character. If the area in the charge of the i-th student isn't infinite, the i-th character is "0", else it's "1".
Sample Input
3
0 0 3
1 1 2
2 2 1
0
Sample Output
Case #1: 100
Source
2014 Multi-University Training Contest
8
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include