摘要: 819467asia2562219EAccepted1260 KB62 msC++902 B2012-11-17 19:18:09拓扑排序水题,View Code #include<cstdio>#include<cstring>#include<string>#include<cstdlib>#include<algorithm>#include<iostream>using namespace std;#define MAXN 1111111int map[501][501],deg[501];int n,m;void 阅读全文
posted @ 2012-11-17 19:25 TO_Asia 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 又是字典树。 水题做的有点多了啊 ……View Code #include<cstdio>#include<cstring>#include<string>#include<cstdlib>#include<algorithm>#include<iostream>#include<map>using namespace std;#define MAXN 1111111struct node{ int num; node *next[26];};node *root,tree[MAXN];int tot=0;no 阅读全文
posted @ 2012-11-17 17:00 TO_Asia 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 818786asia2562219CAccepted4464 KB218 msC++615 B2012-11-17 16:05:08写个了字典树 但又发现map 这个以前没用过的 容器 很好用map 建立 key-value 的关系表 在log[N]内查找出value 这里用单词做key,value为1 及其简洁的查找子串是否存在(就是个懒)。。。View Code #include<cstdio>#include<cstring>#include<string>#include<cstdlib>#include<algorithm> 阅读全文
posted @ 2012-11-17 16:16 TO_Asia 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 71763832012-11-17 11:06:13Accepted110315MS292K1454 BC++TO_Asia71762832012-11-17 10:57:31Wrong Answer110315MS288K1176 BC++TO_Asia71762002012-11-17 10:47:35Wrong Answer11030MS288K1175 BC++TO_Asia一开始悲催的 想用STL 事实证明强大的算法秒杀一切STL。View Code #include<iostream>#include<string>#include<string.h& 阅读全文
posted @ 2012-11-17 11:10 TO_Asia 阅读(384) 评论(0) 推荐(0) 编辑