Monthly Expense(二分)

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 ...

2018-10-15 11:23:15

阅读数:16

评论数:0

Three-level Laser (贪心+二分)

Three-level Laser An atom of element X can exist in n distinct states with energies E1 < E2 < ... &l...

2018-05-22 16:47:48

阅读数:46

评论数:0

The Longest Straight FZU - 2216 (枚举左端点+二分右端点)

The Longest Straight FZU - 2216 ZB is playing a card game where the goal is to make s...

2018-04-15 15:48:38

阅读数:82

评论数:0

Prefix Sums CodeForces - 837F(思维+二分+组合数)

Prefix Sums CodeForces - 837FConsider the ...

2018-04-05 14:45:11

阅读数:37

评论数:0

Gadgets for dollars and pounds CodeForces - 609D (二分)

Gadgets for dollars and pounds CodeForces - 609D Nura wants to buy k gadgets. She has...

2018-03-22 10:45:13

阅读数:46

评论数:0

Professor GukiZ and Two Arrays CodeForces - 620D (暴力枚举+二分搜索)

Professor GukiZ and Two Arrays CodeForces - 620D Professor GukiZ has two arrays of in...

2018-03-14 09:42:03

阅读数:47

评论数:0

One-Dimensional Battle Ships CodeForces - 567D (二分做法+解释)

One-Dimensional Battle Ships CodeForces - 567D Alice and Bob love playing one-dimensional battle ships. They play on the field in the for...

2018-01-28 19:02:07

阅读数:133

评论数:0

4个数和为0 51Nod - 1267

4个数和为051Nod - 1267给出N个整数,你来判断一下是否能够选出4个数,他们的和为0,可以则输出"Yes",否则输出"No"。Input 第1行,1个数N,N为数组的长度(4 <= N &...

2018-01-26 17:31:31

阅读数:104

评论数:0

Mike and Chocolate Thieves CodeForces - 689C (二分思想)

Mike and Chocolate Thieves CodeForces - 689C Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local fac...

2018-01-26 17:24:53

阅读数:83

评论数:0

Burning Midnight Oil CodeForces - 165B

Burning Midnight Oil CodeForces - 165B One day a highly important task was commissioned to Vasya — writing a program in a night. The progra...

2018-01-23 09:38:27

阅读数:109

评论数:0

Telephone Lines POJ - 3662(二分+最短路)

Telephone Lines POJ - 3662 Farmer John wants to set up a telephone line at his farm. Unfortunately, the phone company is uncooperativ...

2017-12-07 16:23:12

阅读数:143

评论数:0

Magic Powder - 2 CodeForces - 670D2 (二分)

Magic Powder - 2  CodeForces - 670D2  The term of this problem is the same as the previous one, the only exception — increased restrictions. ...

2017-11-15 21:29:36

阅读数:86

评论数:0

Distances to Zero(lower_bound和upper_bound应用)

B. Distances to Zero time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ...

2017-10-29 15:53:15

阅读数:176

评论数:0

POJ 2456 Aggressive cows 二分

题目大意: 给你n个牛舍,把c只牛放在牛舍里,要求最近的两头牛之间距离最大。 思路: 直接二分,从最大长度开始二分查找,选取一个长度,然后选择两个牛圈大于等于这个长度进行安置牛,最后判断能不能把所有的牛放进去,如果可以left=mid找更大的,如果不行,说明太大了,right=mid找小一点...

2017-10-21 23:22:58

阅读数:64

评论数:0

二分查找

下面谈一谈我对二分查找的理解 看上去二分查找主要会用到的是有两种,加上最简单的是三种,因为做过的题比较少,目前只先谈一谈对这三个的理解,以后做的题多了再修改 1.最朴素的二分 /**  * 二分查找,找到该值在数组中的下标,否则为-1  */ static int binarySera...

2017-10-21 22:31:37

阅读数:79

评论数:0

Cable master(二分查找)

Cable master Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 31900   Accepted: 6827 Description Inhabitants of the Wonderland ...

2017-10-18 20:33:25

阅读数:130

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