POJ 2234 Matches Game (nim博弈裸题)
来源:互联网 发布:网络电视是什么信号源 编辑:程序博客网 时间:2024/06/06 13:23
题目链接:http://poj.org/problem?id=2234
博弈论这一节的题目其实不太好写博客的,因为sg函数也不太会,只能做一些裸题,或者稍微变形的题目。但是nim博弈确实很神奇,拆分成二进制,然后只要能两两消去,那么后手肯定必胜。就是所谓的异或运算了,网上nim博弈很多,就不罗嗦了。
#include<iostream>#include<cstring>#include<cstdio>using namespace std;int main() { int m, x, t; while (~scanf("%d", &m)) { scanf("%d", &x); m --; while (m --) { scanf("%d", &t); x ^= t; } if(x == 0) { printf("No\n"); } else { printf("Yes\n"); } } return 0;}
0 0
- POJ 2234 Matches Game (nim博弈裸题)
- POJ 2234 Matches Game (经典Nim博弈)
- POJ Matches Game 2234【经典博弈Nim游戏】
- POJ 2234-Matches Game(博弈)
- poj 2234 Matches Game (博弈)
- [博弈]POJ 2234 Matches Game
- POJ 2234 Matches Game(博弈)
- POJ 2234 Matches Game(直接的NIM)
- poj 2234Matches 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(尼姆博弈)
- POJ--2234 Matches Game(尼姆博弈)
- 2234-Matches Game-博弈
- POJ 2234 Matches Game NIM曲石子游戏
- HDU 2084 数塔
- HDU-1159 Common Subsequence 最长上升子序列
- 查解邮件域名,通过Lookup 查询出域名
- Listener 三个常用的
- hadoop 断电宕机处理
- POJ 2234 Matches Game (nim博弈裸题)
- Unity-Editor 编辑Inspector面板数据保存问题
- Linux kill, killall, kill -9
- RTL布局支持
- monkey&monkeyrunner学习笔记
- 信号完整性分析-传播速度
- 相对优先排序和绝对优先排序的效率比较
- Linux与安卓手机利用FTP互连
- 访问的网页自动打开QQ对话