int cmp(const void *a,const void *b)
{
struct point *c = (point *)a;
struct point *d = (point *)b;
if (calc(*c, *d, p[1]) < 0) return 1;
else if(!calc(*c, *d, p[1]) && dis(c -> x, c -> y, p[1].x, p[1].y) < dis(d -> x,d -> y,p[1].x,p[1].y)) return 1;
else return -1;
}