poj1704
来源:互联网 发布:机械制图软件手机版 编辑:程序博客网 时间:2024/06/08 07:03
#include <iostream>#include <algorithm>using namespace std;#define oo (~0U >> 1)#define MAXN 1000 + 10int temp[MAXN];int node[MAXN];void input(){ int n, t, x; cin >> t; while (t--) { int sum = 0; cin >> n; for (int i = 1; i <= n; i++) { cin >> temp[i]; } sort(temp + 1, temp + n + 1); for (int i = 1; i <= n; i++) { node[i] = temp[i] - temp[i - 1] - 1; } for (int i = n; i >= 1; i -= 2) { sum ^= node[i]; } cout << (!sum ? ("Bob will win") : ("Georgia will win")) << endl; }}int main(){ input(); return 0;}
- POJ1704
- poj1704
- 【博弈论】poj1704
- POJ1704解题报告
- poj1704 Georgia and Bob
- poj1704 Georgia and Bob
- poj1704 Georgia and Bob
- POJ1704之Nim博弈
- 【博弈】poj1704 Georgia and Bob
- poj1704(变形Nim博弈)
- 点分治学习小记 POJ1704
- poj1704 Georgia and Bob博弈论
- poj1704 Georgia and Bob------P/N分析
- poj1704 Georgia and Bob(阶梯博弈)
- POJ1704 Georgia and Bob(Nim问题)
- POJ1704--Georgia and Bob--staircase nim
- POJ1704 Georgia and Bob Nim阶梯博弈
- poj1704 Georgia and Bob(阶梯博弈)
- 关于java response的两种页面输出方式,以及HttpUrlconnection 代理使用注意点
- weka基本知识
- Spring3 MVC 笔记(一)
- Linux命令简介
- EasyUI的一些封装方法
- poj1704
- 为什么要报考系统架构设计师考试
- IOS 开发必备网址
- 用数组元素做函数实参
- 转载的一篇关于如何优化JAVA代码及提高效率的文章
- sublime使用代理服务器安装package control
- CentOS yum安装mcrypt详细图解教程-magento
- magento 前台删除产品报错的处理方式
- 解耦你的HTML,CSS和JAVASRIPT