码迷,mamicode.com
首页 >  
搜索关键字:crb and candies    ( 410个结果
poj3159 Candies
POJ - 3159 Candies 题目大意: 给n个小孩发糖,有m个条件 每个条件给出a,b,c,使得v[b]-v[a]<=c 求v[n]-v[1]的最大值 Sample Input 2 2 1 2 5 2 1 4 Sample Input 2 2 1 2 5 2 1 4 Sample Outp ...
分类:其他好文   时间:2017-08-01 00:51:13    阅读次数:214
[poj 2886] Who Gets the Most Candies? 线段树
Description N children are sitting in a circle to play a game. The children are numbered from 1 to N in clockwise order. Each of them has a card with ...
分类:其他好文   时间:2017-07-29 20:22:22    阅读次数:159
CodeForces 450A 队列
Description There are n children in Jzzhu's school. Jzzhu is going to give some candies to them. Let's number all the children from 1 to n. The i-th c ...
分类:其他好文   时间:2017-07-28 16:42:44    阅读次数:146
Codeforces C - Om Nom and Candies
C - Om Nom and Candies 思路:贪心+思维(或者叫数学)。假设最大值max(wr,wb)为wr,当c/wr小于√c时,可以枚举r糖的数量(从0到c/wr),更新答案,复杂度√c;否则,假设hr/wr<hb/wr,得到hr*wb<hb*wr,由这个等式可知,在有wb*wr重量限制的 ...
分类:其他好文   时间:2017-07-25 15:53:42    阅读次数:141
【LeetCode从零单排】No.135Candy(双向动态规划)
1.题目There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following ...
分类:其他好文   时间:2017-07-16 19:24:29    阅读次数:147
[LeetCode] Distribute Candies
Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of th ...
分类:其他好文   时间:2017-07-09 13:48:10    阅读次数:111
[Leetcode] candy 糖果
There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following re ...
分类:其他好文   时间:2017-07-03 22:31:11    阅读次数:240
LeetCode 575. Distribute Candies (发糖果)
Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of th ...
分类:其他好文   时间:2017-06-29 10:01:10    阅读次数:136
【HDOJ 1009】 CRB and String
【HDOJ 1009】 CRB and String 每组两个串s t 仅仅由小写字母组成 问从s能不能变成t 改变的操作为选一个字符 在后面加上一个与所选字符不同的字符 这样的操作能够做无数次 问能不能达t 首先s能到t的首要条件是 对于随意字母 s中出现的次数小于等于t中出现的次数 其次细致想想 ...
分类:其他好文   时间:2017-06-27 14:54:27    阅读次数:106
【HDOJ 5407】 CRB and Candies (大犇推导
【HDOJ 5407】 CRB and Candies 赛后看这题题解仅仅有满眼的迷茫……………… g(N) = LCM(C(N,0),C(N,1),...,C(N,N)) f(n)\ =\ LCM(1, 2, ..., n)f(n) = LCM(1,2,...,n), the fact g(n)\ ...
分类:其他好文   时间:2017-06-24 16:21:00    阅读次数:130
410条   上一页 1 ... 12 13 14 15 16 ... 41 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!