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_20614343_31967.cpp:9:6: error: 'vec' does not name a type
      vec; bool cmp(DOT a, DOT b) {    if(a.x < b.x)        return true;    if(a.x > b.x)        return false;    return a.y <= b.y;} int son_judge(DOT t, Matrix m) {    int x1 = m.up.x;    int y1 = m.up.y;    int x2 = m.down.x;    int y2 = m.down.y;    if(t.x>=x1 && t.x<=x2 && t.y<=y1 && t.y>=y2) {        if(t.x>x1 && t.x<x2 && t.y<y1 && t.y>y2)            return 1;        return 0;    }    return -1;} int judge(int i, int j) {    DOT t1 = DOT(vec[i].up.x, vec[i].down.y);    DOT t2 = DOT(vec[i].down.x, vec[i].up.y);     int ok1 = son_judge(vec[i].up, vec[j]);    int ok2 = son_judge(vec[i].down, vec[j]);    int ok3 = son_judge(t1, vec[j]);    int ok4 = son_judge(t2, vec[j]);    if(ok1==1&&ok2==1&&ok3==1&&ok4==1)        return 1;    if(ok1==-1&&ok2==-1&&ok3==-1&&ok4==-1)        return -1;    return 0;} int main() {     int n;    while(scanf("%d", &n) && n) {        if(n < 8) {            puts("imp");            continue;        }        vec.clear();        memset(vis, 0, sizeof(vis));        for(int i=0; i<n; ++i) {            scanf("%d%d", &dot[i].x, &dot[i].y);            vis[dot[i].x][dot[i].y] = true;        }        sort(dot, dot+n, cmp);        int x1, x2, y1, y2;        for(int i=0; i<n; ++i) {            x1 = dot[i].x;            y1 = dot[i].y;            for(int j=i+1; j<n; ++j) {                x2 = dot[j].x;                y2 = dot[j].y;                if(x2<=x1 || y2>=y1) continue;                if(vis[x2][y1] && vis[x1][y2]) {                    vec.push_back(Matrix(dot[i], dot[j]));                }            }        }        int ans = 0;        for(int i=0; i<vec.size(); ++i) {                    for(int j=i+1; j<vec.size(); ++j) {                int tmp1 = judge(i, j);                int tmp2 = judge(j, i);                if(tmp1 == 1 || tmp2 == 1) {                    ans = max(ans, max(area(vec[i]), area(vec[j])));                } else if(tmp1 == -1 && tmp2 == -1) {                        ans = max(ans, area(vec[i])+area(vec[j]));                }            }        }        if(ans == 0)            puts("imp");        else printf("%d\n", ans);    }    return 0;}
      ^
0_0_20614343_31967.cpp:9:20: error: 'DOT' was not declared in this scope
      vec; bool cmp(DOT a, DOT b) {    if(a.x < b.x)        return true;    if(a.x > b.x)        return false;    return a.y <= b.y;} int son_judge(DOT t, Matrix m) {    int x1 = m.up.x;    int y1 = m.up.y;    int x2 = m.down.x;    int y2 = m.down.y;    if(t.x>=x1 && t.x<=x2 && t.y<=y1 && t.y>=y2) {        if(t.x>x1 && t.x<x2 && t.y<y1 && t.y>y2)            return 1;        return 0;    }    return -1;} int judge(int i, int j) {    DOT t1 = DOT(vec[i].up.x, vec[i].down.y);    DOT t2 = DOT(vec[i].down.x, vec[i].up.y);     int ok1 = son_judge(vec[i].up, vec[j]);    int ok2 = son_judge(vec[i].down, vec[j]);    int ok3 = son_judge(t1, vec[j]);    int ok4 = son_judge(t2, vec[j]);    if(ok1==1&&ok2==1&&ok3==1&&ok4==1)        return 1;    if(ok1==-1&&ok2==-1&&ok3==-1&&ok4==-1)        return -1;    return 0;} int main() {     int n;    while(scanf("%d", &n) && n) {        if(n < 8) {            puts("imp");            continue;        }        vec.clear();        memset(vis, 0, sizeof(vis));        for(int i=0; i<n; ++i) {            scanf("%d%d", &dot[i].x, &dot[i].y);            vis[dot[i].x][dot[i].y] = true;        }        sort(dot, dot+n, cmp);        int x1, x2, y1, y2;        for(int i=0; i<n; ++i) {            x1 = dot[i].x;            y1 = dot[i].y;            for(int j=i+1; j<n; ++j) {                x2 = dot[j].x;                y2 = dot[j].y;                if(x2<=x1 || y2>=y1) continue;                if(vis[x2][y1] && vis[x1][y2]) {                    vec.push_back(Matrix(dot[i], dot[j]));                }            }        }        int ans = 0;        for(int i=0; i<vec.size(); ++i) {                    for(int j=i+1; j<vec.size(); ++j) {                int tmp1 = judge(i, j);                int tmp2 = judge(j, i);                if(tmp1 == 1 || tmp2 == 1) {                    ans = max(ans, max(area(vec[i]), area(vec[j])));                } else if(tmp1 == -1 && tmp2 == -1) {                        ans = max(ans, area(vec[i])+area(vec[j]));                }            }        }        if(ans == 0)            puts("imp");        else printf("%d\n", ans);    }    return 0;}
                    ^
