06 2016 档案

codeforces 356C Bear and Square Grid
摘要:说是一个k的方块,里面的都可以变成点,问最大的联通块。2A的原因是这个有意思的删点,联通块里的点不能有一个不在就直接删除,而是要标记一下,都出去了才能删除。机智。大概思路就是,预处理每个联通快,完事把这个里面所有点加一遍,容斥+二维预处理前缀和求出块内有多少是变过来的点。最后直接一步步忘向右滑动即可 阅读全文

posted @ 2016-06-22 18:00 very_czy 阅读(284) 评论(0) 推荐(0)

POJ3608(旋转卡壳--求两凸包的最近点对距离)
摘要:分析:以下内容来自:http://blog.csdn.net/acmaker/article/details/3178696 考虑如下的算法, 算法的输入是两个分别有m和n个顺时针给定顶点的凸多边形P和Q。 1.计算P上y坐标值最小的顶点(称为 yminP )和Q上y坐标值最大的顶点(称为 ymax 阅读全文

posted @ 2016-06-11 19:33 very_czy 阅读(395) 评论(0) 推荐(0)

The King’s Walk (动规)
摘要:思路很重要,从x1,y1到x2,y2. 八向; 问最短步数的路径有几条。 #include <cstdio>#include <iostream>#include <cmath>#include <cstring>#include <cstdlib>#include <algorithm>using 阅读全文

posted @ 2016-06-10 20:55 very_czy 阅读(177) 评论(0) 推荐(0)

1378 The Falling Circle
摘要:#include <cstdio>#include <iostream>#include <cmath>#include <cstring>#include <cstdlib>#include <algorithm>#define LL long long#define DB doubleusing 阅读全文

posted @ 2016-06-10 15:18 very_czy 阅读(114) 评论(0) 推荐(0)

lightoj 1118 Incredible Molecules 圆面积求交,模板
摘要:看了kuangbin神的版子,自己的都不敢往上贴了。。。 #include <cstdio>#include <cstring>#include <algorithm>#include <cstdlib>#include <iostream>#include <vector>#include <cm 阅读全文

posted @ 2016-06-10 13:00 very_czy 阅读(143) 评论(0) 推荐(0)

一发kuangbin~~AC自动机版子,带注解,计数的作用。
摘要:屌丝的字典树。。。醉了。。。 #include #include #include #include #include #include #include using namespace std; struct Trie { int next[500010][26],fail[500010],isend[500010]; int root,L; int ... 阅读全文

posted @ 2016-06-02 11:43 very_czy 阅读(443) 评论(0) 推荐(0)

导航