2013年12月15日
摘要: 之前对KMP一直处于朦胧期,看书能看懂,就是自己写不出来…今天在大神牛Matrix67的神的指示下,终于掌握(个人感觉)。贴上连接http://www.matrix67.com/blog/archives/115/。随手拿起以前在hdoj上的1711练手,哪知问题出现了。其实这题很久以前就AC了,不过由于它要求的只是第一个匹配的位置,所以循环加strstr水过。而且貌似效率比KMP还要高…下面贴上错误的KMP代码 1 #include 2 #include 3 #include 4 #define UNLOCAL 5 #define MAXM 10000 + 10 6 #define M... 阅读全文
posted @ 2013-12-15 15:28 Xfocuser 阅读(253) 评论(0) 推荐(0) 编辑