POJ1067_取石子游戏_威佐夫博弈
2012-07-26 15:26
281 查看
/* *State: 1067 Accepted 176K 16MS C++ 435B *题目大意: * 威佐夫博弈 *解题思路: * 略。 */ #include <iostream> #include <stdio.h> #include <cmath> using namespace std; int main(void) { int big, small; while(scanf("%d %d", &big, &small) == 2) { if(big < small) { big = big ^ small; small = big ^ small; big = big ^ small; } double hj = (1.0 + sqrt(5.0)) / 2.0; int k = big - small; int tmp = k * hj; if(tmp == small) printf("0\n"); else printf("1\n"); } return 0; }
相关文章推荐
- poj 1067 取石子游戏——威佐夫博弈(Wythoff Game)
- poj 1067 取石子游戏(威佐夫博弈)
- POJ 1067 取石子游戏 (威佐夫博弈)
- poj 1067 取石子游戏(威佐夫博弈)
- POJ 1067 取石子游戏 威佐夫博弈
- POJ 1067 取石子游戏(威佐夫博弈)
- poj 1067 取石子游戏(威佐夫博弈)
- poj 1067 取石子游戏 (威佐夫博弈)
- poj 1067 取石子游戏(威佐夫博弈)
- POJ-1067取石子游戏,威佐夫博弈范例题/NYOJ-161,主要在于这个黄金公式~~
- poj 1067 取石子游戏(威佐夫博弈)
- [POJ](1067)取石子游戏 ---威佐夫博弈(博弈)
- POJ 1067 取石子游戏(威佐夫博弈)
- poj 1067 取石子游戏(威佐夫博弈)
- POJ 1067 取石子游戏 <威佐夫博弈>
- poj 1067 取石子游戏(威佐夫博弈)
- POJ 1067 威佐夫博弈(Wythoff Game)问题 (取石子游戏)
- POJ 1067 取石子游戏(威佐夫博弈)
- poj 1067 取石子游戏(威佐夫博弈)
- POJ 1067 取石子游戏(威佐夫博弈)