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_20614164_24179.cpp:5:25: error: stray '#' in program
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,y,z,t,dp[1505][1505],ss,cas=1,i,j,k,r,ans; int main(){    scanf("%I64d",&ss);    w(ss--)    {        scanf("%I64d%I64d%I64d%I64d%I64d",&n,&x,&y,&z,&t);        mem(dp,0);        ans=n*t*x;        up(i,1,n)        up(j,0,i)        {            if(!j)                dp[i][j]=dp[i-1][j]+t*(i-j-1)*y;            else                dp[i][j]=max(dp[i-1][j]+(j*z+t)*max(0LL,(i-1-j))*y,dp[i-1][j-1]+((j-1)*z+t)*(i-j)*y);            ans=max(ans,dp[i][j]+(n-i)*(j*z+t)*(x+(i-j)*y));        }        printf("Case #%I64d: %I64d\n",cas++,ans);    }    return 0;}
                         ^
0_0_20614164_24179.cpp:5:60: error: stray '#' in program
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,y,z,t,dp[1505][1505],ss,cas=1,i,j,k,r,ans; int main(){    scanf("%I64d",&ss);    w(ss--)    {        scanf("%I64d%I64d%I64d%I64d%I64d",&n,&x,&y,&z,&t);        mem(dp,0);        ans=n*t*x;        up(i,1,n)        up(j,0,i)        {            if(!j)                dp[i][j]=dp[i-1][j]+t*(i-j-1)*y;            else                dp[i][j]=max(dp[i-1][j]+(j*z+t)*max(0LL,(i-1-j))*y,dp[i-1][j-1]+((j-1)*z+t)*(i-j)*y);            ans=max(ans,dp[i][j]+(n-i)*(j*z+t)*(x+(i-j)*y));        }        printf("Case #%I64d: %I64d\n",cas++,ans);    }    return 0;}
                                                            ^
0_0_20614164_24179.cpp:5:97: error: stray '#' in program
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,y,z,t,dp[1505][1505],ss,cas=1,i,j,k,r,ans; int main(){    scanf("%I64d",&ss);    w(ss--)    {        scanf("%I64d%I64d%I64d%I64d%I64d",&n,&x,&y,&z,&t);        mem(dp,0);        ans=n*t*x;        up(i,1,n)        up(j,0,i)        {            if(!j)                dp[i][j]=dp[i-1][j]+t*(i-j-1)*y;            else                dp[i][j]=max(dp[i-1][j]+(j*z+t)*max(0LL,(i-1-j))*y,dp[i-1][j-1]+((j-1)*z+t)*(i-j)*y);            ans=max(ans,dp[i][j]+(n-i)*(j*z+t)*(x+(i-j)*y));        }        printf("Case #%I64d: %I64d\n",cas++,ans);    }    return 0;}
                                                                                                 ^
0_0_20614164_24179.cpp:5:135: error: stray '#' in program
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,y,z,t,dp[1505][1505],ss,cas=1,i,j,k,r,ans; int main(){    scanf("%I64d",&ss);    w(ss--)    {        scanf("%I64d%I64d%I64d%I64d%I64d",&n,&x,&y,&z,&t);        mem(dp,0);        ans=n*t*x;        up(i,1,n)        up(j,0,i)        {            if(!j)                dp[i][j]=dp[i-1][j]+t*(i-j-1)*y;            else                dp[i][j]=max(dp[i-1][j]+(j*z+t)*max(0LL,(i-1-j))*y,dp[i-1][j-1]+((j-1)*z+t)*(i-j)*y);            ans=max(ans,dp[i][j]+(n-i)*(j*z+t)*(x+(i-j)*y));        }        printf("Case #%I64d: %I64d\n",cas++,ans);    }    return 0;}
                                                                                                                                       ^
0_0_20614164_24179.cpp:5:156: error: stray '#' in program
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,y,z,t,dp[1505][1505],ss,cas=1,i,j,k,r,ans; int main(){    scanf("%I64d",&ss);    w(ss--)    {        scanf("%I64d%I64d%I64d%I64d%I64d",&n,&x,&y,&z,&t);        mem(dp,0);        ans=n*t*x;        up(i,1,n)        up(j,0,i)        {            if(!j)                dp[i][j]=dp[i-1][j]+t*(i-j-1)*y;            else                dp[i][j]=max(dp[i-1][j]+(j*z+t)*max(0LL,(i-1-j))*y,dp[i-1][j-1]+((j-1)*z+t)*(i-j)*y);            ans=max(ans,dp[i][j]+(n-i)*(j*z+t)*(x+(i-j)*y));        }        printf("Case #%I64d: %I64d\n",cas++,ans);    }    return 0;}
                                                                                                                                                            ^
0_0_20614164_24179.cpp:5:26: error: 'define' does not name a type
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,y,z,t,dp[1505][1505],ss,cas=1,i,j,k,r,ans; int main(){    scanf("%I64d",&ss);    w(ss--)    {        scanf("%I64d%I64d%I64d%I64d%I64d",&n,&x,&y,&z,&t);        mem(dp,0);        ans=n*t*x;        up(i,1,n)        up(j,0,i)        {            if(!j)                dp[i][j]=dp[i-1][j]+t*(i-j-1)*y;            else                dp[i][j]=max(dp[i-1][j]+(j*z+t)*max(0LL,(i-1-j))*y,dp[i-1][j-1]+((j-1)*z+t)*(i-j)*y);            ans=max(ans,dp[i][j]+(n-i)*(j*z+t)*(x+(i-j)*y));        }        printf("Case #%I64d: %I64d\n",cas++,ans);    }    return 0;}
                          ^
