#include #include #include typedef struct{ int x; int y; }*PBOD, BOD; int porovnej(const void *pa, const void *pb){ PBOD a = (PBOD) pa; PBOD b = (PBOD) pb; if ((*a).x == (*b).x) return ((*a).y > (*b).y); else return ((*a).x > (*b).x); } int porovnejy(const void *pa, const void *pb){ PBOD a = (PBOD) pa; PBOD b = (PBOD) pb; if ((*a).y == (*b).y) return ((*a).x > (*b).x); else return ((*a).y > (*b).y); } int main(void){ int numdeps; PBOD pbod; int i; int delka; scanf("%d\n", &numdeps); while (numdeps !=0){ if ((pbod=malloc(sizeof(BOD)*numdeps))==NULL) return 1; for (i=0; i