摘要:
HDU 4080 Stammering Aliens Solution: \(Hash\)。二分长度+哈希,比较明显的做法,注意细节即可。 Code: #include<bits/stdc++.h> using namespace std; typedef long long ll; const i 阅读全文
摘要:
HDU 1251 统计难题 Solution: \(Trie\)。插入字符串时,将前缀链上的所有结点的点权加一,代表该前缀出现次数。查询时直接返回出现次数即可。注意输入格式。 Code: #include<bits/stdc++.h> using namespace std; const int N 阅读全文
摘要:
POI 2006 OKR-Periods of Words Solution: Wating... Code: #include<bits/stdc++.h> using namespace std; const int N=1000005; int n; char s[N]; int Next[N 阅读全文