摘要: KMP :http://www.cnblogs.com/dolphin0520/archive/2011/08/24/2151846.html 阅读全文
posted @ 2014-08-14 15:58 HuberyQian 阅读(85) 评论(0) 推荐(0) 编辑
摘要: #include#includechar s1[1000005],s2[1000005];int next[1000005];void get_next(char s[1000005]){ int i = 0; int len = strlen(s); next[0] = -1;... 阅读全文
posted @ 2014-08-14 15:19 HuberyQian 阅读(133) 评论(0) 推荐(0) 编辑
摘要: //BF 算法int BFmatch(char *s,char *p){ int i,j; i = 0; while(i<strlen(s)) { j = 0; while(s[i] == p[j] && j<strlen(p)) {... 阅读全文
posted @ 2014-08-14 14:45 HuberyQian 阅读(112) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdut.edu.cn:8080/vjudge/contest/view.action?cid=232#problem/BWe all know that a pair of distinct points on a plane defines a line and that ... 阅读全文
posted @ 2014-08-14 10:24 HuberyQian 阅读(145) 评论(0) 推荐(0) 编辑