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_20613896_4319.cpp:4:25: error: stray '#' in program
     using namespace std;#define maxn 100001#define Max(a,b) (a)>(b)?(a):(b)#define Min(a,b) (a)<(b)?(a):(b) struct Node{    int x,y,z;}node[1005]; int gcd(int a,int b){    if(b==0) return a;    else return gcd(b,a%b);}int check2(int d,int l,int r){    if(l%d==0 || r%d==0) return 1;    else if(r/d>l/d) return 1;    else return 0;}int check(int i,int j){    if(node[i].y>node[j].z || node[j].y>node[i].z)    {        if(node[i].y>node[i].z) swap(i,j);        int d=gcd(node[i].x,node[j].x);        if(check2(d,node[j].y-node[i].z,node[j].z-node[i].y))            return 1;        else            return 0;    }    return 1;} int main(){    int n,i,j;    while(~scanf("%d",&n))    {        for(i=1;i<=n;i++)            scanf("%d %d %d",&node[i].x,&node[i].y,&node[i].z);         int flag=0;        for(i=1;i<=n;i++)        {            for(j=i+1;j<=n;j++)            {                if(check(i,j)) {flag=1;break;}                }            if(flag) break;        }         if(!flag)printf("Can Take off\n");        else printf("Cannot Take off\n");    }    return 0;}
                         ^
0_0_20613896_4319.cpp:4:44: error: stray '#' in program
     using namespace std;#define maxn 100001#define Max(a,b) (a)>(b)?(a):(b)#define Min(a,b) (a)<(b)?(a):(b) struct Node{    int x,y,z;}node[1005]; int gcd(int a,int b){    if(b==0) return a;    else return gcd(b,a%b);}int check2(int d,int l,int r){    if(l%d==0 || r%d==0) return 1;    else if(r/d>l/d) return 1;    else return 0;}int check(int i,int j){    if(node[i].y>node[j].z || node[j].y>node[i].z)    {        if(node[i].y>node[i].z) swap(i,j);        int d=gcd(node[i].x,node[j].x);        if(check2(d,node[j].y-node[i].z,node[j].z-node[i].y))            return 1;        else            return 0;    }    return 1;} int main(){    int n,i,j;    while(~scanf("%d",&n))    {        for(i=1;i<=n;i++)            scanf("%d %d %d",&node[i].x,&node[i].y,&node[i].z);         int flag=0;        for(i=1;i<=n;i++)        {            for(j=i+1;j<=n;j++)            {                if(check(i,j)) {flag=1;break;}                }            if(flag) break;        }         if(!flag)printf("Can Take off\n");        else printf("Cannot Take off\n");    }    return 0;}
                                            ^
0_0_20613896_4319.cpp:4:76: error: stray '#' in program
     using namespace std;#define maxn 100001#define Max(a,b) (a)>(b)?(a):(b)#define Min(a,b) (a)<(b)?(a):(b) struct Node{    int x,y,z;}node[1005]; int gcd(int a,int b){    if(b==0) return a;    else return gcd(b,a%b);}int check2(int d,int l,int r){    if(l%d==0 || r%d==0) return 1;    else if(r/d>l/d) return 1;    else return 0;}int check(int i,int j){    if(node[i].y>node[j].z || node[j].y>node[i].z)    {        if(node[i].y>node[i].z) swap(i,j);        int d=gcd(node[i].x,node[j].x);        if(check2(d,node[j].y-node[i].z,node[j].z-node[i].y))            return 1;        else            return 0;    }    return 1;} int main(){    int n,i,j;    while(~scanf("%d",&n))    {        for(i=1;i<=n;i++)            scanf("%d %d %d",&node[i].x,&node[i].y,&node[i].z);         int flag=0;        for(i=1;i<=n;i++)        {            for(j=i+1;j<=n;j++)            {                if(check(i,j)) {flag=1;break;}                }            if(flag) break;        }         if(!flag)printf("Can Take off\n");        else printf("Cannot Take off\n");    }    return 0;}
                                                                            ^
0_0_20613896_4319.cpp:4:26: error: 'define' does not name a type
     using namespace std;#define maxn 100001#define Max(a,b) (a)>(b)?(a):(b)#define Min(a,b) (a)<(b)?(a):(b) struct Node{    int x,y,z;}node[1005]; int gcd(int a,int b){    if(b==0) return a;    else return gcd(b,a%b);}int check2(int d,int l,int r){    if(l%d==0 || r%d==0) return 1;    else if(r/d>l/d) return 1;    else return 0;}int check(int i,int j){    if(node[i].y>node[j].z || node[j].y>node[i].z)    {        if(node[i].y>node[i].z) swap(i,j);        int d=gcd(node[i].x,node[j].x);        if(check2(d,node[j].y-node[i].z,node[j].z-node[i].y))            return 1;        else            return 0;    }    return 1;} int main(){    int n,i,j;    while(~scanf("%d",&n))    {        for(i=1;i<=n;i++)            scanf("%d %d %d",&node[i].x,&node[i].y,&node[i].z);         int flag=0;        for(i=1;i<=n;i++)        {            for(j=i+1;j<=n;j++)            {                if(check(i,j)) {flag=1;break;}                }            if(flag) break;        }         if(!flag)printf("Can Take off\n");        else printf("Cannot Take off\n");    }    return 0;}
                          ^
