Euclid's Game---博弈
来源:互联网 发布:现货倚天屠龙指标源码 编辑:程序博客网 时间:2024/04/29 14:20
#include "iostream"#include "vector"#include "string.h"using namespace std;void swap(int &a, int &b){ int temp = a; a = b; b = temp;}int main(){ int a, b; cout << "a = "; cin >> a; cout << "b = "; cin >> b; bool f = true; while(true) { if(a > b) swap(a, b); if(b % a == 0) break; if(b - a > a) break; b -= a; f = !f; } if(f) cout << "Stan wins" << endl; else cout << "Ollie wins" << endl; return 0;}
0 0
- Euclid's Game---博弈
- hdu1525 Euclid's Game 博弈
- NUC1445 Euclid's Game【博弈】
- pku 2348 Euclid's Game(博弈)
- POj-2348-Euclid's Game-博弈
- HDU 1525 Euclid's Game (博弈)
- HDOJ 1525 Euclid's Game 博弈
- pku 2348 Euclid's Game(简单博弈)
- hdu 1525 Euclid's Game 博弈
- [简单博弈] hdu 1525 Euclid's Game
- UVA 10368 - Euclid's Game(数论+博弈)
- uva 10368 - Euclid's Game(博弈)
- hdu1525 Euclid's Game , 基础博弈
- POJ 2348 Euclid's Game(博弈)
- hdu 1525 Euclid's Game 博弈
- HDU 1525 Euclid's Game 博弈
- HDU 1525 Euclid's Game (博弈)
- HDU1525 Euclid's Game(博弈)
- JS总结
- if_indextoname(unsigned ifindex, char *ifname)
- 第八届河南省程序设计大赛-NYOJ-1236-挑战密室
- 搭建Android开发环境和第一个Android程序(Eclipse版)
- javaEE
- Euclid's Game---博弈
- hdu(1007) 最近点对 分治法
- Warning: Activity not started, its current task has been brought to the front
- 【bzoj2754】【scoi2012】【喵星球上的点名】【AC自动机+map】
- hdu 2089 不要62(数位dp)
- QT 学习记录
- HDU1527 纯威左夫博弈
- 考前感受
- QWidget