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_20614334_11442.cpp:4:1090: error: stray '#' in program
     using namespace std; const int mod = 1000000007;typedef long long LL;LL dp[2][8];int f[51][51]; int main(){    int T,N,M,K,l,now;    LL tmp;    scanf("%d",&T);    for(int cas=1;cas<=T;cas++){        LL ans=0;        scanf("%d%d",&N,&M);        memset(f,0,sizeof f);        for(int i=0;i<M;i++){            scanf("%d",&K);            for(int j=0;j<K;j++){                scanf("%d",&l);                f[i][l-1]++;            }        }        for(int i=0;i<N;i++){            for(int j=i;j<N;j++){                for(int k=j;k<N;k++){                    memset(dp,0,sizeof dp);                    dp[0][0]=1;                    now=1;                    for(int s=0;s<M;s++,now^=1){                        tmp=0;                        if(f[s][i]) tmp|=1;                        if(f[s][j]) tmp|=2;                        if(f[s][k]) tmp|=4;                        for(int t=0;t<8;t++){                            dp[now][t]=dp[now^1][t];                            dp[now][t]+=dp[now^1][t^tmp];                            dp[now][t]%=mod;                        }                    }#define u dp[now^1][7]                    tmp = u;                    if(i!=j&&j!=k) u*=6;                    else if(i==j&&j==k) ;                    else u*=3;                    ans=(ans+u)%mod;                }            }        }         printf("Case #%d: %I64d\n",cas,ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ^
0_0_20614334_11442.cpp: In function 'int main()':
0_0_20614334_11442.cpp:4:1091: error: 'define' was not declared in this scope
     using namespace std; const int mod = 1000000007;typedef long long LL;LL dp[2][8];int f[51][51]; int main(){    int T,N,M,K,l,now;    LL tmp;    scanf("%d",&T);    for(int cas=1;cas<=T;cas++){        LL ans=0;        scanf("%d%d",&N,&M);        memset(f,0,sizeof f);        for(int i=0;i<M;i++){            scanf("%d",&K);            for(int j=0;j<K;j++){                scanf("%d",&l);                f[i][l-1]++;            }        }        for(int i=0;i<N;i++){            for(int j=i;j<N;j++){                for(int k=j;k<N;k++){                    memset(dp,0,sizeof dp);                    dp[0][0]=1;                    now=1;                    for(int s=0;s<M;s++,now^=1){                        tmp=0;                        if(f[s][i]) tmp|=1;                        if(f[s][j]) tmp|=2;                        if(f[s][k]) tmp|=4;                        for(int t=0;t<8;t++){                            dp[now][t]=dp[now^1][t];                            dp[now][t]+=dp[now^1][t^tmp];                            dp[now][t]%=mod;                        }                    }#define u dp[now^1][7]                    tmp = u;                    if(i!=j&&j!=k) u*=6;                    else if(i==j&&j==k) ;                    else u*=3;                    ans=(ans+u)%mod;                }            }        }         printf("Case #%d: %I64d\n",cas,ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ^
0_0_20614334_11442.cpp:4:1175: error: 'u' was not declared in this scope
     using namespace std; const int mod = 1000000007;typedef long long LL;LL dp[2][8];int f[51][51]; int main(){    int T,N,M,K,l,now;    LL tmp;    scanf("%d",&T);    for(int cas=1;cas<=T;cas++){        LL ans=0;        scanf("%d%d",&N,&M);        memset(f,0,sizeof f);        for(int i=0;i<M;i++){            scanf("%d",&K);            for(int j=0;j<K;j++){                scanf("%d",&l);                f[i][l-1]++;            }        }        for(int i=0;i<N;i++){            for(int j=i;j<N;j++){                for(int k=j;k<N;k++){                    memset(dp,0,sizeof dp);                    dp[0][0]=1;                    now=1;                    for(int s=0;s<M;s++,now^=1){                        tmp=0;                        if(f[s][i]) tmp|=1;                        if(f[s][j]) tmp|=2;                        if(f[s][k]) tmp|=4;                        for(int t=0;t<8;t++){                            dp[now][t]=dp[now^1][t];                            dp[now][t]+=dp[now^1][t^tmp];                            dp[now][t]%=mod;                        }                    }#define u dp[now^1][7]                    tmp = u;                    if(i!=j&&j!=k) u*=6;                    else if(i==j&&j==k) ;                    else u*=3;                    ans=(ans+u)%mod;                }            }        }         printf("Case #%d: %I64d\n",cas,ans);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^
0_0_20614334_11442.cpp:4:1246: error: 'u' was not declared in this scope
     using namespace std; const int mod = 1000000007;typedef long long LL;LL dp[2][8];int f[51][51]; int main(){    int T,N,M,K,l,now;    LL tmp;    scanf("%d",&T);    for(int cas=1;cas<=T;cas++){        LL ans=0;        scanf("%d%d",&N,&M);        memset(f,0,sizeof f);        for(int i=0;i<M;i++){            scanf("%d",&K);            for(int j=0;j<K;j++){                scanf("%d",&l);                f[i][l-1]++;            }        }        for(int i=0;i<N;i++){            for(int j=i;j<N;j++){                for(int k=j;k<N;k++){                    memset(dp,0,sizeof dp);                    dp[0][0]=1;                    now=1;                    for(int s=0;s<M;s++,now^=1){                        tmp=0;                        if(f[s][i]) tmp|=1;                        if(f[s][j]) tmp|=2;                        if(f[s][k]) tmp|=4;                        for(int t=0;t<8;t++){                            dp[now][t]=dp[now^1][t];                            dp[now][t]+=dp[now^1][t^tmp];                            dp[now][t]%=mod;                        }                    }#define u dp[now^1][7]                    tmp = u;                    if(i!=j&&j!=k) u*=6;                    else if(i==j&&j==k) ;                    else u*=3;                    ans=(ans+u)%mod;                }            }        }         printf("Case #%d: %I64d\n",cas,ans);    }    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-26 17:11:30, Gzip enabled