原创 吐槽

原创 POJ 3974 - Palindrome(manacher)

Problem link 分析: manacher求最長迴文字串 代碼: #include <iostream> using namespace std; const int maxn = 1000010; char s[max

原创 HDU 1711 - Number Sequence(kmp)

Problem link 分析: kmp匹配 代碼: _next[]數組的名字不能爲next[],否則會編譯出錯 #include <iostream> using namespace std; const int n = 1

原创 HDU 1686 - Oulipo(kmp)

Problem link 分析: kmp匹配 代碼: #include <cstdio> #include <cstring> const int maxn = 1000010; char w[maxn], t[maxn]; in

原创 HDU 3068 - 最長迴文(manacher)

Problem link 分析: manacher求最長迴文字串 代碼: 使用cin,cout的話需加上ios::sync_with_stdio(false);否則會超時。 #include <iostream> using n

原创 HDU 2087 - 剪花布條(kmp)

Problem link 分析: kmp匹配 代碼: #include <iostream> #include <cstring> using namespace std; const int maxn = 1005; char