摘要: /*trie树建立,然后递归打印所有的电话号码(统计次数大于1的打印出来),内存在HOJ上爆了,应该是递归时爆栈了。。。第二个代码两个都是可以AC的,要注意POJ上是只输入一个案例,HOJ上输入多个样例39268K938MS第二个14232K891MS*/#include <cstdio>#include <cstring>#include <iostream>using namespace std;#define X 125char s[X];int n;struct trie{ int id; trie *p[10]; char s[X]; trie() 阅读全文
posted @ 2012-05-07 10:34 yejinru 阅读(213) 评论(0) 推荐(1) 编辑