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_34084869_29734.cpp:9:1: error: expected initializer before 'int'
 int n, m, p;
 ^
0_0_34084869_29734.cpp: In function 'void getNext(int*)':
0_0_34084869_29734.cpp:14:5: error: 'nex' was not declared in this scope
     nex[0] = -1;
     ^
0_0_34084869_29734.cpp:16:15: error: 'm' was not declared in this scope
     while(i < m)
               ^
0_0_34084869_29734.cpp: In function 'int kmp(int*, int*)':
0_0_34084869_29734.cpp:26:16: error: 'm' was not declared in this scope
     getNext(b, m);
                ^
0_0_34084869_29734.cpp:27:24: error: 'p' was not declared in this scope
     for(int k = 0; k < p; k++)
                        ^
0_0_34084869_29734.cpp:30:19: error: 'n' was not declared in this scope
         while(i < n)
                   ^
0_0_34084869_29734.cpp:32:47: error: 'nex' was not declared in this scope
             while(j != -1 && a[i] != b[j])j = nex[j];
                                               ^
0_0_34084869_29734.cpp:34:35: error: 'nex' was not declared in this scope
             if(j >= m){ans++; j = nex[j];}
                                   ^
0_0_34084869_29734.cpp: In function 'int main()':
0_0_34084869_29734.cpp:46:26: error: 'n' was not declared in this scope
         scanf("%d%d%d", &n, &m, &p);
                          ^
0_0_34084869_29734.cpp:46:30: error: 'm' was not declared in this scope
         scanf("%d%d%d", &n, &m, &p);
                              ^
0_0_34084869_29734.cpp:46:34: error: 'p' was not declared in this scope
         scanf("%d%d%d", &n, &m, &p);
                                  ^


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-29 11:04:58, Gzip enabled