0_0_20614164_24179.cpp:5:51: error: 'i' does not name a type
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,y,z,t,dp[1505][1505],ss,cas=1,i,j,k,r,ans; int main(){    scanf("%I64d",&ss);    w(ss--)    {        scanf("%I64d%I64d%I64d%I64d%I64d",&n,&x,&y,&z,&t);        mem(dp,0);        ans=n*t*x;        up(i,1,n)        up(j,0,i)        {            if(!j)                dp[i][j]=dp[i-1][j]+t*(i-j-1)*y;            else                dp[i][j]=max(dp[i-1][j]+(j*z+t)*max(0LL,(i-1-j))*y,dp[i-1][j-1]+((j-1)*z+t)*(i-j)*y);            ans=max(ans,dp[i][j]+(n-i)*(j*z+t)*(x+(i-j)*y));        }        printf("Case #%I64d: %I64d\n",cas++,ans);    }    return 0;}
                                                   ^
0_0_20614164_24179.cpp:5:56: error: 'i' does not name a type
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,y,z,t,dp[1505][1505],ss,cas=1,i,j,k,r,ans; int main(){    scanf("%I64d",&ss);    w(ss--)    {        scanf("%I64d%I64d%I64d%I64d%I64d",&n,&x,&y,&z,&t);        mem(dp,0);        ans=n*t*x;        up(i,1,n)        up(j,0,i)        {            if(!j)                dp[i][j]=dp[i-1][j]+t*(i-j-1)*y;            else                dp[i][j]=max(dp[i-1][j]+(j*z+t)*max(0LL,(i-1-j))*y,dp[i-1][j-1]+((j-1)*z+t)*(i-j)*y);            ans=max(ans,dp[i][j]+(n-i)*(j*z+t)*(x+(i-j)*y));        }        printf("Case #%I64d: %I64d\n",cas++,ans);    }    return 0;}
                                                        ^
0_0_20614164_24179.cpp:5:88: error: 'i' does not name a type
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,y,z,t,dp[1505][1505],ss,cas=1,i,j,k,r,ans; int main(){    scanf("%I64d",&ss);    w(ss--)    {        scanf("%I64d%I64d%I64d%I64d%I64d",&n,&x,&y,&z,&t);        mem(dp,0);        ans=n*t*x;        up(i,1,n)        up(j,0,i)        {            if(!j)                dp[i][j]=dp[i-1][j]+t*(i-j-1)*y;            else                dp[i][j]=max(dp[i-1][j]+(j*z+t)*max(0LL,(i-1-j))*y,dp[i-1][j-1]+((j-1)*z+t)*(i-j)*y);            ans=max(ans,dp[i][j]+(n-i)*(j*z+t)*(x+(i-j)*y));        }        printf("Case #%I64d: %I64d\n",cas++,ans);    }    return 0;}
                                                                                        ^
0_0_20614164_24179.cpp:5:93: error: 'i' does not name a type
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,y,z,t,dp[1505][1505],ss,cas=1,i,j,k,r,ans; int main(){    scanf("%I64d",&ss);    w(ss--)    {        scanf("%I64d%I64d%I64d%I64d%I64d",&n,&x,&y,&z,&t);        mem(dp,0);        ans=n*t*x;        up(i,1,n)        up(j,0,i)        {            if(!j)                dp[i][j]=dp[i-1][j]+t*(i-j-1)*y;            else                dp[i][j]=max(dp[i-1][j]+(j*z+t)*max(0LL,(i-1-j))*y,dp[i-1][j-1]+((j-1)*z+t)*(i-j)*y);            ans=max(ans,dp[i][j]+(n-i)*(j*z+t)*(x+(i-j)*y));        }        printf("Case #%I64d: %I64d\n",cas++,ans);    }    return 0;}
                                                                                             ^
0_0_20614164_24179.cpp: In function 'int main()':
0_0_20614164_24179.cpp:5:255: error: 'ss' was not declared in this scope
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,y,z,t,dp[1505][1505],ss,cas=1,i,j,k,r,ans; int main(){    scanf("%I64d",&ss);    w(ss--)    {        scanf("%I64d%I64d%I64d%I64d%I64d",&n,&x,&y,&z,&t);        mem(dp,0);        ans=n*t*x;        up(i,1,n)        up(j,0,i)        {            if(!j)                dp[i][j]=dp[i-1][j]+t*(i-j-1)*y;            else                dp[i][j]=max(dp[i-1][j]+(j*z+t)*max(0LL,(i-1-j))*y,dp[i-1][j-1]+((j-1)*z+t)*(i-j)*y);            ans=max(ans,dp[i][j]+(n-i)*(j*z+t)*(x+(i-j)*y));        }        printf("Case #%I64d: %I64d\n",cas++,ans);    }    return 0;}
                                                                                                                                                                                                                                                               ^
0_0_20614164_24179.cpp:5:269: error: 'w' was not declared in this scope
     using namespace std;#define up(i,x,y) for(i=x;i<=y;i++)#define down(i,x,y) for(i=x;i>=y;i--)#define mem(a,b) memset(a,b,sizeof(a))#define w(x) while(x)#define ll __int64 ll n,x,


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-22 15:28:46, Gzip enabled