题目用map写超便捷也可以用字典树来写我以前是用map的:#include#include#include#include#include#include #includeusing namespace std;string word[50010];int main(){ int i=0,n,... Read More
题目字典树,注意初始化的位置~!!位置放错,永远也到不了终点了org。。。。我是用数组模拟的字典树,这就要注意内存开多少了,,要开的不大不小刚刚好真的不容易啊。。。。我用了val来标记是否是同一个串分解而来的,保存的是串的编号num记录数目。//string &replace(iterator fi... Read More