![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二分,三分
文章平均质量分 80
Cworld2017
这个作者很懒,什么都没留下…
展开
-
C - 4 Values whose Sum is 0
The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D are such that a + b + c + d = 0 . In the followin原创 2017-07-29 10:17:22 · 720 阅读 · 0 评论 -
Quoit Design
20 01 121 11 13-1.5 00 00 1.50给你n个平面上的坐标,求平面上的最近点对的距离的一半关键是求最近点对。如果直接遍历,时间会很大,所以这里分治,将坐标按x轴排序,然后将点以mid为中线分为左右两部分,左边最小为点距为d1,右边最小点距为d2从中取最小值赋值给rad作为新的最小点距。然而,到目前为止,最小点距还有可能是来自分布在mid两...原创 2018-08-15 20:20:23 · 728 阅读 · 0 评论 -
B - Constructing Roads In JGShining's Kingdom
JGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines. Half of these cities are rich in resource (we call them rich cities) while the othe...原创 2018-02-08 11:12:44 · 232 阅读 · 0 评论 -
J - Delay Constrained Maximum Capacity Path HDU - 1839 spfa+二分
Consider an undirected graph with N vertices, numbered from 1 to N, and M edges. The vertex numbered with 1 corresponds to a mine from where some precious minerals are extracted. The vertex numbered w原创 2017-09-23 19:38:19 · 410 阅读 · 0 评论 -
B - Can you solve this equation?
Now,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try your lucky. InputThe first line of the input contains an integer T(1OutputFor原创 2017-07-28 19:54:39 · 340 阅读 · 0 评论 -
A - Can you find it?
Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck = X.InputThere原创 2017-07-28 17:48:43 · 1880 阅读 · 0 评论 -
B - Light Bulb
Compared to wildleopard's wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb in his house. Every night, he is wandering in his incommodious house,原创 2017-08-03 21:12:56 · 310 阅读 · 0 评论 -
E - Aggressive cows
Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000).His C (2 <= C <= N) cows原创 2017-07-29 19:53:07 · 513 阅读 · 0 评论 -
F - Drying
It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has decided to use a radiator to make drying faster. But原创 2017-07-30 17:12:33 · 285 阅读 · 0 评论 -
D - Monthly Expense
Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the exact amount of money (1 ≤moneyi ≤ 10,000) that原创 2017-07-29 15:24:56 · 241 阅读 · 0 评论 -
Design road 三分 多条河 陆地 建桥
You need to design road from (0, 0) to (x, y) in plane with the lowest cost. Unfortunately, there are N Rivers between (0, 0) and (x, y).It costs c1 Yuan RMB per meter to build road, and it costs c2 Y...原创 2018-08-18 17:02:40 · 303 阅读 · 0 评论