pku 2234 matches game 博弈
来源:互联网 发布:php商城开源 编辑:程序博客网 时间:2024/06/02 05:57
pku 2234 matches game 博弈
算法:看了张一飞对博弈题的介绍,根据他的结论A了.可以说是最简单的博弈题。为了纪念一下第一道博弈题:
#include <stdio.h>
#include <string.h>
#define M 25
int main()
{
int i, n;
long result;
long number[M];
while (scanf("%d", &n) != EOF)
{
memset(number, 0, sizeof(number));
for (i = 0; i < n; i++)
{
scanf("%d", &number[i]);
}
if (n == 0)
{
printf("No/n");
continue;
}
else if (n == 1)
{
printf("Yes/n");
continue;
}
else
{
result = number[0];
for (i = 1; i < n; i++)
{
result ^= number[i];
}
if (result)
{
printf("Yes/n");
}
else
{
printf("No/n");
}
}
}
return 0;
}
- pku 2234 matches game 博弈
- 2234-Matches Game-博弈
- poj 2234 Matches Game (博弈)
- [博弈]POJ 2234 Matches Game
- POJ 2234 Matches Game(博弈)
- pku 2234(Matches Game)解题报告
- POJ 2234 Matches Game 尼姆博弈
- POJ 2234-Matches Game(博弈)
- POJ 2234 Matches Game 尼姆博弈
- poj--2234--Matches Game(尼姆博弈)
- POJ--2234 Matches Game(尼姆博弈)
- POJ 2234 Matches Game (经典Nim博弈)
- POJ 2234 Matches Game(尼姆博弈)
- poj 2234Matches Game尼姆博弈模版题
- POJ Matches Game 2234【经典博弈Nim游戏】
- POJ 2234 Matches Game (nim博弈裸题)
- POJ-2234 Matches Game(尼姆博弈)
- POJ-2234-Matches Game(尼姆博弈)
- 广义表的定义
- pku 1308 Is A Tree 搜索 解题报告
- CString的GetLength()函数返回为0问题解决
- .net sql防注入代码
- 解决出现 ./configure and got “configure: error: C++ compiler cannot create executables的方法
- pku 2234 matches game 博弈
- 找零钱的代码
- Java的编译器给enum自动添加了哪些专用方法?
- Windows中ntfs和fat32的区别和选择
- POJ_1001
- JAVAAPPLET游戏碰撞代码
- 符号三角形问题;回溯算法;子集树问题;时间复杂度O(2的n次方);
- 论有效的需求分析过程
- RIA好莱坞之旅:将视频加入你的应用程序中