码迷,mamicode.com
首页 >  
搜索关键字:segment game    ( 7679个结果
枚举(+-)
The game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refr...
分类:其他好文   时间:2014-05-26 22:16:23    阅读次数:329
hdu 1054 Strategic Game (二分匹配)
Strategic GameTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4697Accepted Submission(s): 2125Pr...
分类:其他好文   时间:2014-05-26 21:02:16    阅读次数:278
TIME_WAIT状态
TIME_WAIT状态 执行主动关闭的一方处于TIME_WAIT状态。端点留在这个状态的时间是2MSL(最长分节生命期: maximum segment lifetime)。 任何TCP实现都必须为MSL选择一个值, RFC1122建议值2分钟,BSD的实现30秒。所以,MSL在1——4分钟之间.....
分类:其他好文   时间:2014-05-26 06:48:04    阅读次数:222
UVA 10843 - Anne's game(Cayley定理)
UVA 10843 - Anne's game 题目链接 题意:题意说得挺绕的,其实本质上就是求n个点,可以接连出多少种不同的生成树 思路:这是Caylay定理,网上能找到证明,结果为nn?2,然后利用快速幂去求解。 代码: #include #include const int long long MOD = 2000000011; int t; long long n;...
分类:其他好文   时间:2014-05-26 03:36:35    阅读次数:278
poj 2985 The k-th Largest Group 求第K大数 Treap, Binary Index Tree, Segment Tree
题目链接:点击打开链接 题意:有两种操作,合并集合,查询第K大集合的元素个数。(总操作次数为2*10^5) Treap模板(静态数组) #include #include #include #include #include const int maxNode = 500000 + 100; const int inf = 0x3f3f3f3f; struct Tr...
分类:其他好文   时间:2014-05-24 23:18:09    阅读次数:522
LeetCode: Jump Game [054]
【题目】 Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. For example:...
分类:其他好文   时间:2014-05-24 20:44:39    阅读次数:221
Leetcode的bug测试用例 ?? jump game
之所以说leetcode的测试用例有问题,是因为我刚开始理解错了题意,写下了如下的错误的代码。但是却AC了。 错误代码为: bool canJump(int A[], int n) { if(n == 0) return true; int sum = 0; //记录当前的最远距离 int i = 0; ...
分类:其他好文   时间:2014-05-24 19:45:57    阅读次数:1081
uva 10400 Game Show Math (填合适的运算符)
看到这种填合适的运算符之类的题目,第一感觉就是用dfs来枚举递归。 但邮箱道题目算法设计里面那么大的数据,想到有可能会超时。 用最直白的简单的方法dfs一遍后交上,超时。 ——需要判重和边界结束条件。 在所有能剪断的地方痛下狠手,狂加特判+return; 然后就炒鸡快了 #include #include #include #define ADD 32000 using namespa...
分类:其他好文   时间:2014-05-23 02:06:42    阅读次数:285
LeetCode: Jump Game II [044]
【题目】 Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Your goal is to reach the last index in the minimum number of ju...
分类:其他好文   时间:2014-05-22 17:02:20    阅读次数:244
SnakeGo : Scaling Screen on Stage II
昨晚把BaseScreen就敲好了, 也找到了屏幕放缩的最优和最简方式. 不多说, 看代码: public BaseScreen(final SnakeGo game) { super(new ScalingViewport(Scaling.fit, CommonConsts.Screen.WIDT...
分类:其他好文   时间:2014-05-22 14:52:32    阅读次数:206
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!