/* E. Сини петна Дадени са N окръжности в равнината (0 #include using namespace std; double x[101], y[101], r[101]; int n; int dom[101]; double dist(double x1, double y1, double x2, double y2) { return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); } bool check(int n1, int n2) { double d1=dist(x[n1],y[n1],x[n2],y[n2]), d2=r[n1]+r[n2]; return d1> n; while (n > 0) { int k=0; for (int i=0; i> x[i] >> y[i] >> r[i]; if (i==0) dom[0]=0; else { int num=-1; for (int j=0; j=0) dom[i]=num; else { k++; dom[i]=k; } } } int ind[101]={0}; for (int i=0; i> n; } return 0; } -------------------------------------------------------- 2 1 1 2 10 10 2 3 0 0 5 1 1 2 2 2 4 5 1 1 2 2 2 2 3 3 2 4 4 2 5 5 2 5 -1.5 1 0.1 1.2 1.2 0.1 1.3 1.4 0.1 1.5 -2.3 0.1 0.2 0.0 100 6 0 0 0.1 5 5 1 6 6 2 7 7 3 8 8 4 100 100 1 33 18.467 6.334 2.5 19.169 15.724 1.478 29.358 26.962 2.464 5.705 28.145 2.281 16.827 9.961 0.491 2.995 11.942 4.827 5.436 32.391 1.604 3.902 0.153 0.292 12.382 17.421 1.716 19.718 19.895 5.447 21.726 14.771 1.538 1.869 19.912 2.667 26.299 17.035 9.894 28.703 23.811 3.322 30.333 17.673 4.664 15.141 7.711 2.253 6.868 25.547 2.644 32.662 32.757 2.037 12.859 8.723 9.741 27.529 0.778 12.316 3.035 22.19 1.842 0.288 30.106 9.04 8.942 19.264 2.648 27.446 23.805 1.89 6.729 24.37 1.35 15.006 31.101 2.393 3.548 19.629 1.623 24.084 19.954 1.756 11.84 4.966 7.376 13.931 26.308 1.944 32.439 24.626 1.323 5.537 21.538 1.118 2.082 22.929 1.541 50 18.467 6.334 2.65 19.169 15.724 1.1478 29.358 26.962 2.4464 5.705 28.145 2.3281 16.827 9.961 0.0491 2.995 11.942 0.4827 5.436 32.391 1.4604 3.902 0.153 0.0292 12.382 17.421 1.8716 19.718 19.895 0.5447 21.726 14.771 1.1538 1.869 19.912 2.5667 26.299 17.035 0.9894 28.703 23.811 3.1322 30.333 17.673 0.4664 15.141 7.711 2.8253 6.868 25.547 2.7644 32.662 32.757 2.0037 12.859 8.723 0.9741 27.529 0.778 1.2316 3.035 22.19 0.1842 0.288 30.106 0.904 8.942 19.264 2.2648 27.446 23.805 1.589 6.729 24.37 1.535 15.006 31.101 2.4393 3.548 19.629 1.2623 24.084 19.954 1.8756 11.84 4.966 0.7376 13.931 26.308 1.6944 32.439 24.626 1.1323 5.537 21.538 1.6118 2.082 22.929 1.6541 4.833 31.115 0.4639 29.658 22.704 0.993 13.977 2.306 3.1673 22.386 5.021 2.8745 26.924 19.072 0.627 5.829 26.777 1.5573 5.097 16.512 2.3986 13.29 9.161 1.8636 22.355 24.767 2.3655 15.574 4.031 1.2052 27.35 1.15 1.6941 21.724 13.966 0.343 31.107 30.191 1.8007 11.337 15.457 1.2287 27.753 10.383 1.4945 8.909 32.209 0.9758 24.221 18.588 0.6422 0 -------------------------------------------------------- 2 1 1 1 3 7 22 --------------------------------------------------------