1769: King of human

Description [title]

There are n

Individual on the bridge. Bridge can be seen as a two-dimensional plane, then the location of each person can be represented by a coordinate.

Yazid would like to use a rectangular cover them all. He single rectangular predetermined area not exceed S

, And one side of the rectangle must be close to the railing (straight line Y = 0

)。

Please tell him that he wants to use at least a few rectangles to cover all of the human scene it?

[Enter]

This title contains multiple sets of data. A first line integer T

It indicates the number of data sets. Next, description of the sets of data sequentially,

For each test:

The first line 2

Integers n- , S

, Meaning see the description of the problem.

Next n

Rows of 2 non-negative integers X , Y

, Describe a person's horizontal and vertical coordinates.

[Output]

For each test, a line of a minimum integer number of rectangles to be used.

[Sample input]

1
6 4
2 1
4 1
5 1
5 4
7 1
6 4

[Sample Output]

3

【prompt】

[Data] scale

For 10% of the data, to ensure that n- . 8 , X 10 , S 20 is

For 30% of the data, to ensure that n- 18 is , X 700 , S 1024

For 90% of the data retention n-

To 100% of the data guarantee . T 10 , n- 100 , X 3,000,000 , . 1 Y S 20000

Guess you like

Origin www.cnblogs.com/betablewaloot/p/12194195.html