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_20611922_10560.cpp:3:10: error: stray '#' in program
     b?a:b#define MIN(a,b) a<b?a:b#include <math.h>using namespace std;int f(int a,int b,int c){    int mark=0;    int sum1,sum2,sum3;        sum1=sum2=sum3=INF;    if((a-b)%3==0)    {        mark=1;        sum1=MAX(a,b);    }    if((a-c)%3==0)    {        mark=1;        sum2=MAX(a,c);    }    if((b-c)%3==0)    {        mark=1;        sum3=MAX(b,c);    }    if(mark==0)        return 0;    else        return MIN(MIN(sum1,sum2),sum3);}int main(){    int y,b,r,sum;    while(cin>>y>>b>>r)    {        sum=f(y,b,r);        if(sum==0)            cout<<"):"<<endl;        else                cout<<sum<<endl;    }    return 0;}
          ^
0_0_20611922_10560.cpp:3:34: error: stray '#' in program
     b?a:b#define MIN(a,b) a<b?a:b#include <math.h>using namespace std;int f(int a,int b,int c){    int mark=0;    int sum1,sum2,sum3;        sum1=sum2=sum3=INF;    if((a-b)%3==0)    {        mark=1;        sum1=MAX(a,b);    }    if((a-c)%3==0)    {        mark=1;        sum2=MAX(a,c);    }    if((b-c)%3==0)    {        mark=1;        sum3=MAX(b,c);    }    if(mark==0)        return 0;    else        return MIN(MIN(sum1,sum2),sum3);}int main(){    int y,b,r,sum;    while(cin>>y>>b>>r)    {        sum=f(y,b,r);        if(sum==0)            cout<<"):"<<endl;        else                cout<<sum<<endl;    }    return 0;}
                                  ^
0_0_20611922_10560.cpp:2:22: error: stray '#' in program
     #define INF 1<<30#define MAX(a,b) a>
                      ^
0_0_20611922_10560.cpp:3:157: note: in expansion of macro 'INF'
     b?a:b#define MIN(a,b) a<b?a:b#include <math.h>using namespace std;int f(int a,int b,int c){    int mark=0;    int sum1,sum2,sum3;        sum1=sum2=sum3=INF;    if((a-b)%3==0)    {        mark=1;        sum1=MAX(a,b);    }    if((a-c)%3==0)    {        mark=1;        sum2=MAX(a,c);    }    if((b-c)%3==0)    {        mark=1;        sum3=MAX(b,c);    }    if(mark==0)        return 0;    else        return MIN(MIN(sum1,sum2),sum3);}int main(){    int y,b,r,sum;    while(cin>>y>>b>>r)    {        sum=f(y,b,r);        if(sum==0)            cout<<"):"<<endl;        else                cout<<sum<<endl;    }    return 0;}
                                                                                                                                                             ^
0_0_20611922_10560.cpp:3:5: error: 'b' does not name a type
     b?a:b#define MIN(a,b) a<b?a:b#include <math.h>using namespace std;int f(int a,int b,int c){    int mark=0;    int sum1,sum2,sum3;        sum1=sum2=sum3=INF;    if((a-b)%3==0)    {        mark=1;        sum1=MAX(a,b);    }    if((a-c)%3==0)    {        mark=1;        sum2=MAX(a,c);    }    if((b-c)%3==0)    {        mark=1;        sum3=MAX(b,c);    }    if(mark==0)        return 0;    else        return MIN(MIN(sum1,sum2),sum3);}int main(){    int y,b,r,sum;    while(cin>>y>>b>>r)    {        sum=f(y,b,r);        if(sum==0)            cout<<"):"<<endl;        else                cout<<sum<<endl;    }    return 0;}
     ^
0_0_20611922_10560.cpp: In function 'int f(int, int, int)':
0_0_20611922_10560.cpp:2:23: error: expected ';' before 'define'
     #define INF 1<<30#define MAX(a,b) a>
                       ^
0_0_20611922_10560.cpp:3:157: note: in expansion of macro 'INF'
     b?a:b#define MIN(a,b) a<b?a:b#include <math.h>using namespace std;int f(int a,int b,int c){    int mark=0;    int sum1,sum2,sum3;        sum1=sum2=sum3=INF;    if((a-b)%3==0)    {        mark=1;        sum1=MAX(a,b);    }    if((a-c)%3==0)    {        mark=1;        sum2=MAX(a,c);    }    if((b-c)%3==0)    {        mark=1;        sum3=MAX(b,c);    }    if(mark==0)        return 0;    else        return MIN(MIN(sum1,sum2),sum3);}int main(){    int y,b,r,sum;    while(cin>>y>>b>>r)    {        sum=f(y,b,r);        if(sum==0)            cout<<"):"<<endl;        else                cout<<sum<<endl;    }    return 0;}
                                                                                                                                                             ^
