摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1247题意:给你一连串的单词,输出其中可以由所给出的两个单词(可以自己和自己组成)组成的单词。思路:建好字典树后,枚举单词的组成就好。#include<iostream>#include<cstring>using namespace std;typedef struct tree{ tree *next[26]; int flag;}tree;tree *root=(tree *)malloc(sizeof(tree));char s[50000][50];void creat(ch 阅读全文
posted @ 2012-12-11 12:39 紫忆 阅读(868) 评论(0) 推荐(0) 编辑