摘要: 倒着做,正着做是要GG的,每次将删的点加进去,反着存。代码能力太差了,改了好久,最后请教大佬发现智障问题 #include <stdio.h> #include <algorithm> #include <cstring> #include <cmath> #include <queue> #inc 阅读全文
posted @ 2017-10-24 21:02 新手-周 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 这道题对大佬来说都不屑写,但鉴于我是蒟蒻,不会高斯消元啊啊啊啊啊啊啊。 献上大佬的教程一篇:http://www.cnblogs.com/Robert-Yuan/p/4621481.html 设球心坐标为(x1,x2,x3...xn) 那么就有 (a1-x1)^2+(a2-x2)^2+...(an- 阅读全文
posted @ 2017-10-24 15:53 新手-周 阅读(135) 评论(0) 推荐(0) 编辑
摘要: tarjan跑一遍然后找大于1最小的联通分量 #include <stdio.h> #include <algorithm> #include <cstring> #include <cmath> #include <queue> #include <vector> using namespace 阅读全文
posted @ 2017-10-24 15:25 新手-周 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 比赛就是艺术,艺术就是爆炸。 T1 输出m-gcd(n,m) #include <stdio.h> #include <algorithm> #include <cstring> #include <cmath> #include <queue> #include <vector> using na 阅读全文
posted @ 2017-10-24 13:22 新手-周 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 再一次感受到了单调性的魅力,辛辛苦苦码完线段树,然后去看了看黄学长的博客,感觉瞬间崩溃了。。。然而我就是不会利用单调性~~ #include <stdio.h> #include <algorithm> #include <cstring> #include <cmath> using namesp 阅读全文
posted @ 2017-10-24 00:40 新手-周 阅读(109) 评论(2) 推荐(0) 编辑
摘要: 题目真是没谁了??~~看了半天,交完后发现自己比别的大佬慢了好多,于是去借鉴了一下,然后发现由于精度我们可以卡一下~~ 对于星球j,我们要求的和式为i∑k=1mk∗mjj−k 当j很大时,i也不会太大,我们可以把式子化成i∑k=1mk∗mjj−0.5i 用sumi表示前i个星球的质量和,那么和式可以 阅读全文
posted @ 2017-10-24 00:10 新手-周 阅读(156) 评论(0) 推荐(0) 编辑