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_20614657_22192.cpp:16:18: error: '#' is not followed by a macro parameter
     #define ALL(a) a.begin(), a.end()#define clr(a, x) memset(a, x, sizeof a)#define X first#define Y second#define pb push_back#define lowbit(x) (x&(-x))#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define rep1(i,x,y) for(int i=x;i<=y;i++)#define rep(i,n) for(int i=0;i<(int)n;i++)using namespace std;const double eps = 1e-6;typedef long long LL;typedef long long ll;typedef pair<int, int>
                  ^
0_0_20614657_22192.cpp:17:6: error: 'pii' does not name a type
      pii;const int oo =0x3f3f3f3f; const int N = 510;const int cnt[]= {6,2,5,5,4,5,6,3,7,6};ll d[N][2][8];int M,n;bool vis[N][2][8];ll dp(int i,int j,int s){    if(vis[i][j][s]) return d[i][j][s];    vis[i][j][s] = 1;    d[i][j][s] = 0;    if(i == 0)    {        return d[i][j][s] = (j==0 && s==7);    }    rep(p,10) rep(q,10)    {        int nj = (p-j >= q ? 0 : 1);        int a = p, b = q , c = nj*10+p-j-q;        if((s&1) && c!=0) continue;        if((s&2) && b!=0) continue;        int nee = cnt[a]+((s&2) ? 0:cnt[b])+((s&1) ? 0 : cnt[c]);        if(nee > i) continue;        int vv[8]= {0};        rep(t,8)        {            int ts = 0;            if((t&1) && (c>0)) ts|=1;            if((t&2) && (b>0)) ts|=2;            if((t&4) && (a>0) && nj==0 && i==nee) ts|=4;            if(!vv[ts]) d[i][j][s] = (d[i][j][s]+dp(i-nee,nj,s|ts))%M,vv[ts]=1;        }    }    return d[i][j][s];}int main(){    int T,kase=1;    scanf("%d",&T);    while(T--)    {        scanf("%d %d",&n,&M);        memset(vis,false,sizeof(vis));        printf("Case #%d: %I64d\n",kase++,dp(n-3,0,0));    }    return 0;}
      ^
0_0_20614657_22192.cpp:17:93: error: 'll' does not name a type
      pii;const int oo =0x3f3f3f3f; const int N = 510;const int cnt[]= {6,2,5,5,4,5,6,3,7,6};ll d[N][2][8];int M,n;bool vis[N][2][8];ll dp(int i,int j,int s){    if(vis[i][j][s]) return d[i][j][s];    vis[i][j][s] = 1;    d[i][j][s] = 0;    if(i == 0)    {        return d[i][j][s] = (j==0 && s==7);    }    rep(p,10) rep(q,10)    {        int nj = (p-j >= q ? 0 : 1);        int a = p, b = q , c = nj*10+p-j-q;        if((s&1) && c!=0) continue;        if((s&2) && b!=0) continue;        int nee = cnt[a]+((s&2) ? 0:cnt[b])+((s&1) ? 0 : cnt[c]);        if(nee > i) continue;        int vv[8]= {0};        rep(t,8)        {            int ts = 0;            if((t&1) && (c>0)) ts|=1;            if((t&2) && (b>0)) ts|=2;            if((t&4) && (a>0) && nj==0 && i==nee) ts|=4;            if(!vv[ts]) d[i][j][s] = (d[i][j][s]+dp(i-nee,nj,s|ts))%M,vv[ts]=1;        }    }    return d[i][j][s];}int main(){    int T,kase=1;    scanf("%d",&T);    while(T--)    {        scanf("%d %d",&n,&M);        memset(vis,false,sizeof(vis));        printf("Case #%d: %I64d\n",kase++,dp(n-3,0,0));    }    return 0;}
                                                                                             ^
0_0_20614657_22192.cpp:17:133: error: 'll' does not name a type
      pii;const int oo =0x3f3f3f3f; const int N = 510;const int cnt[]= {6,2,5,5,4,5,6,3,7,6};ll d[N][2][8];int M,n;bool vis[N][2][8];ll dp(int i,int j,int s){    if(vis[i][j][s]) return d[i][j][s];    vis[i][j][s] = 1;    d[i][j][s] = 0;    if(i == 0)    {        return d[i][j][s] = (j==0 && s==7);    }    rep(p,10) rep(q,10)    {        int nj = (p-j >= q ? 0 : 1);        int a = p, b = q , c = nj*10+p-j-q;        if((s&1) && c!=0) continue;        if((s&2) && b!=0) continue;        int nee = cnt[a]+((s&2) ? 0:cnt[b])+((s&1) ? 0 : cnt[c]);        if(nee > i) continue;        int vv[8]= {0};        rep(t,8)        {            int ts = 0;            if((t&1) && (c>0)) ts|=1;            if((t&2) && (b>0)) ts|=2;            if((t&4) && (a>0) && nj==0 && i==nee) ts|=4;            if(!vv[ts]) d[i][j][s] = (d[i][j][s]+dp(i-nee,nj,s|ts))%M,vv[ts]=1;        }    }    return d[i][j][s];}int main(){    int T,kase=1;    scanf("%d",&T);    while(T--)    {        scanf("%d %d",&n,&M);        memset(vis,false,sizeof(vis));        printf("Case #%d: %I64d\n",kase++,dp(n-3,0,0));    }    return 0;}
                                                                                                                                     ^
0_0_20614657_22192.cpp: In function 'int main()':
0_0_20614657_22192.cpp:17:1077: error: 'dp' was not declared in this scope
      pii;const int oo =0x3f3f3f3f; const int N = 510;const int cnt[]= {6,2,5,5,4,5,6,3,7,6};ll d[N][2][8];int M,n;bool vis[N][2][8];ll dp(int i,int j,int s){    if(vis[i][j][s]) return d[i][j][s];    vis[i][j][s] = 1;    d[i][j][s] = 0;    if(i == 0)    {        return d[i][j][s] = (j==0 && s==7);    }    rep(p,10) rep(q,10)    {        int nj = (p-j >= q ? 0 : 1);        int a = p, b = q , c = nj*10+p-j-q;        if((s&1) && c!=0) continue;        if((s&2) && b!=0) continue;        int nee = cnt[a]+((s&2) ? 0:cnt[b])+((s&1) ? 0 : cnt[c]);        if(nee > i) continue;        int vv[8]= {0};        rep(t,8)        {            int ts = 0;            if((t&1) && (c>0)) ts|=1;            if((t&2) && (b>0)) ts|=2;            if((t&4) && (a>0) && nj==0 && i==nee) ts|=4;            if(!vv[ts]) d[i][j][s] = (d[i][j][s]+dp(i-nee,nj,s|ts))%M,vv[ts]=1;        }    }    return d[i][j][s];}int main(){    int T,kase=1;    scanf("%d",&T);    while(T--)    {        scanf("%d %d",&n,&M);        memset(vis,false,sizeof(vis));        printf("Case #%d: %I64d\n",kase++,dp(n-3,0,0));    }    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-09-28 21:16:57, Gzip enabled