問題一覧 > 通常問題

No.1137 Circles

レベル : / AI推定難易度 : 800 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 81
作問者 : WrongAccept / テスター : leafirby
お気に入りにしたユーザー ProblemId : 4778 / 自分の提出
問題文最終更新日: 2020-07-26 22:04:06
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original

Problem Statement

While taking a walk on the $xy$-plane, NaN-kun found $N$ circles centered on the $x$-axis.
Circle $C_i$ is known to have its center at ($x_i$,$0$) and radius $r_i$. NaN-kun wants to know how many circles contain the point that lies inside the most circles.
Your task is to determine, on NaN-kun's behalf, how many circles contain the point $(a,b)$ that lies inside the most circles. Note that the circumference is not considered part of the interior of a circle.

Input

$N$
$x_1\ r_1$
$x_2\ r_2$
.
.
.
$x_N\ r_N$

$1\le N\le 10^5$
$-10^5\le x_i\le 10^5$
$1\le r_i\le 10^5$
All inputs are integers.

Output

Output the number of circles whose interior contains the point $(a,b)$ that lies inside the most circles, followed by a newline.

Sample

Sample 1
Input
7
2 1
4 2
5 1
3 1
7 2
9 2
6 1
Output
4

Source (the problem statement has been partially modified).

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。