2067Grids

2067   Grids

题目描述

On an 1 × 1 grid,partition the length and width into 50 parts,forming 2500 unit grids with the same size.Now,given n circles with equal radius R on the grid.Find the total number of unit grids which are not covered by any of a circle.

A unit grid is covered by a circle,means that the distance between the center of the unit grid and the center of circle is less or equal R.

输入格式:

There will be multiple test cases.Each line of input contains a Integer n (1≤n≤100) and a decimal R (0.01≤R≤0.1).Follows n lines,each line describe the center of circle i,include two decimal xi, yi (0≤xi, yi≤1).

输出格式:

For each test case output a line,output the number of the points which are not covered.

输入样例 复制
1 0.02
0.03 0.03
1 0.10
0.952423 0.042419
输出样例 复制
2495
2454

说明

The picture for the first sample input.

1
1
通过提交
时空限制1000ms/128mb
题目来源
评测方式在线评测
题目类型
难        度