码迷,mamicode.com
首页 >  
搜索关键字:crb and candies    ( 410个结果
POJ 2886 Who Gets the Most Candies? 反素数+线段树
题意:变形的约瑟夫环模型,每个人有一个数字a,从第K个人开始出列,如果数字是正的,就往后数a个人出列,如果书负数,就往反方向数。然后用最基本的线段树处理约瑟夫环的方法即可但是题目要求的是第x个出列的人的名字,x为1-N中约数最多的数中的最小的那个。这里需要求反素数,即不大于N约数最多的。写起来比较多...
分类:其他好文   时间:2014-07-15 08:50:32    阅读次数:241
Leetcode Candy
There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
分类:其他好文   时间:2014-07-09 13:31:26    阅读次数:239
POJ2886 Who Gets the Most Candies? 【线段树】+【单点更新】+【模拟】+【反素数】
Who Gets the Most Candies? Time Limit: 5000MS   Memory Limit: 131072K Total Submissions: 9416   Accepted: 2868 Case Time Limit: 2000MS Description N children are s...
分类:其他好文   时间:2014-07-09 12:46:35    阅读次数:234
Problem Candy
Problem Description:There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to...
分类:其他好文   时间:2014-07-07 16:22:28    阅读次数:129
Candy
There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
分类:其他好文   时间:2014-07-01 23:57:55    阅读次数:356
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 requirements: Each child must have...
分类:其他好文   时间:2014-06-30 17:18:04    阅读次数:177
LeetCode || Candy
Candy  Total Accepted: 12392 Total Submissions: 68386My Submissions There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these childre...
分类:其他好文   时间:2014-06-29 23:15:17    阅读次数:228
[LeetCode] Candy
There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
分类:其他好文   时间:2014-06-26 20:46:27    阅读次数:144
LeetCode: Candy [135]
【题目】 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 requirements: Each child must have at least one candy. Children with a higher rating get more candie...
分类:其他好文   时间:2014-06-26 13:37:26    阅读次数:265
leetcode--Candy
There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
分类:其他好文   时间:2014-06-22 13:19:27    阅读次数:180
410条   上一页 1 ... 38 39 40 41 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!