摘要: 这道题对大佬来说都不屑写,但鉴于我是蒟蒻,不会高斯消元啊啊啊啊啊啊啊。 献上大佬的教程一篇: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 新手-周 阅读(132) 评论(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 新手-周 阅读(107) 评论(2) 推荐(0) 编辑
摘要: 题目真是没谁了??~~看了半天,交完后发现自己比别的大佬慢了好多,于是去借鉴了一下,然后发现由于精度我们可以卡一下~~ 对于星球j,我们要求的和式为i∑k=1mk∗mjj−k 当j很大时,i也不会太大,我们可以把式子化成i∑k=1mk∗mjj−0.5i 用sumi表示前i个星球的质量和,那么和式可以 阅读全文
posted @ 2017-10-24 00:10 新手-周 阅读(154) 评论(0) 推荐(0) 编辑
摘要: T1 按题意判断,每次直接输出即可。(莫名输入AFO) #include <stdio.h> #include <algorithm> #include <cstring> #include <cmath> #include <queue> #include <vector> using names 阅读全文
posted @ 2017-10-23 23:00 新手-周 阅读(150) 评论(0) 推荐(0) 编辑
摘要: T1 输入说的不太清楚,也没想到EOF于是就T了。 T2 写的暴力,得分在预期以内。 T3 完全没头绪 阅读全文
posted @ 2017-10-23 22:55 新手-周 阅读(120) 评论(0) 推荐(0) 编辑
摘要: dp(多重背包加01背包加优化) #include <stdio.h> #include <algorithm> #include <cstring> #include <cmath> #include <queue> #include <vector> using namespace std; c 阅读全文
posted @ 2017-10-23 18:12 新手-周 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 最小势(慎用register) #include <stdio.h> #include <algorithm> #include <cstring> #include <cmath> #include <queue> #include <vector> using namespace std; co 阅读全文
posted @ 2017-10-23 17:47 新手-周 阅读(177) 评论(0) 推荐(0) 编辑
摘要: T1 直接枚举位置,暴力过. #include <stdio.h> #include <algorithm> #include <cstring> #include <cmath> #include <queue> #include <vector> using namespace std; int 阅读全文
posted @ 2017-10-23 17:38 新手-周 阅读(134) 评论(0) 推荐(0) 编辑