
二分
abns
这个作者很懒,什么都没留下…
展开
-
poj27854 Values whose Sum is 0
http://poj.org/problem?id=27854 Values whose Sum is 0Time Limit: 15000MS Memory Limit: 228000K Total Submissions: 28927 Accepted: 8753 Case Time Limit: 5000MS DescriptionTh...原创 2018-08-06 09:24:36 · 156 阅读 · 0 评论 -
2018 百度之星 p1m2
度度熊很喜欢数组!!我们称一个整数数组为稳定的,若且唯若其同时符合以下两个条件:1. 数组里面的元素都是非负整数。2. 数组里面最大的元素跟最小的元素的差值不超过 1。举例而言,[1,2,1,2] 是稳定的,而 [−1,0,−1] 跟 [1,2,3] 都不是。现在,定义一个在整数数组进行的操作:* 选择数组中两个不同的元素 a 以及 b,将 a 减去 2,以及将 b 加上 1。举例而...原创 2018-08-15 21:42:35 · 218 阅读 · 0 评论 -
HDU 1969 Pie (二分)
My 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 party and each of ...原创 2018-08-15 18:13:45 · 171 阅读 · 0 评论 -
POJ 3258 River Hopscotch
Every 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 river with a ro...原创 2018-08-15 17:41:27 · 96 阅读 · 0 评论 -
poj 3061 Subsequence
A 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 length o...原创 2018-08-15 16:49:18 · 111 阅读 · 0 评论 -
51nod 1267 4个数和为0(二分法)
http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1267&judgeId=5980421267 4个数和为0 基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 收藏 关注给出N个整数,你来判断一下是否能够选出4个数,他们的和为0,可以则输出"Yes",否则输出"...原创 2018-08-08 11:19:29 · 129 阅读 · 0 评论 -
HDU 3763 CD
Jack and Jill have decided to sell some of their Compact Discs, while they still have some value. They have decided to sell one of each of the CD titles that they both own. How many CDs can Jack and J...原创 2018-08-15 15:51:23 · 346 阅读 · 0 评论 -
poj 1064
http://poj.org/problem?id=1064Cable masterTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 64847 Accepted: 13351 DescriptionInhabitants of the Wonderland have decid...原创 2018-08-15 13:57:47 · 140 阅读 · 0 评论 -
51nod 1105第K大的数
1105 第K大的数 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注数组A和数组B,里面都有n个整数。数组C共有n^2个整数,分别是:A[0] * B[0],A[0] * B[1] ...... A[0] * B[n-1]A[1] * B[0],A[1] * B[1] ...... A[1] * B[n-1] .........原创 2018-08-14 11:38:51 · 136 阅读 · 0 评论 -
51nod1010只包含因子2.3.5的数
http://www.51nod.com/onlineJudge/questionCode.html#!problemId=10101010 只包含因子2 3 5的数 基准时间限制:1 秒 空间限制:131072 KB 分值: 10 难度:2级算法题 收藏 关注K的因子中只包含2 3 5。满足条件的前10个数是:2,3,4,5,6,8,9,10,12,15。所有这样的K组成...原创 2018-08-01 16:48:54 · 121 阅读 · 0 评论 -
51nod 1128 正整数分组
、1128 正整数分组 V2 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注给出一个长度为N的正整数数组,不改变数组元素的顺序,将这N个数分为K组。各组中元素的和分别为S1,S2....Sk。如何分组,使得S1至Sk中的最大值最小?例如:1 2 3 4 5 6分为3组,{1 2 3} {4 5} {6},元素和为6, 9...原创 2018-08-22 10:39:54 · 212 阅读 · 0 评论