0_0_20611922_10560.cpp:3:219: error: 'MAX' was not declared in this scope
     b?a:b#define MIN(a,b) a<b?a:b#include <math.h>using namespace std;int f(int a,int b,int c){    int mark=0;    int sum1,sum2,sum3;        sum1=sum2=sum3=INF;    if((a-b)%3==0)    {        mark=1;        sum1=MAX(a,b);    }    if((a-c)%3==0)    {        mark=1;        sum2=MAX(a,c);    }    if((b-c)%3==0)    {        mark=1;        sum3=MAX(b,c);    }    if(mark==0)        return 0;    else        return MIN(MIN(sum1,sum2),sum3);}int main(){    int y,b,r,sum;    while(cin>>y>>b>>r)    {        sum=f(y,b,r);        if(sum==0)            cout<<"):"<<endl;        else                cout<<sum<<endl;    }    return 0;}
                                                                                                                                                                                                                           ^
0_0_20611922_10560.cpp:3:284: error: 'MAX' was not declared in this scope
     b?a:b#define MIN(a,b) a<b?a:b#include <math.h>using namespace std;int f(int a,int b,int c){    int mark=0;    int sum1,sum2,sum3;        sum1=sum2=sum3=INF;    if((a-b)%3==0)    {        mark=1;        sum1=MAX(a,b);    }    if((a-c)%3==0)    {        mark=1;        sum2=MAX(a,c);    }    if((b-c)%3==0)    {        mark=1;        sum3=MAX(b,c);    }    if(mark==0)        return 0;    else        return MIN(MIN(sum1,sum2),sum3);}int main(){    int y,b,r,sum;    while(cin>>y>>b>>r)    {        sum=f(y,b,r);        if(sum==0)            cout<<"):"<<endl;        else                cout<<sum<<endl;    }    return 0;}
                                                                                                                                                                                                                                                                                            ^
0_0_20611922_10560.cpp:3:349: error: 'MAX' was not declared in this scope
     b?a:b#define MIN(a,b) a<b?a:b#include <math.h>using namespace std;int f(int a,int b,int c){    int mark=0;    int sum1,sum2,sum3;        sum1=sum2=sum3=INF;    if((a-b)%3==0)    {        mark=1;        sum1=MAX(a,b);    }    if((a-c)%3==0)    {        mark=1;        sum2=MAX(a,c);    }    if((b-c)%3==0)    {        mark=1;        sum3=MAX(b,c);    }    if(mark==0)        return 0;    else        return MIN(MIN(sum1,sum2),sum3);}int main(){    int y,b,r,sum;    while(cin>>y>>b>>r)    {        sum=f(y,b,r);        if(sum==0)            cout<<"):"<<endl;        else                cout<<sum<<endl;    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                             ^
0_0_20611922_10560.cpp:3:428: error: 'MIN' was not declared in this scope
     b?a:b#define MIN(a,b) a<b?a:b#include <math.h>using namespace std;int f(int a,int b,int c){    int mark=0;    int sum1,sum2,sum3;        sum1=sum2=sum3=INF;    if((a-b)%3==0)    {        mark=1;        sum1=MAX(a,b);    }    if((a-c)%3==0)    {        mark=1;        sum2=MAX(a,c);    }    if((b-c)%3==0)    {        mark=1;        sum3=MAX(b,c);    }    if(mark==0)        return 0;    else        return MIN(MIN(sum1,sum2),sum3);}int main(){    int y,b,r,sum;    while(cin>>y>>b>>r)    {        sum=f(y,b,r);        if(sum==0)            cout<<"):"<<endl;        else                cout<<sum<<endl;    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                            ^
0_0_20611922_10560.cpp:3:434: error: 'MIN' was not declared in this scope
     b?a:b#define MIN(a,b) a<b?a:b#include <math.h>using namespace std;int f(int a,int b,int c){    int mark=0;    int sum1,sum2,sum3;        sum1=sum2=sum3=INF;    if((a-b)%3==0)    {        mark=1;        sum1=MAX(a,b);    }    if((a-c)%3==0)    {        mark=1;        sum2=MAX(a,c);    }    if((b-c)%3==0)    {        mark=1;        sum3=MAX(b,c);    }    if(mark==0)        return 0;    else        return MIN(MIN(sum1,sum2),sum3);}int main(){    int y,b,r,sum;    while(cin>>y>>b>>r)    {        sum=f(y,b,r);        if(sum==0)            cout<<"):"<<endl;        else                cout<<sum<<endl;    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                  ^
0_0_20611922_10560.cpp:3:434: error: redeclaration of '<typeprefixerror>MIN'
0_0_20611922_10560.cpp:3:428: note: previous declaration '<typeprefixerror>MIN'
     b?a:b#define MIN(a,b) a<b?a:b#include <math.h>using namespace std;int f(int a,int b,int c){    int mark=0;    int sum1,sum2,sum3;        sum1=sum2=sum3=INF;    if((a-b)%3==0)    {        mark=1;        sum1=MAX(a,b);    }    if((a-c)%3==0)    {        mark=1;        sum2=MAX(a,c);    }    if((b-c)%3==0)    {        mark=1;        sum3=MAX(b,c);    }    if(mark==0)        return 0;    else        return MIN(MIN(sum1,sum2),sum3);}int main(){    int y,b,r,sum;    while(cin>>y>>b>>r)    {        sum=f(y,b,r);        if(sum==0)            cout<<"):"<<endl;        else      


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-23 02:45:57, Gzip enabled