LightOJ - 1016
Description
You can assume that the rope is sufficiently large. Now Samee wants to clean the room with minimum number of moves. Since he already had a contest, his head is messy. So, help him. Input Input starts with an integer T (≤ 15), denoting the number of test cases. Each case starts with a blank line. The next line contains two integers N (1 ≤ N ≤ 50000) and w (1 ≤ w ≤ 10000), means that there are N dust points. Each of the next N lines will contain two integers:xi yi, denoting coordinates of the dusts. You can assume that (-109 ≤ xi, yi ≤ 109) and all points are distinct. Output For each case print the case number and the minimum number of moves. Sample Input 2
3 2 0 0 20 2 30 2
3 1 0 0 20 2 30 2 Sample Output Case 1: 1 Case 2: 2 Source
Problem Setter: Muhammad Rifayat Samee
Special Thanks: Jane Alam Jan (Description, Solution, Dataset)
//题意:
给你一个n,表示有n个点,再给出一个w表示一个刷子的宽度(刷子平行于x轴刷),问最少刷几次可以把所有点刷完
//思路:
直接模拟就行了,水题
|
LightOJ - 1016 Brush (II) (模拟)水
最新推荐文章于 2017-09-06 21:37:25 发布