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_28810064_24743.cpp:7:1: error: expected primary-expression before 'int'
 int ch[500010][26],val[500010],sz = 1,last[500100],f[500100],t,n,ans;
 ^
0_0_28810064_24743.cpp: In function 'void insert(char*, int)':
0_0_28810064_24743.cpp:13:7: error: 'ch' was not declared in this scope
   if(!ch[u][s[i]-'a']) {
       ^
0_0_28810064_24743.cpp:14:14: error: 'sz' was not declared in this scope
    memset(ch[sz],0,sizeof(ch[sz]));
              ^
0_0_28810064_24743.cpp:15:4: error: 'val' was not declared in this scope
    val[sz] = 0;
    ^
0_0_28810064_24743.cpp:18:7: error: 'ch' was not declared in this scope
   u = ch[u][s[i]- 'a']; 
       ^
0_0_28810064_24743.cpp:20:2: error: 'val' was not declared in this scope
  val[u] = v; 
  ^
0_0_28810064_24743.cpp: In function 'void find(char*)':
0_0_28810064_24743.cpp:26:15: error: 'ch' was not declared in this scope
   while(j && !ch[j][T[i]-'a']) j = f[j];
               ^
0_0_28810064_24743.cpp:26:36: error: 'f' was not declared in this scope
   while(j && !ch[j][T[i]-'a']) j = f[j];
                                    ^
0_0_28810064_24743.cpp:27:7: error: 'ch' was not declared in this scope
   j = ch[j][T[i]-'a'];
       ^
0_0_28810064_24743.cpp:28:6: error: 'val' was not declared in this scope
   if(val[j]) ans++;
      ^
0_0_28810064_24743.cpp:28:14: error: 'ans' was not declared in this scope
   if(val[j]) ans++;
              ^
0_0_28810064_24743.cpp:29:9: error: 'val' was not declared in this scope
   while(val[last[j]]&&last[j]) {
         ^
0_0_28810064_24743.cpp:29:13: error: 'last' was not declared in this scope
   while(val[last[j]]&&last[j]) {
             ^
0_0_28810064_24743.cpp:30:4: error: 'ans' was not declared in this scope
    ans++; j = last[j];
    ^
0_0_28810064_24743.cpp: In function 'int getFail()':
0_0_28810064_24743.cpp:36:2: error: 'f' was not declared in this scope
  f[0] = 0;
  ^
0_0_28810064_24743.cpp:38:11: error: 'ch' was not declared in this scope
   int u = ch[0][i];
           ^
0_0_28810064_24743.cpp:40:23: error: 'last' was not declared in this scope
    f[u] = 0;Q.push(u);last[u]= 0;
                       ^
0_0_28810064_24743.cpp:46:12: error: 'ch' was not declared in this scope
    int u = ch[r][c];
            ^
0_0_28810064_24743.cpp:51:4: error: 'last' was not declared in this scope
    last[u] = val[f[u]] ? f[u] : last[f[u]];
    ^
0_0_28810064_24743.cpp:51:14: error: 'val' was not declared in this scope
    last[u] = val[f[u]] ? f[u] : last[f[u]];
              ^
0_0_28810064_24743.cpp: In function 'int main()':
0_0_28810064_24743.cpp:56:14: error: 't' was not declared in this scope
  scanf("%d",&t);
              ^
0_0_28810064_24743.cpp:58:15: error: 'n' was not declared in this scope
   scanf("%d",&n);
               ^
0_0_28810064_24743.cpp:59:10: error: 'ch' was not declared in this scope
   memset(ch[0],0,sizeof(ch[0]));
          ^
0_0_28810064_24743.cpp:60:10: error: 'val' was not declared in this scope
   memset(val,0,sizeof(val)) ;
          ^
0_0_28810064_24743.cpp:61:10: error: 'last' was not declared in this scope
   memset(last,0,sizeof(last));
          ^
0_0_28810064_24743.cpp:62:10: error: 'f' was not declared in this scope
   memset(f,0,sizeof(f));
          ^
0_0_28810064_24743.cpp:70:17: error: 'ans' was not declared in this scope
   printf("%d\n",ans);
                 ^


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-07-07 02:23:25, Gzip enabled