摘要: 字典树关键在于怎样找出两个单词拼成的单词,可以用strncpy函数字典树标记了单词的结尾View Code 1 /* 2 字典树 3 */ 4 #include<stdio.h> 5 #include<stdlib.h> 6 #include<string.h> 7 #include<iostream> 8 #include<algorithm> 9 #include<queue>10 #include<map>11 #include<math.h>12 using namespace std;13 阅读全文
posted @ 2012-12-10 21:00 xxx0624 阅读(403) 评论(0) 推荐(0) 编辑
摘要: View Code 1 /* 2 贪心 排序 3 */ 4 #include<stdio.h> 5 #include<stdlib.h> 6 #include<string.h> 7 #include<iostream> 8 #include<algorithm> 9 #include<queue>10 #include<map>11 #include<math.h>12 using namespace std;13 const int maxn = 1505;14 const int inf = 阅读全文
posted @ 2012-12-10 19:37 xxx0624 阅读(741) 评论(8) 推荐(0) 编辑