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_20611792_2124.cpp:4:25: error: stray '#' in program
     using namespace std;#define M 1000int num[M],a[M],b[M];int  c1[M],c2[M];#define mod 100#define LL long longint main(){    int n,m;    while(scanf("%d %d",&n,&m)!=EOF)    {        for(int i=0;i<n;i++)            cin>>a[i]>>b[i];         memset(c1,0,sizeof(c1));        memset(c2,0,sizeof(c2));         for(int i=a[0];i<=b[0];i++)        {            c1[i]=1;        }        for(int i=1;i<n;i++)        {            for(int j=0;j<=m;j++)            {                for(int k=a[i];k+j<=m&&k<=b[i];k++)                {                    c2[j+k]+=c1[j];                }            }            for(int j=0;j<=m;j++)            {                c1[j]=c2[j];                c2[j]=0;            }        }        cout<<c1[m]<<endl;    }    return 0;}
                         ^
0_0_20611792_2124.cpp:4:77: error: stray '#' in program
     using namespace std;#define M 1000int num[M],a[M],b[M];int  c1[M],c2[M];#define mod 100#define LL long longint main(){    int n,m;    while(scanf("%d %d",&n,&m)!=EOF)    {        for(int i=0;i<n;i++)            cin>>a[i]>>b[i];         memset(c1,0,sizeof(c1));        memset(c2,0,sizeof(c2));         for(int i=a[0];i<=b[0];i++)        {            c1[i]=1;        }        for(int i=1;i<n;i++)        {            for(int j=0;j<=m;j++)            {                for(int k=a[i];k+j<=m&&k<=b[i];k++)                {                    c2[j+k]+=c1[j];                }            }            for(int j=0;j<=m;j++)            {                c1[j]=c2[j];                c2[j]=0;            }        }        cout<<c1[m]<<endl;    }    return 0;}
                                                                             ^
0_0_20611792_2124.cpp:4:92: error: stray '#' in program
     using namespace std;#define M 1000int num[M],a[M],b[M];int  c1[M],c2[M];#define mod 100#define LL long longint main(){    int n,m;    while(scanf("%d %d",&n,&m)!=EOF)    {        for(int i=0;i<n;i++)            cin>>a[i]>>b[i];         memset(c1,0,sizeof(c1));        memset(c2,0,sizeof(c2));         for(int i=a[0];i<=b[0];i++)        {            c1[i]=1;        }        for(int i=1;i<n;i++)        {            for(int j=0;j<=m;j++)            {                for(int k=a[i];k+j<=m&&k<=b[i];k++)                {                    c2[j+k]+=c1[j];                }            }            for(int j=0;j<=m;j++)            {                c1[j]=c2[j];                c2[j]=0;            }        }        cout<<c1[m]<<endl;    }    return 0;}
                                                                                            ^
0_0_20611792_2124.cpp:4:26: error: 'define' does not name a type
     using namespace std;#define M 1000int num[M],a[M],b[M];int  c1[M],c2[M];#define mod 100#define LL long longint main(){    int n,m;    while(scanf("%d %d",&n,&m)!=EOF)    {        for(int i=0;i<n;i++)            cin>>a[i]>>b[i];         memset(c1,0,sizeof(c1));        memset(c2,0,sizeof(c2));         for(int i=a[0];i<=b[0];i++)        {            c1[i]=1;        }        for(int i=1;i<n;i++)        {            for(int j=0;j<=m;j++)            {                for(int k=a[i];k+j<=m&&k<=b[i];k++)                {                    c2[j+k]+=c1[j];                }            }            for(int j=0;j<=m;j++)            {                c1[j]=c2[j];                c2[j]=0;            }        }        cout<<c1[m]<<endl;    }    return 0;}
                          ^
0_0_20611792_2124.cpp:4:68: error: 'M' was not declared in this scope
     using namespace std;#define M 1000int num[M],a[M],b[M];int  c1[M],c2[M];#define mod 100#define LL long longint main(){    int n,m;    while(scanf("%d %d",&n,&m)!=EOF)    {        for(int i=0;i<n;i++)            cin>>a[i]>>b[i];         memset(c1,0,sizeof(c1));        memset(c2,0,sizeof(c2));         for(int i=a[0];i<=b[0];i++)        {            c1[i]=1;        }        for(int i=1;i<n;i++)        {            for(int j=0;j<=m;j++)            {                for(int k=a[i];k+j<=m&&k<=b[i];k++)                {                    c2[j+k]+=c1[j];                }            }            for(int j=0;j<=m;j++)            {                c1[j]=c2[j];                c2[j]=0;            }        }        cout<<c1[m]<<endl;    }    return 0;}
                                                                    ^
0_0_20611792_2124.cpp:4:74: error: 'M' was not declared in this scope
     using namespace std;#define M 1000int num[M],a[M],b[M];int  c1[M],c2[M];#define mod 100#define LL long longint main(){    int n,m;    while(scanf("%d %d",&n,&m)!=EOF)    {        for(int i=0;i<n;i++)            cin>>a[i]>>b[i];         memset(c1,0,sizeof(c1));        memset(c2,0,sizeof(c2));         for(int i=a[0];i<=b[0];i++)        {            c1[i]=1;        }        for(int i=1;i<n;i++)        {            for(int j=0;j<=m;j++)            {                for(int k=a[i];k+j<=m&&k<=b[i];k++)                {                    c2[j+k]+=c1[j];                }            }            for(int j=0;j<=m;j++)            {                c1[j]=c2[j];                c2[j]=0;            }        }        cout<<c1[m]<<endl;    }    return 0;}
                                                                          ^
0_0_20611792_2124.cpp:4:78: error: 'define' does not name a type
     using namespace std;#define M 1000int num[M],a[M],b[M];int  c1[M],c2[M];#define mod 100#define LL long longint main(){    int n,m;    while(scanf("%d %d",&n,&m)!=EOF)    {        for(int i=0;i<n;i++)            cin>>a[i]>>b[i];         memset(c1,0,sizeof(c1));        memset(c2,0,sizeof(c2));         for(int i=a[0];i<=b[0];i++)        {            c1[i]=1;        }        for(int i=1;i<n;i++)        {            for(int j=0;j<=m;j++)            {                for(int k=a[i];k+j<=m&&k<=b[i];k++)                {                    c2[j+k]+=c1[j];                }            }            for(int j=0;j<=m;j++)            {                c1[j]=c2[j];                c2[j]=0;            }        }        cout<<c1[m]<<endl;    }    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-17 06:21:05, Gzip enabled