0_0_20613896_4319.cpp:4:136: error: 'node' does not name a type
     using namespace std;#define maxn 100001#define Max(a,b) (a)>(b)?(a):(b)#define Min(a,b) (a)<(b)?(a):(b) struct Node{    int x,y,z;}node[1005]; int gcd(int a,int b){    if(b==0) return a;    else return gcd(b,a%b);}int check2(int d,int l,int r){    if(l%d==0 || r%d==0) return 1;    else if(r/d>l/d) return 1;    else return 0;}int check(int i,int j){    if(node[i].y>node[j].z || node[j].y>node[i].z)    {        if(node[i].y>node[i].z) swap(i,j);        int d=gcd(node[i].x,node[j].x);        if(check2(d,node[j].y-node[i].z,node[j].z-node[i].y))            return 1;        else            return 0;    }    return 1;} int main(){    int n,i,j;    while(~scanf("%d",&n))    {        for(i=1;i<=n;i++)            scanf("%d %d %d",&node[i].x,&node[i].y,&node[i].z);         int flag=0;        for(i=1;i<=n;i++)        {            for(j=i+1;j<=n;j++)            {                if(check(i,j)) {flag=1;break;}                }            if(flag) break;        }         if(!flag)printf("Can Take off\n");        else printf("Cannot Take off\n");    }    return 0;}
                                                                                                                                        ^
0_0_20613896_4319.cpp: In function 'int check(int, int)':
0_0_20613896_4319.cpp:4:362: error: 'node' was not declared in this scope
     using namespace std;#define maxn 100001#define Max(a,b) (a)>(b)?(a):(b)#define Min(a,b) (a)<(b)?(a):(b) struct Node{    int x,y,z;}node[1005]; int gcd(int a,int b){    if(b==0) return a;    else return gcd(b,a%b);}int check2(int d,int l,int r){    if(l%d==0 || r%d==0) return 1;    else if(r/d>l/d) return 1;    else return 0;}int check(int i,int j){    if(node[i].y>node[j].z || node[j].y>node[i].z)    {        if(node[i].y>node[i].z) swap(i,j);        int d=gcd(node[i].x,node[j].x);        if(check2(d,node[j].y-node[i].z,node[j].z-node[i].y))            return 1;        else            return 0;    }    return 1;} int main(){    int n,i,j;    while(~scanf("%d",&n))    {        for(i=1;i<=n;i++)            scanf("%d %d %d",&node[i].x,&node[i].y,&node[i].z);         int flag=0;        for(i=1;i<=n;i++)        {            for(j=i+1;j<=n;j++)            {                if(check(i,j)) {flag=1;break;}                }            if(flag) break;        }         if(!flag)printf("Can Take off\n");        else printf("Cannot Take off\n");    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                          ^
0_0_20613896_4319.cpp: In function 'int main()':
0_0_20613896_4319.cpp:4:737: error: 'node' was not declared in this scope
     using namespace std;#define maxn 100001#define Max(a,b) (a)>(b)?(a):(b)#define Min(a,b) (a)<(b)?(a):(b) struct Node{    int x,y,z;}node[1005]; int gcd(int a,int b){    if(b==0) return a;    else return gcd(b,a%b);}int check2(int d,int l,int r){    if(l%d==0 || r%d==0) return 1;    else if(r/d>l/d) return 1;    else return 0;}int check(int i,int j){    if(node[i].y>node[j].z || node[j].y>node[i].z)    {        if(node[i].y>node[i].z) swap(i,j);        int d=gcd(node[i].x,node[j].x);        if(check2(d,node[j].y-node[i].z,node[j].z-node[i].y))            return 1;        else            return 0;    }    return 1;} int main(){    int n,i,j;    while(~scanf("%d",&n))    {        for(i=1;i<=n;i++)            scanf("%d %d %d",&node[i].x,&node[i].y,&node[i].z);         int flag=0;        for(i=1;i<=n;i++)        {            for(j=i+1;j<=n;j++)            {                if(check(i,j)) {flag=1;break;}                }            if(flag) break;        }         if(!flag)printf("Can Take off\n");        else printf("Cannot Take off\n");    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^


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-29 20:30:13, Gzip enabled