#include #include #include #include int uzlu; int body_x[20100]; int body_y[20100]; typedef struct stred { stred * next; int dva_x; int dva_y; } stred; stred * first; char table[1000000]; int exists(int x, int y) { if (!table[(20000*(x+10000)+y+10000)%912313]) return 0; // for(int i=0; idva_x = body_x[0] - body_x[i] + 2*body_x[i]; act->dva_y = body_y[0] - body_y[i] + 2*body_y[i]; act->next = first; first = act; } for (int i=1; idva_x - body_x[i]; int pair_y = act->dva_y - body_y[i]; if (!exists(pair_x,pair_y)) { if (last == NULL) { first = act->next; free (act); act = first; } else { last->next = act->next; free(act); act = last->next; } } else { last = act; act = act->next; } } } if (first == NULL) { printf("This is a dangerous situation!\n"); } else { printf("V.I.P. should stay at (%.1f,%.1f).\n", ((float)first->dva_x)/2, ((float)first->dva_y)/2); } } int main(void) { for (;;) { scanf("%i", &uzlu); if (!uzlu) break; // bzero(table, 1000000); for (int i=0;i