0_0_20614343_31967.cpp:9:27: error: 'DOT' was not declared in this scope
      vec; bool cmp(DOT a, DOT b) {    if(a.x < b.x)        return true;    if(a.x > b.x)        return false;    return a.y <= b.y;} int son_judge(DOT t, Matrix m) {    int x1 = m.up.x;    int y1 = m.up.y;    int x2 = m.down.x;    int y2 = m.down.y;    if(t.x>=x1 && t.x<=x2 && t.y<=y1 && t.y>=y2) {        if(t.x>x1 && t.x<x2 && t.y<y1 && t.y>y2)            return 1;        return 0;    }    return -1;} int judge(int i, int j) {    DOT t1 = DOT(vec[i].up.x, vec[i].down.y);    DOT t2 = DOT(vec[i].down.x, vec[i].up.y);     int ok1 = son_judge(vec[i].up, vec[j]);    int ok2 = son_judge(vec[i].down, vec[j]);    int ok3 = son_judge(t1, vec[j]);    int ok4 = son_judge(t2, vec[j]);    if(ok1==1&&ok2==1&&ok3==1&&ok4==1)        return 1;    if(ok1==-1&&ok2==-1&&ok3==-1&&ok4==-1)        return -1;    return 0;} int main() {     int n;    while(scanf("%d", &n) && n) {        if(n < 8) {            puts("imp");            continue;        }        vec.clear();        memset(vis, 0, sizeof(vis));        for(int i=0; i<n; ++i) {            scanf("%d%d", &dot[i].x, &dot[i].y);            vis[dot[i].x][dot[i].y] = true;        }        sort(dot, dot+n, cmp);        int x1, x2, y1, y2;        for(int i=0; i<n; ++i) {            x1 = dot[i].x;            y1 = dot[i].y;            for(int j=i+1; j<n; ++j) {                x2 = dot[j].x;                y2 = dot[j].y;                if(x2<=x1 || y2>=y1) continue;                if(vis[x2][y1] && vis[x1][y2]) {                    vec.push_back(Matrix(dot[i], dot[j]));                }            }        }        int ans = 0;        for(int i=0; i<vec.size(); ++i) {                    for(int j=i+1; j<vec.size(); ++j) {                int tmp1 = judge(i, j);                int tmp2 = judge(j, i);                if(tmp1 == 1 || tmp2 == 1) {                    ans = max(ans, max(area(vec[i]), area(vec[j])));                } else if(tmp1 == -1 && tmp2 == -1) {                        ans = max(ans, area(vec[i])+area(vec[j]));                }            }        }        if(ans == 0)            puts("imp");        else printf("%d\n", ans);    }    return 0;}
                           ^
