CF527D Clique Problem

题目描述

数轴上有 $n$ 个点,第 $i$ 个点的坐标为 $x_i$,权值为 $w_i$。两个点 $i,j$ 之间存在一条边当且仅当 $|x_i-x_j|\geq w_i+w_j$ 。 你需要求出这张图的最大团的点数。 团的定义:两两之间有边的顶点集合。

输入格式

第一行一个整数 $n$($1\le n\le 2\times10^5$),接下来 $n$ 行每行两个整数 $x_i,w_i$($0\le x_i\le10^9,1\le w_i\le10^9$)。

输出格式

一行一个整数表示答案。

说明/提示

If you happen to know how to solve this problem without using the specific properties of the graph formulated in the problem statement, then you are able to get a prize of one million dollars! The picture for the sample test. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF527D/e35cdf8269543954d4516503def437e6acf8de2a.png)