0_0_24685772_31252.cpp: In function 'void get_next(char*, int)':
0_0_24685772_31252.cpp:14:39: error: 'max' was not declared in this scope
next[i]=min(next[i-k],max(maxr-i+1,0));//这里是扩展KMP的精髓,即算法核心思想就是这
^
0_0_24685772_31252.cpp:14:40: error: 'min' was not declared in this scope
next[i]=min(next[i-k],max(maxr-i+1,0));//这里是扩展KMP的精髓,即算法核心思想就是这
^
0_0_24685772_31252.cpp: In function 'void EKMP(char*, char*, int*, int)':
0_0_24685772_31252.cpp:28:41: error: 'max' was not declared in this scope
extend[i]=min(next[i-k],max(maxr-i+1,0));//next[i-k]是a与b从i开始的可能已经匹配的长度
^
0_0_24685772_31252.cpp:28:42: error: 'min' was not declared in this scope
extend[i]=min(next[i-k],max(maxr-i+1,0));//next[i-k]是a与b从i开始的可能已经匹配的长度
^
0_0_24685772_31252.cpp: In function 'int main()':
0_0_24685772_31252.cpp:36:2: error: 'cin' was not declared in this scope
cin>>n;
^
0_0_24685772_31252.cpp:39:16: error: 'scanf' was not declared in this scope
scanf("%s",s1);
^
0_0_24685772_31252.cpp:40:20: error: 'strlen' was not declared in this scope
int len=strlen(s1);
^
0_0_24685772_31252.cpp:54:3: error: 'cout' was not declared in this scope
cout<<ans<<endl;
^
0_0_24685772_31252.cpp:54:14: error: 'endl' was not declared in this scope
cout<<ans<<endl;
^
|