Note the difference!!!

//header for algorithm
#include<iostream>
#include<vector>
#include<list>
#include<string>
using namespace std;
//========Correct
bool 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_JUDGE
freopen("data.txt", "r", stdin);
#endif
int 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;
}

范围啊， 范围啊， 注意了

SOUNDEX()函数和DIFFERENCE()函数简介

2008-04-18 03:12:00

The difference between Chinese and American

2007-10-18 09:05:00

Difference of Gaussian (DoG)

2011-05-26 22:08:00

python set difference()的细节问题

2016-12-29 17:36:06

Temporal-Difference （TD） Learning

2017-04-16 11:35:49

The difference between the request time and the current time is too large.

2017-01-09 11:07:50

POJ 3579- Median

2014-05-31 21:40:40

[Error Code]:RequestTimeTooSkewed, [Message]:The difference between the request time and the current

2017-09-25 11:05:14

[leetcode] 530. Minimum Absolute Difference in BST

2017-03-01 16:19:38

DoG（Difference of Gaussian）

2016-06-28 15:19:11