Note the difference!!!
来源:互联网 发布:json.parseobject用法 编辑:程序博客网 时间:2024/05/16 17:10
//header for algorithm#include<iostream>#include<vector>#include<list>#include<string>using namespace std;//========Correctbool canWin(int a, int b){if(b/a>1 || b==a) return true;return !canWin(b-a, a);}//=======>!!!!bool canWin(int a, int b){if(b>=a*2 || b==a) return true;return !canWin(b-a, a);}//========int main(){#ifndef ONLINE_JUDGEfreopen("data.txt", "r", stdin);#endifint a, b;while(scanf("%d%d", &a, &b)&& a && b){if(a > b) swap(a, b);bool stanWin=canWin(a, b);if(stanWin)printf("Stan wins/n");else printf("Ollie wins/n");}return 0;}
范围啊, 范围啊, 注意了
- Note the difference!!!
- [LeetCode]242.Valid Anagram&383. Ransom Note&389. Find the Difference
- [Paper note] Deep Relative Distance Learning: Tell the Difference Between Similar Vehicles
- The difference between (()) and ().
- The difference between focus() .
- Minimize The Difference
- Hdoj Minimize The Difference
- the difference between…
- the-smallest-difference
- #387 The Smallest Difference
- #387 The Smallest Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- Find the Difference
- 160.Find the Difference
- LeetCode389. Find the Difference
- iBATIS学习之一
- Dictionary 用法
- Android Content Provider
- mplayer命令行模式下的使用方法
- 9G45 开始画板
- Note the difference!!!
- C 程序的外部变量与函数
- C 程序的外部变量与函数
- SOCKS Protocol Version 5[rfc1928]
- Linux下的ELF文件格式简介
- 非MFC程序的断言
- ie6/7居然不支持background-color:grey;必须写成background-color:#999999;
- JS 全屏自动 下拉 隐藏代码
- OLEDB的Excel的IMEX和HDR是什么意思