poj1067
来源:互联网 发布:mac nginx lua 安装 编辑:程序博客网 时间:2024/05/21 22:33
取石子博弈问题很有意思的题目, 这篇文章讲的很好大家可以参考 下http://hi.baidu.com/momoxiangni/item/2f519d0ae73d0ce1f55ba686
#include<stdio.h>
#include<math.h>
int main()
{
int a,k,b,temp;
double r=(1+sqrt(5))/2.0;
while(scanf("%d%d",&a,&b)!=EOF)
{
if(a>b)
{
temp=a;a=b;b=temp;
}
k=b-a;
if(a!=(int)(r*k))
printf("1\n");
else
printf("0\n");
}
return 0;
}
0 0
- POJ1067
- poj1067
- poj1067
- POJ1067
- poj1067
- poj1067
- poj1067
- POJ1067
- 【博弈】POJ1067
- poj1067代码
- POJ1067取石子游戏
- poj1067(取石子游戏)
- poj1067(经典博弈问题)
- 取石子游戏POJ1067
- poj1067取石子游戏
- POJ1067----取石子游戏
- poj1067(威佐夫博弈)
- poj1067 取石子游戏
- C++ 字符串運算
- chromium书签栏实现
- 黑马程序员java自学总结之--数据关系模型和对象模型
- LESS CSS 框架简介
- [BZOJ 2084]POI2010 Antisymmetry
- poj1067
- 让edit plus也能运行java程序
- 颜色的数值表示方法
- android实现json数据的解析和把数据转换成json格式的字符串
- UVa 11646 - Athletics Track(几何)
- Python中Json库loads方法ValueError异常分析
- leetcode: Minimum Path Sum
- Volley适用场景
- cmd 玩乐!!!