码迷,mamicode.com
首页 >  
搜索关键字:candy 分糖果    ( 334个结果
BZOJ 1062
program candy bzoj1062;const maxc=1000100; maxm=4010; maxn=2010;var n,len,m,i,p,t,l,r,c,d,q:longint; s:array[0..1,0..maxn,0..maxm] of lon...
分类:其他好文   时间:2014-10-27 19:01:21    阅读次数:280
Candy [leetcode] O(n)时间复杂度,O(1)空间复杂度的方法
对于ratings[i+1],和ratings[i]的关系有下面几种:1. 相等。相等时ratings[i+1]相应的糖果数为12.ratings[i + 1] > ratings[i]。在这样的情况下,要寻找以ratings[i]開始的递增序列。3.ratings[i + 1] &ratings....
分类:其他好文   时间:2014-10-27 10:31:47    阅读次数:234
6 Candy_Leetcode
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 req...
分类:其他好文   时间:2014-10-17 00:11:33    阅读次数:277
sicily 1052. Candy Sharing Game
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionA number of students sit in a circle facing their teacher in the center. Each student ini...
分类:其他好文   时间:2014-10-14 23:27:09    阅读次数:137
POJ 3083 Children of the Candy Corn
题意:给你一个图,告诉你起始点S,终点E,‘.’可走,‘#’不可走。求从起点到终点1.总是先选择向左走的步数。2.总是选择先向右走的步数。3.最短路思路: 对于第一种和第二种,用深搜,只要写对存方向的数组即可:int r[4][2]= {{0,-1},{1,0},{0,1},{-1,0}};int ...
分类:其他好文   时间:2014-10-02 14:19:02    阅读次数:256
Candy [leetcode] O(n)时间复杂度,O(1)空间复杂度的方法
对于ratings[i+1],和ratings[i]的关系有以下几种: 1. 相等。相等时ratings[i+1]对应的糖果数为1 2.ratings[i + 1] > ratings[i]。在这种情况下,要寻找以ratings[i]开始的递增序列。 3.ratings[i + 1] 对于任意一个递增序列 [2 3 4 5 6] 对应的糖果数为 [1 2 3 4 X] 对于任意一个递减...
分类:其他好文   时间:2014-10-02 13:29:12    阅读次数:203
Candy
[leetcode]Candy...
分类:其他好文   时间:2014-09-20 10:05:17    阅读次数:137
POJ:3083 Children of the Candy Corn(bfs+dfs)
http://poj.org/problem?id=3083DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the ...
分类:其他好文   时间:2014-09-18 13:17:13    阅读次数:228
Candy( 数学期望 )
math expect...
分类:其他好文   时间:2014-09-16 20:38:21    阅读次数:263
[leetcode]Candy @ Python
原题地址:https://oj.leetcode.com/problems/candy/题意:There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to ...
分类:编程语言   时间:2014-09-14 11:21:16    阅读次数:172
334条   上一页 1 ... 26 27 28 29 30 ... 34 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!