CF175C 贪心,注意有不少细节,很容易死循环TLE 贪心是显而易见的,每次枚举价值最小的物品,进行销毁操作 朴素的枚举每一件物品复杂度为\(O(\sum k_i)\),明显超时 我们注意到朴素的+1枚举中有很多情况是重复的,那就可以通过乘法来跳过 #include <bits/stdc++.h> #define int long long using namespace std; int n,ans,m,p[105]; struct obj{int k,c;}a[105]; inline…
Problem Description Many geometry(几何)problems were designed in the ACM/ICPC. And now, I also prepare a geometry problem for this final exam. According to the experience of many ACMers, geometry problems are always much trouble, but this problem is ve…
FJNU 1151 Fat Brother And Geometry(胖哥与几何) Time Limit: 1000MS Memory Limit: 257792K [Description] [题目描述] Fat brother enrolled in computer graphics, recently teacher arranged a job: given two straight lines and a circle, judge if the round is between…
Mike and Geometry Problem 题目链接: http://acm.hust.edu.cn/vjudge/contest/121333#problem/I Description Mike wants to prepare for IMO but he doesn't know geometry, so his teacher gave him an interesting geometry problem. Let's define f([l, r]) = r - l + 1…
geometry Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 340 Accepted Submission(s): 256 Problem Description There is a point P at coordinate (x,y).A line goes through the point, and intersec…
Problem B. Geometry ProblemTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=88926#problem/B Description Peter is studying in the third grade of elementary school. His teacher of geometry often gives h…
geometry Accepts: 324 Submissions: 622 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description There is a point PP at coordinate (x,y)(x,y). A line goes through the point, and intersects with the posti…
HDU 1000 A + B Problem I/O HDU 1001 Sum Problem 数学 HDU 1002 A + B Problem II 高精度加法 HDU 1003 Maxsum 贪心 HDU 1004 Let the Balloon Rise 字典树,map HDU 1005 Number Sequence 求数列循环节 HDU 1007 Quoit Design 最近点对 HDU 1008 Elevator 模拟 HDU 1010 Tempter of th…