#include <stdio.h>
int main()
{
double N, a, x, y, i, in;
while (1)
{
scanf("%lf %lf", &N, &a);
if (N == 0 && a == 0) break;
in = 0;
for (i = 0 ; i < N; i++)
{
scanf("%lf %lf", &x, &y);
if (x*x + y*y < a*a && x*x + (a-y)*(a-y) < a*a &&
(a-x)*(a-x) + (a-y)*(a-y) < a*a && (a-x)*(a-x) + y*y < a*a)
in ++;
}
printf("%.5lf\n", (in/N)*a*a);
}
return 0;
}
回目錄
回首頁
沒有留言 :
張貼留言