随笔分类 -  字典树

摘要:字典树模板题。题目链接http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=1500View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 #define N 26 5 struct node 6 { 7 int num; 8 struct node *next[N]; 9 }tree[21000];10 int t=0;11 struct node *creat()12 阅读全文
posted @ 2012-08-15 21:08 时光旅行的懒猫 阅读(346) 评论(0) 推荐(0)
摘要:字典树模板题题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1247View Code 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #define N 26 5 #define maxn 1000000 6 char s[50001][101]; 7 struct node 8 { 9 int flag;10 struct node *next[N];11 }tree[maxn];12 int t=0;13 struct no 阅读全文
posted @ 2012-08-15 21:06 时光旅行的懒猫 阅读(216) 评论(0) 推荐(0)