
acm
hccz95
这个作者很懒,什么都没留下…
展开
-
一个小错误
去年整理网络流模板的时候,有一道题一直runtime error, 当时也没管了今天有出现同样的情况,每次提交0ms就runtime error,经过反复提交发现了错误我的dinic模板有一个 inf,为了让它和dist的最大值相等 //dist用memset赋值为63, memset(dist, 63, sizeof(dist))原创 2015-04-22 15:18:27 · 400 阅读 · 0 评论 -
zoj3862 intersection[2015浙大校赛C题]
题意:按1-2n的编号给定2n个点以及n条线段,每个点属于且仅属于一条线段。线段用端点的编号确定。现在一次操作可以交换两个点的编号,要求在不超过n+10次的操作后使得任意两条线段不相交。输入保证任意两个点不重合,任意三个点不相交。原创 2015-04-13 18:26:43 · 871 阅读 · 0 评论 -
UVA 11880 Ball in a Rectanglefds
运动问题,有边界,入射角等于出射角所以x、y分别按周期变化DescriptionInput: Standard Input Output: Standard Output There is a rectangle on the cartesian plane, with bottom-left corner at (0,0) and top-right corne原创 2015-04-29 20:27:17 · 529 阅读 · 0 评论 -
树状数组三种写法
第一种:点修改 区间求和 hdu1166 http://acm.hdu.edu.cn/showproblem.php?pid=1166 题意:N个营地,1..N,每个营地有一些人 两种操作: 1. 给某个营地加上或减去一些人 2. 询问一个区间的总人数inline void add(int x, int value){ for (int i=x; i<=n原创 2015-07-01 23:49:47 · 536 阅读 · 0 评论