
二分查找
SCUT_Pein
这个作者很懒,什么都没留下…
展开
-
Subsequence--二分查找
DescriptionA sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal原创 2013-03-12 20:01:14 · 791 阅读 · 0 评论 -
UVA10821--Constructing BST(贪心+二分)
BST (Binary Search Tree) is an efficient data structure for searching. In a BST all the elements of the left sub-tree are smaller and those of right sub-tree are greater than the root. A typical examp原创 2014-04-06 22:49:27 · 847 阅读 · 0 评论 -
CF237 E 404E - Maze 1D(二分)
Valera has a strip infinite in both directions and consisting of cells. The cells are numbered by integers. The cell number 0 has a robot.The robot has instructions — the sequence of moves that he原创 2014-03-20 20:26:26 · 822 阅读 · 0 评论 -
POJ2728--Desert King
DescriptionDavid the Great has just become the king of a desert country. To win the respect of his people, he decided to build channels all over his country to bring water to every village. Villag原创 2013-08-01 17:10:10 · 763 阅读 · 0 评论 -
POJ3273--Monthly Expense
DescriptionFarmer 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原创 2013-03-18 21:11:11 · 742 阅读 · 0 评论 -
POJ1905--Expanding Rods
DescriptionWhen a thin rod of length L is heated n degrees, it expands to a new length L'=(1+n*C)*L, where C is the coefficient of heat expansion.When a thin rod is mounted on two solid walls an原创 2013-03-18 19:43:18 · 828 阅读 · 0 评论 -
POJ3258--River Hopscotch
DescriptionEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, straight原创 2013-03-18 21:44:23 · 713 阅读 · 0 评论 -
POJ3122--Pie--二分
DescriptionMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my par原创 2013-03-15 18:36:18 · 853 阅读 · 0 评论 -
POJ3292--Semi-prime H-numbers
DescriptionThis problem is based on an exercise of David Hilbert, who pedagogically suggested that one study the theory of4n+1 numbers. Here, we do only a bit of that.An H-number is a positive原创 2013-03-15 11:58:29 · 723 阅读 · 0 评论 -
CF 421D--Bug in code
Recently a serious bug has been found in the FOS code. The head of the F company wants to find the culprit and punish him. For that, he set up an organizational meeting, the issue is: who's bugged the原创 2014-04-24 19:14:13 · 932 阅读 · 0 评论