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_20612955_23972.cpp:5:5: error: 'mod' does not name a type
     mod)f[i]%=mod;    }    while(scanf("%lld%lld",&n,&m)&&(n+m)>0)    {        ll ans=1;        if(n<m||m==1||m==2)        {            while(n>0)            {                if(n&1)ans*=m;                if(ans>mod)ans%=mod;                n>>=1;                m*=m;                if(m>mod)m%=mod;            }        }        else        {            ans=f[m]+m;            if(ans>mod)ans%=mod;        }        printf("%lld\n",ans);    }    return 0;}
     ^
0_0_20612955_23972.cpp:5:23: error: expected declaration before '}' token
     mod)f[i]%=mod;    }    while(scanf("%lld%lld",&n,&m)&&(n+m)>0)    {        ll ans=1;        if(n<m||m==1||m==2)        {            while(n>0)            {                if(n&1)ans*=m;                if(ans>mod)ans%=mod;                n>>=1;                m*=m;                if(m>mod)m%=mod;            }        }        else        {            ans=f[m]+m;            if(ans>mod)ans%=mod;        }        printf("%lld\n",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-25 18:35:31, Gzip enabled