HDU-1247-Hats Words
摘要:
HDU-1247-Hats Wordshttp://acm.hdu.edu.cn/showproblem.php?pid=1247还是字典树的题目,将每个单词分成两个单词即可,查找是否两个单词均在字典树中注意建树的时和之前略有区别,这题在插入单词时,只需记录单词结尾的节点,不需要记录一个单词的所有前缀#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
using namespace std;
char word[50005][20];
struct nod 阅读全文