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_20613391_3943.cpp:3:25: error: stray '#' in program
     using namespace std;#define min(a,b) ((a)<(b)?(a):(b))const long  N=100010;__int64 a[N],aa,minx;int main(){    int n,t,b;    int i,j,k;      while (cin>>t)      {          minx=k=0;          while (t--)          {              scanf("%d%I64d%d",&n,&aa,&b);              minx=n*b+2*aa;              scanf("%I64d",&a[0]);              for (i=1;i<n;i++)              {                  scanf("%I64d",&a[i]);                  if(a[i]-1==a[i-1]) continue;                  minx+=min((a[i]-a[i-1]-1)*b,2*aa);              }              printf("Case #%d: %I64d\n",++k,minx);           }      }return 0; }
                         ^
0_0_20613391_3943.cpp:3:26: error: 'define' does not name a type
     using namespace std;#define min(a,b) ((a)<(b)?(a):(b))const long  N=100010;__int64 a[N],aa,minx;int main(){    int n,t,b;    int i,j,k;      while (cin>>t)      {          minx=k=0;          while (t--)          {              scanf("%d%I64d%d",&n,&aa,&b);              minx=n*b+2*aa;              scanf("%I64d",&a[0]);              for (i=1;i<n;i++)              {                  scanf("%I64d",&a[i]);                  if(a[i]-1==a[i-1]) continue;                  minx+=min((a[i]-a[i-1]-1)*b,2*aa);              }              printf("Case #%d: %I64d\n",++k,minx);           }      }return 0; }
                          ^
0_0_20613391_3943.cpp:3:90: error: 'N' was not declared in this scope
     using namespace std;#define min(a,b) ((a)<(b)?(a):(b))const long  N=100010;__int64 a[N],aa,minx;int main(){    int n,t,b;    int i,j,k;      while (cin>>t)      {          minx=k=0;          while (t--)          {              scanf("%d%I64d%d",&n,&aa,&b);              minx=n*b+2*aa;              scanf("%I64d",&a[0]);              for (i=1;i<n;i++)              {                  scanf("%I64d",&a[i]);                  if(a[i]-1==a[i-1]) continue;                  minx+=min((a[i]-a[i-1]-1)*b,2*aa);              }              printf("Case #%d: %I64d\n",++k,minx);           }      }return 0; }
                                                                                          ^
0_0_20613391_3943.cpp: In function 'int main()':
0_0_20613391_3943.cpp:3:318: error: 'a' was not declared in this scope
     using namespace std;#define min(a,b) ((a)<(b)?(a):(b))const long  N=100010;__int64 a[N],aa,minx;int main(){    int n,t,b;    int i,j,k;      while (cin>>t)      {          minx=k=0;          while (t--)          {              scanf("%d%I64d%d",&n,&aa,&b);              minx=n*b+2*aa;              scanf("%I64d",&a[0]);              for (i=1;i<n;i++)              {                  scanf("%I64d",&a[i]);                  if(a[i]-1==a[i-1]) continue;                  minx+=min((a[i]-a[i-1]-1)*b,2*aa);              }              printf("Case #%d: %I64d\n",++k,minx);           }      }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-16 14:43:27, Gzip enabled