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_29033273_20994.cpp:5:14: error: stray '#' in program
 #define max  500010
              ^
0_0_29033273_20994.cpp:6:7: note: in expansion of macro 'max'
 int a[max],b[max];
       ^
0_0_29033273_20994.cpp:5:14: error: stray '#' in program
 #define max  500010
              ^
0_0_29033273_20994.cpp:6:14: note: in expansion of macro 'max'
 int a[max],b[max];
              ^
0_0_29033273_20994.cpp:5:14: error: stray '#' in program
 #define max  500010
              ^
0_0_29033273_20994.cpp:8:9: note: in expansion of macro 'max'
 char gw[max+5];
         ^
0_0_29033273_20994.cpp:19:2: error: stray '#' in program
   cin>>n;
  ^
0_0_29033273_20994.cpp:20:2: error: stray '#' in program
   for(int j=1;j<=n;j++)
  ^
0_0_29033273_20994.cpp:21:2: error: stray '#' in program
   {
  ^
0_0_29033273_20994.cpp:22:2: error: stray '#' in program
   cin>>a[j];
  ^
0_0_29033273_20994.cpp:23:2: error: stray '#' in program
   b[a[j]]=j;
  ^
0_0_29033273_20994.cpp:24:2: error: stray '#' in program
   }
  ^
0_0_29033273_20994.cpp:25:2: error: stray '#' in program
   b[n+1]=0;
  ^
0_0_29033273_20994.cpp:26:2: error: stray '#' in program
   int per,next;
  ^
0_0_29033273_20994.cpp:27:2: error: stray '#' in program
   per=a[1];
  ^
0_0_29033273_20994.cpp:28:2: error: stray '#' in program
   gw[a[1]]='a';
  ^
0_0_29033273_20994.cpp:29:2: error: stray '#' in program
   int t;
  ^
0_0_29033273_20994.cpp:30:2: error: stray '#' in program
   for(t=2;t<=n;t++)
  ^
0_0_29033273_20994.cpp:31:2: error: stray '#' in program
   {
  ^
0_0_29033273_20994.cpp:32:2: error: stray '#' in program
   next=a[t];
  ^
0_0_29033273_20994.cpp:33:2: error: stray '#' in program
   if(next==n)    gw[next]=gw[per]+1;
  ^
0_0_29033273_20994.cpp:33:21: error: stray '#' in program
   if(next==n)    gw[next]=gw[per]+1;
                     ^
0_0_29033273_20994.cpp:33:28: error: stray '#' in program
   if(next==n)    gw[next]=gw[per]+1;
                            ^
0_0_29033273_20994.cpp:34:2: error: stray '#' in program
   else if(b[next+1] < b[per+1])     gw[next]=gw[per]+1;// b[n+1]=0;在这用到的 
  ^
0_0_29033273_20994.cpp:34:39: error: stray '#' in program
   else if(b[next+1] < b[per+1])     gw[next]=gw[per]+1;// b[n+1]=0;在这用到的 
                                       ^
0_0_29033273_20994.cpp:34:46: error: stray '#' in program
   else if(b[next+1] < b[per+1])     gw[next]=gw[per]+1;// b[n+1]=0;在这用到的 
                                              ^
0_0_29033273_20994.cpp:35:2: error: stray '#' in program
             else gw[next]=gw[per];
  ^
0_0_29033273_20994.cpp:35:9: error: stray '#' in program
             else gw[next]=gw[per];
         ^
0_0_29033273_20994.cpp:35:16: error: stray '#' in program
             else gw[next]=gw[per];
                ^
0_0_29033273_20994.cpp:35:23: error: stray '#' in program
             else gw[next]=gw[per];
                       ^
0_0_29033273_20994.cpp:35:30: error: stray '#' in program
             else gw[next]=gw[per];
                              ^
0_0_29033273_20994.cpp:35:37: error: stray '#' in program
             else gw[next]=gw[per];
                                     ^
0_0_29033273_20994.cpp:36:2: error: stray '#' in program
   if(gw[next]>'z') break;//超过了范围的字母 
  ^
0_0_29033273_20994.cpp:37:2: error: stray '#' in program
   per=next;
  ^
0_0_29033273_20994.cpp:38:2: error: stray '#' in program
   }
  ^
0_0_29033273_20994.cpp:39:2: error: stray '#' in program
   if(t<=n) 
  ^
0_0_29033273_20994.cpp:39:17: error: stray '#' in program
   if(t<=n) 
                 ^
0_0_29033273_20994.cpp:40:2: error: stray '#' in program
   {
  ^
0_0_29033273_20994.cpp:41:2: error: stray '#' in program
   cout<<"-1"<<endl;
  ^
0_0_29033273_20994.cpp:42:2: error: stray '#' in program
   continue;
  ^
0_0_29033273_20994.cpp:43:2: error: stray '#' in program
   }
  ^
0_0_29033273_20994.cpp:44:2: error: stray '#' in program
   for(int k=1;k<=n;k++)
  ^
0_0_29033273_20994.cpp:45:2: error: stray '#' in program
      cout<<gw[k];
  ^
0_0_29033273_20994.cpp:45:9: error: stray '#' in program
      cout<<gw[k];
         ^
0_0_29033273_20994.cpp:45:16: error: stray '#' in program
      cout<<gw[k];
                ^
0_0_29033273_20994.cpp:46:2: error: stray '#' in program
   cout<<endl;
  ^
