#11157. [USACO14DEC] Cow Jog G

    ID: 11157 传统题 1000ms 125MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>P4873贪心2014USACO树状数组离散化Dilworth 定理STL

[USACO14DEC] Cow Jog G

[USACO14DEC] Cow Jog G

题目描述

Farmer John's $N$ cows $(1 <= N

The track is divided into lanes so that cows may move past each other. No two cows in the same lane may ever occupy the same position. Farmer John doesn't want any cow to have to change lanes or adjust speed, and he wonders how many lanes he will need to accomplish this if the cows are going to run for TT minutes (1<=T<=1,000,000,000).(1 <= T <= 1,000,000,000).

输入格式

The first line of input contains $N$ and $T$.

The following NN lines each contain the initial position and speed of a single cow. Position is a nonnegative integer and speed is a positive integer; both numbers are at most 1 billion. All cows start at distinct positions, and these will be given in increasing order in the input.

输出格式

A single integer indicating the minimum number of lanes necessary so that no two cows in the same lane ever occupy the same location (including at time $T$).
5 3
0 1
1 2
2 3
3 2
6 1
3

提示

(暂无提示) 标签: P4873|贪心|2014|USACO|树状数组|离散化|Dilworth 定理|STL

来源

P4873|[USACO14DEC] Cow Jog G