ZOJ Problem Set - 3379
Master Spark is a powerful bomb that can deal the highest damage with good stability. Kirisame Marisa (霧雨魔理沙) uses her Hakkero (八卦炉) to power the Master Spark. The outline of Master Spark is a parabola with the vertex at (0, 0), where Marisa is located. The second-order coefficient of the parabola is a specific real number a.
Knowing that there are n fairies in the 2D-plane, Marisa wants to damage as many of them as possible by powering a single Master Spark. She can choose any direction to power as she likes.
There are multiple cases. Each case is made up of three lines, the first line contains an integer n (0 ≤ n ≤ 30000) -- the number of fairies in the plane and an real number a (0.1 ≤ a ≤ 10) -- the second-order coefficient of the Master Spark. Both the next two lines contains n real numbers xi and yi -- the coordinates of the i-th fairy.
For each test case, output the the maximum number of fairies Marisa can damage, in format "%d daze\n".
10 0.5 -10 -6 20 1 0 -8 5 -5 30 40 -10 0 0 -5 20 33 13 13 40 30
Author: WU, Zejun
Source: ACM × Touhou
Contest: ZOJ Monthly, August 2010