P2698 [USACO12MAR] Flowerpot S
题目描述
Farmer John has been having trouble making his plants grow, and needs your help to water them properly. You are given the locations of N raindrops (1
输入格式
无
输出格式
无
说明/提示
有 $4$ 滴水,$(6,3)$ ,$(2,4)$ ,$(4,10)$ ,$(12,15)$ 。水滴必须用至少 $5$ 秒时间落入花盆。花盆的宽度为 $2$ 是必须且足够的。把花盆放在 $x=4\dots6$ 的位置,它可以接到 $1$ 和 $3$ 水滴, 之间的时间差为 $10-3=7$ 满足条件。
**【数据范围】**
$40\%$ 的数据:$1 \le N \le 1000$ ,$1 \le D \le 2000$ 。
$100\%$ 的数据:$1 \le N \le 10 ^ 5$ ,$1 \le D \le 10 ^ 6$ ,$0\le x,y\le10^6$ 。