码迷,mamicode.com
首页 >  
搜索关键字:poj1753flip game    ( 5568个结果
HTML5、javascript写的craps游戏
1. [代码][HTML]代码 Craps game浏览器不支持HTML5的canvas元素http://www.huiyi8.com/donghua/?Throw diceflashStage:Point:Outcome:
分类:编程语言   时间:2014-07-27 09:48:02    阅读次数:431
题目不难,还是自己懂得代码太少,纯粹凭思维解题。。努力学吧。。
Game PredictionSuppose there are M people, including you, playing a special card game. At the beginning, each player r...
分类:其他好文   时间:2014-07-27 09:44:42    阅读次数:395
博弈初级小结
一、巴什博奕!!!! 巴什博奕(Bash Game):只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个。最后取光者得胜。 显然,如果n=m+1,那么由于一次最多只能取m个,所以,无论先取者拿走多少个,后取者都能够一次拿走剩余的物品,后者取胜。因此我们发现了如何取胜的法则:如果n=(m+1)r+s,(r为任意自然数,s≤m),那么先取者要拿走s个物品,如果...
分类:其他好文   时间:2014-07-26 17:16:32    阅读次数:301
LeetCode - Jump Game
一开始想DP一步步迭代更新,求出到跳到最后一个的最小步数,但是时间复杂度O(nk),会超时。 再一想,发现该题只需要返回能否到达最后一个,不需要最小步数,所以迭代时候只需要保留当前能够走到的最远距离tmpMax,时间复杂度降到O(n)。 class Solution { public: const int MAXVALUE = 1 << 30; bool canJump(int A[],...
分类:其他好文   时间:2014-07-26 15:30:51    阅读次数:210
Jump Game Two
class Solution { public: const int MAXVALUE = 1 << 30; int findMinStepToIndex(int maxNumbers[],int maxSteps,int index) { if (index == 0) return 0; int left = 1; int right = maxSteps;...
分类:其他好文   时间:2014-07-26 15:30:01    阅读次数:170
Codeforces Round #258 (Div. 2) A. Game With Sticks(数学题)
Codeforces Round #258 (Div. 2) A. Game With Sticks(数学题)...
分类:其他好文   时间:2014-07-26 15:21:26    阅读次数:205
HDU-4866-Shooting(函数式线段树)
Problem Description In the shooting game, the player can choose to stand in the position of [1, X] to shoot, you can shoot all the nearest K targets. The value of K may be different on different shoo...
分类:其他好文   时间:2014-07-26 15:08:00    阅读次数:383
卡特兰数
A - 卡特兰数 Time Limit:1000MS     Memory Limit:30000KB     64bit IO Format:%I64d & %I64u Submit Status Description This is a small but ancient game. You are supposed to write down the num...
分类:其他好文   时间:2014-07-26 15:07:50    阅读次数:216
Codeforces Round #258
A.Game With Sticks 就发现选定一个点之后,会删除相应的行列,即n-1,m-1,所以只需要看min(n,m)是基是偶#include #include #include using namespace std;int n, m;int main(){#ifdef LOCAL ...
分类:其他好文   时间:2014-07-26 14:00:25    阅读次数:226
A. Game With Sticks
其实就会找出xy最小的一个,再判断奇偶就OK #include #include using namespace std; int main(){     int x,y;     while(cin>>x>>y){         int t=x>y?y:x;         if(t%2==0)             printf("Malvika\n");       ...
分类:其他好文   时间:2014-07-26 03:02:56    阅读次数:197
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!