F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_31790458_8369.cpp:1:2619: fatal error: GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stdc++.h>usin: Invalid argument
 #include<bits/stdc++.h>using namespace std;typedef long long LL;typedef unsigned long long ULL; #define rep(i,a,b) for(int i=a;i<b;++i)#define per(i,a,b) for(int i=b-1;i>=a;--i) struct Point{    int x,y;    Point(int _x=0,int _y=0){        x=_x,y=_y;    }    bool operator<(const Point& b)const{        if(x==b.x)return y<b.y;        return x<b.x;    }    bool operator==(Point b){        return x==b.x&&y==b.y;    }}p[100]; int ans;int mat[210][210]; int is_ok(Point a,Point b,Point c,Point d){//内含     if(a.x>c.x&&a.y<c.y&&b.x<d.x&&b.y>d.y)return -1;    if(c.x>a.x&&c.y<a.y&&d.x<b.x&&d.y>b.y)return -1;//相交     int x1=(a.x+b.x),y1=(a.y+b.y);    int x2=(c.x+d.x),y2=(c.y+d.y);    int dx=abs(x2-x1),dy=abs(y2-y1);    int x=abs(b.x-a.x)+abs(d.x-c.x);    int y=abs(b.y-a.y)+abs(d.y-c.y);    if(dx<=x&&dy<=y)return 0;//相离    return 1;} int check(Point a,Point b,Point c,Point d){    if(a.x>b.x)swap(a,b);    if(c.x>d.x)swap(c,d);    int res=0;    Point aa=a,bb=b,cc=c,dd=d;    if(b.y>a.y){        if(!mat[aa.x][bb.y])return 0;        a=Point(aa.x,bb.y);        if(!mat[bb.x][aa.y])return 0;        b=Point(bb.x,aa.y);    }     if(!mat[a.x][b.y])return 0;    if(!mat[b.x][a.y])return 0;    //printf("*(%d,%d) (%d,%d) (%d,%d) (%d,%d)\n",a.x,a.y,b.x,b.y,c.x,c.y,d.x,d.y);    if(d.y>c.y){        if(!mat[cc.x][dd.y])return 0;        c=Point(cc.x,dd.y);        if(!mat[dd.x][cc.y])return 0;        d=Point(dd.x,cc.y);    }    if(!mat[c.x][d.y])return 0;    if(!mat[d.x][c.y])return 0;     int t=is_ok(a,b,c,d);    if(t==0)return 0;    else if(t==-1){  res=max(abs(b.x-a.x)*abs(a.y-b.y),abs(d.x-c.x)*abs(c.y-d.y));    }    else{  res+=abs(b.x-a.x)*abs(a.y-b.y);  res+=abs(d.x-c.x)*abs(c.y-d.y);  //return res;    }    return res;   // printf("res:%d\n",res); } int main(){    //freopen("123.txt","w",stdout);    int n;    while(scanf("%d",&n)==1&&n){        memset(mat,0,sizeof(mat));        ans=0;        rep(i,0,n){            int x,y;            scanf("%d %d",&x,&y);            mat[x][y]=1;            p[i]=Point(x,y);        }         for(int a=0;a<n;a++){            for(int b=0;b<n;b++){                if(b!=a)                for(int c=0;c<n;c++){                    if(c!=a&&c!=b)                    for(int d=0;d<n;d++){                        if(d!=a&&d!=b&&d!=c){                            if(p[a].x==p[b].x||p[a].y==p[b].y||p[c].x==p[d].x||p[c].y==p[d].y)continue;                            ans=max(ans,check(p[a],p[b],p[c],p[d]));                        }                    }                }            }        }         if(!ans)printf("imp\n");        else printf("%d\n",ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ^
compilation terminated.


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-26 11:59:00, Gzip enabled