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_20613634_10116.cpp:8:25: error: stray '#' in program
     using namespace std;#define N 1050#define mod 100000007 int dp[N][N*2][2]; int main (){         memset(dp,0,sizeof(dp));        dp[1][1][0]=1;        dp[1][2][1]=1;         for(int i=1;i<=1000;++i)        {            for(int j=1;j<=2*i;++j)            {                dp[i+1][j][0]=(dp[i+1][j][0]+dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+1][0]=(dp[i+1][j+1][0]+dp[i][j][1]+dp[i][j][0])%mod;                dp[i+1][j][1]=(dp[i+1][j][1]+dp[i][j][1])%mod;                dp[i+1][j+1][1]=(dp[i+1][j+1][1]+2*dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+2][1]=(dp[i+1][j+2][1]+dp[i][j][0]+dp[i][j][1])%mod;             }        }            int n,k;    int t;scanf("%d",&t);    while(t--)    {        scanf("%d%d",&n,&k);        printf("%d\n",(dp[n][k][0]+dp[n][k][1])%mod);    }    return 0;}
                         ^
0_0_20613634_10116.cpp:8:39: error: stray '#' in program
     using namespace std;#define N 1050#define mod 100000007 int dp[N][N*2][2]; int main (){         memset(dp,0,sizeof(dp));        dp[1][1][0]=1;        dp[1][2][1]=1;         for(int i=1;i<=1000;++i)        {            for(int j=1;j<=2*i;++j)            {                dp[i+1][j][0]=(dp[i+1][j][0]+dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+1][0]=(dp[i+1][j+1][0]+dp[i][j][1]+dp[i][j][0])%mod;                dp[i+1][j][1]=(dp[i+1][j][1]+dp[i][j][1])%mod;                dp[i+1][j+1][1]=(dp[i+1][j+1][1]+2*dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+2][1]=(dp[i+1][j+2][1]+dp[i][j][0]+dp[i][j][1])%mod;             }        }            int n,k;    int t;scanf("%d",&t);    while(t--)    {        scanf("%d%d",&n,&k);        printf("%d\n",(dp[n][k][0]+dp[n][k][1])%mod);    }    return 0;}
                                       ^
0_0_20613634_10116.cpp:8:26: error: 'define' does not name a type
     using namespace std;#define N 1050#define mod 100000007 int dp[N][N*2][2]; int main (){         memset(dp,0,sizeof(dp));        dp[1][1][0]=1;        dp[1][2][1]=1;         for(int i=1;i<=1000;++i)        {            for(int j=1;j<=2*i;++j)            {                dp[i+1][j][0]=(dp[i+1][j][0]+dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+1][0]=(dp[i+1][j+1][0]+dp[i][j][1]+dp[i][j][0])%mod;                dp[i+1][j][1]=(dp[i+1][j][1]+dp[i][j][1])%mod;                dp[i+1][j+1][1]=(dp[i+1][j+1][1]+2*dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+2][1]=(dp[i+1][j+2][1]+dp[i][j][0]+dp[i][j][1])%mod;             }        }            int n,k;    int t;scanf("%d",&t);    while(t--)    {        scanf("%d%d",&n,&k);        printf("%d\n",(dp[n][k][0]+dp[n][k][1])%mod);    }    return 0;}
                          ^
0_0_20613634_10116.cpp: In function 'int main()':
0_0_20613634_10116.cpp:8:108: error: 'dp' was not declared in this scope
     using namespace std;#define N 1050#define mod 100000007 int dp[N][N*2][2]; int main (){         memset(dp,0,sizeof(dp));        dp[1][1][0]=1;        dp[1][2][1]=1;         for(int i=1;i<=1000;++i)        {            for(int j=1;j<=2*i;++j)            {                dp[i+1][j][0]=(dp[i+1][j][0]+dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+1][0]=(dp[i+1][j+1][0]+dp[i][j][1]+dp[i][j][0])%mod;                dp[i+1][j][1]=(dp[i+1][j][1]+dp[i][j][1])%mod;                dp[i+1][j+1][1]=(dp[i+1][j+1][1]+2*dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+2][1]=(dp[i+1][j+2][1]+dp[i][j][0]+dp[i][j][1])%mod;             }        }            int n,k;    int t;scanf("%d",&t);    while(t--)    {        scanf("%d%d",&n,&k);        printf("%d\n",(dp[n][k][0]+dp[n][k][1])%mod);    }    return 0;}
                                                                                                            ^
0_0_20613634_10116.cpp:8:331: error: 'mod' was not declared in this scope
     using namespace std;#define N 1050#define mod 100000007 int dp[N][N*2][2]; int main (){         memset(dp,0,sizeof(dp));        dp[1][1][0]=1;        dp[1][2][1]=1;         for(int i=1;i<=1000;++i)        {            for(int j=1;j<=2*i;++j)            {                dp[i+1][j][0]=(dp[i+1][j][0]+dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+1][0]=(dp[i+1][j+1][0]+dp[i][j][1]+dp[i][j][0])%mod;                dp[i+1][j][1]=(dp[i+1][j][1]+dp[i][j][1])%mod;                dp[i+1][j+1][1]=(dp[i+1][j+1][1]+2*dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+2][1]=(dp[i+1][j+2][1]+dp[i][j][0]+dp[i][j][1])%mod;             }        }            int n,k;    int t;scanf("%d",&t);    while(t--)    {        scanf("%d%d",&n,&k);        printf("%d\n",(dp[n][k][0]+dp[n][k][1])%mod);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                           ^
0_0_20613634_10116.cpp:8:798: error: 'mod' was not declared in this scope
     using namespace std;#define N 1050#define mod 100000007 int dp[N][N*2][2]; int main (){         memset(dp,0,sizeof(dp));        dp[1][1][0]=1;        dp[1][2][1]=1;         for(int i=1;i<=1000;++i)        {            for(int j=1;j<=2*i;++j)            {                dp[i+1][j][0]=(dp[i+1][j][0]+dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+1][0]=(dp[i+1][j+1][0]+dp[i][j][1]+dp[i][j][0])%mod;                dp[i+1][j][1]=(dp[i+1][j][1]+dp[i][j][1])%mod;                dp[i+1][j+1][1]=(dp[i+1][j+1][1]+2*dp[i][j][0]+2*dp[i][j][1])%mod;                dp[i+1][j+2][1]=(dp[i+1][j+2][1]+dp[i][j][0]+dp[i][j][1])%mod;             }        }            int n,k;    int t;scanf("%d",&t);    while(t--)    {        scanf("%d%d",&n,&k);        printf("%d\n",(dp[n][k][0]+dp[n][k][1])%mod);    }    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-12-05 10:36:50, Gzip enabled