0_0_20614343_31967.cpp:9:32: error: expression list treated as compound expression in initializer [-fpermissive]
      vec; bool cmp(DOT a, DOT b) {    if(a.x < b.x)        return true;    if(a.x > b.x)        return false;    return a.y <= b.y;} int son_judge(DOT t, Matrix m) {    int x1 = m.up.x;    int y1 = m.up.y;    int x2 = m.down.x;    int y2 = m.down.y;    if(t.x>=x1 && t.x<=x2 && t.y<=y1 && t.y>=y2) {        if(t.x>x1 && t.x<x2 && t.y<y1 && t.y>y2)            return 1;        return 0;    }    return -1;} int judge(int i, int j) {    DOT t1 = DOT(vec[i].up.x, vec[i].down.y);    DOT t2 = DOT(vec[i].down.x, vec[i].up.y);     int ok1 = son_judge(vec[i].up, vec[j]);    int ok2 = son_judge(vec[i].down, vec[j]);    int ok3 = son_judge(t1, vec[j]);    int ok4 = son_judge(t2, vec[j]);    if(ok1==1&&ok2==1&&ok3==1&&ok4==1)        return 1;    if(ok1==-1&&ok2==-1&&ok3==-1&&ok4==-1)        return -1;    return 0;} int main() {     int n;    while(scanf("%d", &n) && n) {        if(n < 8) {            puts("imp");            continue;        }        vec.clear();        memset(vis, 0, sizeof(vis));        for(int i=0; i<n; ++i) {            scanf("%d%d", &dot[i].x, &dot[i].y);            vis[dot[i].x][dot[i].y] = true;        }        sort(dot, dot+n, cmp);        int x1, x2, y1, y2;        for(int i=0; i<n; ++i) {            x1 = dot[i].x;            y1 = dot[i].y;            for(int j=i+1; j<n; ++j) {                x2 = dot[j].x;                y2 = dot[j].y;                if(x2<=x1 || y2>=y1) continue;                if(vis[x2][y1] && vis[x1][y2]) {                    vec.push_back(Matrix(dot[i], dot[j]));                }            }        }        int ans = 0;        for(int i=0; i<vec.size(); ++i) {                    for(int j=i+1; j<vec.size(); ++j) {                int tmp1 = judge(i, j);                int tmp2 = judge(j, i);                if(tmp1 == 1 || tmp2 == 1) {                    ans = max(ans, max(area(vec[i]), area(vec[j])));                } else if(tmp1 == -1 && tmp2 == -1) {                        ans = max(ans, area(vec[i])+area(vec[j]));                }            }        }        if(ans == 0)            puts("imp");        else printf("%d\n", ans);    }    return 0;}
                                ^
0_0_20614343_31967.cpp:9:34: error: expected ',' or ';' before '{' token
      vec; bool cmp(DOT a, DOT b) {    if(a.x < b.x)        return true;    if(a.x > b.x)        return false;    return a.y <= b.y;} int son_judge(DOT t, Matrix m) {    int x1 = m.up.x;    int y1 = m.up.y;    int x2 = m.down.x;    int y2 = m.down.y;    if(t.x>=x1 && t.x<=x2 && t.y<=y1 && t.y>=y2) {        if(t.x>x1 && t.x<x2 && t.y<y1 && t.y>y2)            return 1;        return 0;    }    return -1;} int judge(int i, int j) {    DOT t1 = DOT(vec[i].up.x, vec[i].down.y);    DOT t2 = DOT(vec[i].down.x, vec[i].up.y);     int ok1 = son_judge(vec[i].up, vec[j]);    int ok2 = son_judge(vec[i].down, vec[j]);    int ok3 = son_judge(t1, vec[j]);    int ok4 = son_judge(t2, vec[j]);    if(ok1==1&&ok2==1&&ok3==1&&ok4==1)        return 1;    if(ok1==-1&&ok2==-1&&ok3==-1&&ok4==-1)        return -1;    return 0;} int main() {     int n;    while(scanf("%d", &n) && n) {        if(n < 8) {            puts("imp");            continue;        }        vec.clear();        memset(vis, 0, sizeof(vis));        for(int i=0; i<n; ++i) {            scanf("%d%d", &dot[i].x, &dot[i].y);            vis[dot[i].x][dot[i].y] = true;        }        sort(dot, dot+n, cmp);        int x1, x2, y1, y2;        for(int i=0; i<n; ++i


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-09-28 11:20:15, Gzip enabled