2. Description
• Given a set of competitors which have 𝑟𝑖 and 𝑠𝑖 as its value,
find the largest subset of possible winners W
• a competitor can be a winner if there exists 𝑅, 𝑆 ∈ ℝ+
2
where 𝑡 =
𝑅
𝑟 𝑖
+
𝑆
𝑠 𝑖
has the minimum value in the set.
• Constraints : 1 ≤ 𝑛 ≤ 2 × 105, 1 ≤ 𝑠𝑖, 𝑟𝑖 ≤ 104
3. Obvious Facts
• A competitor 𝑖 cannot be a winner if another competitor 𝑗
such that 𝑟𝑖 < 𝑟𝑗 𝑎𝑛𝑑 𝑠𝑖 < 𝑠𝑗 exists.
𝑟
𝑠
(𝑟𝑗, 𝑠𝑗)
(𝑟𝑖, 𝑠𝑖)
4. Geometric Analysis
• 𝑡 should be the minimum for 𝑖 to be a winner
• min 𝑡 =
𝑅
𝑟 𝑖
+
𝑆
𝑠 𝑖
= R, S ∙
1
𝑟 𝑖
,
1
𝑠 𝑖
= R, S × |
1
𝑟 𝑖
,
1
𝑠 𝑖
| × cos 𝜃
• Boxed one is the component of
𝟏
𝒓 𝒊
,
𝟏
𝒔 𝒊
in dir. of 𝐑, 𝐒
• Therefore, suppose R, S is any unit vector in the first
quadrant and find the possible winners!