AcWing 779. 最长公共字符串后缀
更多...
#include <acwing.h>
|
static int | main (istream &cin, ostream &cout) |
|
AcWing 779. 最长公共字符串后缀
在文件 acwing.h 第 1344 行定义.
◆ main()
int acwing::acwing779::main |
( |
istream & |
cin, |
|
|
ostream & |
cout |
|
) |
| |
|
static |
在文件 acwing.cpp 第 4351 行定义.
4360 for(
int i = 1; i < n; i++) {
4363 if(!suffix.empty()) {
4364 auto ss = stringstream();
4365 for(
int j = 0; j < min(str.length(), suffix.length()) && suffix[suffix.length() - 1 - j] == str[str.length() - 1 - j]; j++) {
4366 ss << suffix[suffix.length() - 1 - j];
4368 string s = ss.str();
4369 suffix = string(s.rbegin(), s.rend());
4372 cout << suffix << endl;
被这些函数引用 acwing::TEST().
该类的文档由以下文件生成: