1.Circular Barn http://www.usaco.org/index.php?page=viewproblem2&cpid=621 贪心 #include <cstdio> #include <vector> #include <algorithm> #include <cstring> using namespace std; long long sum(long long v) { )*(*v+)/; } int main()…
1.Splitting the Field http://usaco.org/index.php?page=viewproblem2&cpid=645 给二维坐标系中的n个点,求ans=用一个矩形覆盖所有点所用矩形面积-用两个矩形覆盖所有点所用两个矩形的最小面积和,而且两个矩形不能重合(边重合也不行) 枚举两个矩形的分割线,也就是把所有点分成两个部分,枚举分割点:先预处理每个点之前和之后的最大,最低高度 #include<algorithm> #include<cstdio>…
preface解题报告------------------------------------------------------------------------------------------------------------------------------------------------[题目] 阿拉伯数字转换为罗马数字的规则如下: 1: I 2: II 3: III 4: IV 5: V 6: VI 7: VII 8: VIII 9: IX 10: X 而我们本题可以用到…