0_0_29033273_20994.cpp:47:2: error: stray '#' in program
   }
  ^
0_0_29033273_20994.cpp:49:3: error: stray '#' in program
 } 
   ^
0_0_29033273_20994.cpp:5:15: error: lvalue required as unary '&' operand
 #define max  500010
               ^
0_0_29033273_20994.cpp:6:7: note: in expansion of macro 'max'
 int a[max],b[max];
       ^
0_0_29033273_20994.cpp:5:18: error: expected ']' before ';' token
 #define max  500010
                  ^
0_0_29033273_20994.cpp:6:7: note: in expansion of macro 'max'
 int a[max],b[max];
       ^
0_0_29033273_20994.cpp:5:19: error: expected unqualified-id before numeric constant
 #define max  500010
                   ^
0_0_29033273_20994.cpp:6:7: note: in expansion of macro 'max'
 int a[max],b[max];
       ^
0_0_29033273_20994.cpp:5:19: error: expected unqualified-id before numeric constant
 #define max  500010
                   ^
0_0_29033273_20994.cpp:6:14: note: in expansion of macro 'max'
 int a[max],b[max];
              ^
0_0_29033273_20994.cpp:5:15: error: lvalue required as unary '&' operand
 #define max  500010
               ^
0_0_29033273_20994.cpp:8:9: note: in expansion of macro 'max'
 char gw[max+5];
         ^
0_0_29033273_20994.cpp:5:18: error: expected ']' before ';' token
 #define max  500010
                  ^
0_0_29033273_20994.cpp:8:9: note: in expansion of macro 'max'
 char gw[max+5];
         ^
0_0_29033273_20994.cpp:5:19: error: expected unqualified-id before numeric constant
 #define max  500010
                   ^
0_0_29033273_20994.cpp:8:9: note: in expansion of macro 'max'
 char gw[max+5];
         ^
0_0_29033273_20994.cpp: In function 'int main()':
0_0_29033273_20994.cpp:19:3: error: lvalue required as unary '&' operand
   cin>>n;
   ^
0_0_29033273_20994.cpp:20:3: error: lvalue required as unary '&' operand
   for(int j=1;j<=n;j++)
   ^
0_0_29033273_20994.cpp:21:3: error: lvalue required as unary '&' operand
   {
   ^
0_0_29033273_20994.cpp:22:3: error: lvalue required as unary '&' operand
   cin>>a[j];
   ^
0_0_29033273_20994.cpp:22:13: error: 'a' was not declared in this scope
   cin>>a[j];
             ^
0_0_29033273_20994.cpp:22:15: error: 'j' was not declared in this scope
   cin>>a[j];
               ^
0_0_29033273_20994.cpp:23:3: error: lvalue required as unary '&' operand
   b[a[j]]=j;
   ^
0_0_29033273_20994.cpp:23:8: error: 'b' was not declared in this scope
   b[a[j]]=j;
        ^
0_0_29033273_20994.cpp:24:3: error: lvalue required as unary '&' operand
   }
   ^
0_0_29033273_20994.cpp:25:3: error: lvalue required as unary '&' operand
   b[n+1]=0;
   ^
0_0_29033273_20994.cpp:25:8: error: 'b' was not declared in this scope
   b[n+1]=0;
        ^
0_0_29033273_20994.cpp:26:3: error: lvalue required as unary '&' operand
   int per,next;
   ^
0_0_29033273_20994.cpp:27:3: error: lvalue required as unary '&' operand
   per=a[1];
   ^
0_0_29033273_20994.cpp:27:12: error: 'a' was not declared in this scope
   per=a[1];
            ^
0_0_29033273_20994.cpp:28:3: error: lvalue required as unary '&' operand
   gw[a[1]]='a';
   ^
0_0_29033273_20994.cpp:28:8: error: 'gw' was not declared in this scope
   gw[a[1]]='a';
        ^
0_0_29033273_20994.cpp:29:3: error: lvalue required as unary '&' operand
   int t;
   ^
0_0_29033273_20994.cpp:30:3: error: lvalue required as unary '&' operand
   for(t=2;t<=n;t++)
   ^
0_0_29033273_20994.cpp:31:3: error: lvalue required as unary '&' operand
   {
   ^
0_0_29033273_20994.cpp:32:3: error: lvalue required as unary '&' operand
   next=a[t];
   ^
0_0_29033273_20994.cpp:33:3: error: lvalue required as unary '&' operand
   if(next==n)    gw[next]=gw[per]+1;
   ^
0_0_29033273_20994.cpp:33:22: error: lvalue required as unary '&' operand
   if(next==n)    gw[next]=gw[per]+1;
                      ^
0_0_29033273_20994.cpp:33:29: error: lvalue required as unary '&' operand
   if(next==n)    gw[next]=gw[per]+1;
                             ^
0_0_29033273_20994.cpp:34:3: error: lvalue required as unary '&' operand
   else if(b[next+1] < b[per+1])     gw[next]=gw[per]+1;// b[n+1]=0;在这用到的 
   ^
0_0_29033273_20994.cpp:34:8: error: 'else' without a previous 'if'
   else if(b[next+1] < b[per+1])     gw[next]=gw[per]+1;// b[n+1]=0;在这用到的 
        ^
0_0_29033273_20994.cpp:34:40: error: lvalue required as unary '&' operan


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-06-26 20:45:04, Gzip enabled