【POJ】2348
来源:互联网 发布:jquery get json 编辑:程序博客网 时间:2024/06/05 20:36
http://poj.org/problem?id=2348
《挑战程序设计竞赛》p309
分情况分析
#include <iostream>#include <cstdio>#include <cstring>#include <cmath>#include <queue>#include <vector>#include <numeric>#include <algorithm>using namespace std;int a,b;bool ok;int main(){ while (cin >> a >> b && a && b){ ok=true; for (;;){ if (a>b) swap(a,b); if (b%a==0) break; if (b-a>a) break; b-=a; ok=!ok; } if (ok) cout << "Stan wins" << endl; else cout << "Ollie wins" << endl; }}
阅读全文
0 0
- poj 2348
- poj-2348
- poj 2348
- poj 2348
- POJ 2348
- 【POJ】2348
- POJ 2348 博弈论
- poj 2348(博弈)
- 欧几里得游戏(poj 2348)
- poj 2348 欧几里得博弈
- POJ 2348 (博弈)
- POJ
- poj
- POJ
- POJ
- poj
- poj
- POJ
- 深度学习笔记(九)AutoEncoder自动编码器
- Canvas和Bitmap的关系
- 关于android5.0以上逐帧动画不能正常播放解决办法
- meta常用标签总结
- VS2015的stdlib库qsort函数的一个bug
- 【POJ】2348
- ASM Bytecode Framework探索与使用
- POJ—1700(Crossing River)
- 九度[1025]-最大报销额
- linux网络基本知识
- vue环境搭建与创建第一个vuejs文件
- java 图形用户界面 swing之 单选钮 及示例程序
- 记录 and Test
- 数据结构与算法:字符串