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_20613134_25366.cpp:18:5: error: 's' does not name a type
     s)                     dp[i][j]=(dp[i-1][j]*bina[pos])%M;             }            else                 dp[i][j]=(dp[i-1][j]*left(i,pos))%M;             if(bina[pos]&sa[i])             {                if(i!=s)                {                    if(j)                        dp[i][j]=(dp[i][j]+dp[i-1][j-1]*left(i,pos))%M;                }            }        }    ll res=0;    for(int i=0;i<num;i++)        if((i&1)==need)             res=(res+dp[n][i])%M;    return res; } int main(){    init();    while(~scanf("%d%d",&n,&k))    {        if(n+k==0)            break;        for(int i=1;i<=n;i++)            scanf("%d",&sa[i]);        memset(sum,0,sizeof(sum));        for(int pos=0;pos<=m;pos++)         {            ll tmp=bina[pos];            num=Sum1(tmp);            int need;            if(k&tmp)                need=1;            else                need=0;            for(int i=0;i<=n;i++)                if(!i||(tmp&sa[i]))                    sum[pos]=(sum[pos]+Cal(pos,num,i,need))%M;        }        printf("%I64d\n",sum[m]);    }   return 0;}
     ^
0_0_20613134_25366.cpp:18:75: error: expected declaration before '}' token
     s)                     dp[i][j]=(dp[i-1][j]*bina[pos])%M;             }            else                 dp[i][j]=(dp[i-1][j]*left(i,pos))%M;             if(bina[pos]&sa[i])             {                if(i!=s)                {                    if(j)                        dp[i][j]=(dp[i][j]+dp[i-1][j-1]*left(i,pos))%M;                }            }        }    ll res=0;    for(int i=0;i<num;i++)        if((i&1)==need)             res=(res+dp[n][i])%M;    return res; } int main(){    init();    while(~scanf("%d%d",&n,&k))    {        if(n+k==0)            break;        for(int i=1;i<=n;i++)            scanf("%d",&sa[i]);        memset(sum,0,sizeof(sum));        for(int pos=0;pos<=m;pos++)         {            ll tmp=bina[pos];            num=Sum1(tmp);            int need;            if(k&tmp)                need=1;            else                need=0;            for(int i=0;i<=n;i++)                if(!i||(tmp&sa[i]))                    sum[pos]=(sum[pos]+Cal(pos,num,i,need))%M;        }        printf("%I64d\n",sum[m]);    }   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-30 05:43:43, Gzip enabled