如果一个页面的内容呈现,需要根据url上传递的参数来进行渲染。很多时候可能是这样子写:xxx.com/xx?c=x&m=x& t=..,而我们看到的url往往是这样子的(以新浪微游戏的咖啡恋人为例) game.weibo.com/ilovecoffee….这种URL设计看上去比前一种更好一点:)如果...
分类:
Web程序 时间:
2014-06-24 09:19:23
阅读次数:
279
Jump Game:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents y...
分类:
其他好文 时间:
2014-06-22 23:11:57
阅读次数:
310
【游戏Server中Server的类别】 There are two common and proven approaches to structuring a network game which are known asAuthoritative ServerandNon-Authoritat....
分类:
Web程序 时间:
2014-06-22 23:04:07
阅读次数:
255
iOS Dev (55) 获取当前年、月、日等信息
作者:大锐哥博客:http://prevention.iteye.com
-
NSDate *now = [NSDate date];
NSCalendar *calendar = [NSCalendar currentCalendar];
NSUInteger unitFlags =
NSYearCalendarUnit...
分类:
移动开发 时间:
2014-06-22 22:39:27
阅读次数:
291
HDU 1079 Calendar Game (博弈论-sg)
题目大意:
给定日期,轮流来,可以在日期的月上加1,或者在天数上加1 ,如果约数上加1无效,自动转化为在天数上加1,轮流来,问先手是否赢?
解题思路:
这很明显是道博弈题,对于SG的性质定义
必胜态记为P,用数值0表示,当且仅当其后继都是 N,也就是SG()>0
必输态记为N,用数值1表示,当且仅当其后继存在P,也就是SG()=0
对于这题,完全没必要这样用SG去推理,可以结合DP,用记忆化搜索划分为子问题,每一步取对自己最优的。...
分类:
其他好文 时间:
2014-06-22 22:10:22
阅读次数:
253
poj 1079 Calendar Game(博弈论 SG)...
分类:
其他好文 时间:
2014-06-22 21:52:49
阅读次数:
162
设置按钮
点一下ON切换到OFF,点一下OFF切换到ON,实现:
创建菜单按钮
setimage = CCMenuItemImage::create("sound-on-A.png", "sound-off-A.png", this, menu_selector(Game::SetMusic));
setimage->setScale(0.5f);
setimage->setP...
分类:
其他好文 时间:
2014-06-22 19:38:59
阅读次数:
234
二分图匹配:
最大匹配数=最大独立集=最小点覆盖
最小路径覆盖=点数-最大匹配数
Strategic Game
Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4739 Accepted Submission(...
分类:
其他好文 时间:
2014-06-22 17:55:06
阅读次数:
163
最近一直做的几个功能都跟日期处理有关,比如判断今天是否登录,今天的最小时间,今天结束的最大时间等。
代码中都是用的JDK自带的 Calendar,使用起来相当费劲了,于是乎,忍不了,找到了一个名叫:JodaTime 的库,
目前Joda Time 已经纳入 JDK 8 的官方API了,但是JDK 8还是很遥远,下面我给大家演示几个实例:
1、 获取今天的开始时间:比如...
分类:
其他好文 时间:
2014-06-22 14:02:47
阅读次数:
176
Help Me with the Game
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3210
Accepted: 2071
Description
Your task is to read a picture of a chessboard position...
分类:
其他好文 时间:
2014-06-22 00:22:45
阅读次数:
382