Time limit: 1 second Memory limit: 256 MB Mohammad Rezas, who passed his entrance exam,…
- User
Time limit: 1 second Memory limit: 256 MB Mohammad Rezas, who passed his entrance exam, wants to participate in all Quora programming competitions; But now, with the start of the hot season, he is engaged in installing a roof to prevent direct sunlight on his garden.
In the garden of Mohammad Rezas n There are n flowers that should not be exposed to direct sunlight. Mohammad Rezas wants k k to buy square sunshades of the same size and install them on his garden so that no direct sun shines on any flower; It means that every flower below should have at least one sunshade. He should install the sunshades so that their square sides are parallel to the sides of his garden. Parts of sunshades can overlap after installation.
Mohammad Rezas wants to buy sunshades with the shortest side length possible. By inputting the coordinates of the flowers and the number k k, output the minimum side length of the sunshades.
input In the first line, enter two numbers n n and k k represent the number of flowers in Mohammad Rezas's garden and the number of sunshades, respectively. Then in each of n n the next line, the coordinates of a flower as two integers x i , y i x i ,y i has come (The coordinates are given assuming that the sides of the garden are the coordinate axes.)
1 ≤ k < n ≤ 15 1≤k<n≤15
0 ≤ x i , y i ≤ 64
000 0 ≤ x i ,y i ≤64 000
output The output should contain a number that is equal to the shortest possible length for Mohammad Rezas sunshades.
Example Sample input 5 2 1 1 2 2 3 3 6 6 7 8 Plain text Sample output 2
- Assistant