#include #include int n; #define min(a,b) ((ab) ? a : b) typedef struct { int x; int y; } TCoord; TCoord poleX[100010]; TCoord poleY[100010]; int compareX(const void* arg1, const void* arg2) { TCoord b1 = *(TCoord*)(arg1); TCoord b2 = *(TCoord*)(arg1); if (b1.xb2.x) return 1; if (b1.yb2.y) return 1; return 0; } int compareY(const void* arg1, const void* arg2) { TCoord b1 = *(TCoord*)(arg1); TCoord b2 = *(TCoord*)(arg1); if (b1.yb2.y) return 1; if (b1.xb2.x) return 1; return 0; } int alg() { return 2*((poleX[n-1].x-poleX[0].x) + (poleY[n-1].y-poleY[0].y)); } int main() { for (;;) { scanf("%d\n", &n); if (n==0) break; int x, y; int maxX = -1; int minX = 10001; int maxY = -1; int minY = 10001; for (int i=0; i