#include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i = 0; i < (n); ++i) #define FOR(i,a,b) for(int i = (a); i <= (b); ++i) #define FORD(i,a,b) for(int i = (a); i >= (b); --i) #define PRINTF(args...) printf(args) // #define PRINTF(args...) struct punkt { double x,y; punkt(){} punkt(double xx, double yy): x(xx), y(yy){} double dist(punkt co) { return sqrt((x-co.x)*(x-co.x) + (y-co.y)*(y-co.y)); } double norm() const { return x*x+y*y; } punkt r90() { return punkt(-y, x); } }; inline punkt operator-(const punkt &a, const punkt &b) { return punkt(a.x-b.x, a.y-b.y); } inline punkt operator+(const punkt &a, const punkt &b) { return punkt(a.x+b.x, a.y+b.y); } inline punkt operator*(const punkt &a, double f) { return punkt(a.x*f, a.y*f); } inline punkt operator/(const punkt &a, double f) { return punkt(a.x/f, a.y/f); } const int maxn=2101; punkt T[maxn]; int ziomy[maxn][maxn]; int cnts[maxn]; double R; // znajdze 2 okresgi o promienniu R wyznaczone przez A,B void find_kolo(punkt A, punkt B, punkt wynik[]) { double r1 = R, r2 = R; // R punkt d(B-A); double dist = d.norm(); r1 *= r1/dist; r2 *= r2/dist; double a = (r1-r2+1)*0.5; punkt p = A + d*a, offset = d.r90()*sqrt(r1 - a*a); //printf("Aaaaaa: %lf %lf\n", p.x, p.y, offset.x, offset.y); wynik[0] = p+offset; wynik[1] = p-offset; } int main() { int n,r; while (true) { scanf("%d%d", &n, &r); R=r+0.00005; if (n==0 && r==0) break; for (int i=0; i T[i].dist(T[j])) ziomy[i][cnts[i]++] = j; } } int best = 0; for (int i=0; i