2013年8月31日

摘要: 下述代码在VS2010上的cpp文件可通过,在杭电OJ上的G++编译项上可通过。 1 #include 2 #include 3 struct student{ 4 student *p; 5 int a; 6 student() 7 { 8 a=100; 9 p=NULL;10 }11 };12 int main()13 {14 student *root=new student();15 printf("%d\n",root->a);16 printf("%s\n",root->p);17 ... 阅读全文
posted @ 2013-08-31 21:21 holyprince 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 估计在OJ上刷过题的都会对AC自动机这个名词很感兴趣,同样,记得去年ACM暑期集训的时候,在最后讲到字符串部分,听说了这个算法的名字之后就对于它心向往之,AC正好是Accept的简称,字面意义上的理解是一个可以让题目自动AC的东西,那这是有多厉害!很多次和同学开玩笑,都会提起这个名词。不过其实毕竟只是个字符串处理的算法,真正学起来还是费了不少力。百度一下就会看到一个模版题:hdu 2222 Keywords Search 1 #include 2 #include 3 #include 4 struct node{ 5 node *fail; 6 node *nex... 阅读全文
posted @ 2013-08-31 19:25 holyprince 阅读(222) 评论(0) 推荐(0) 编辑

导航