【POJ】【1067】取石子游戏
2024-09-20 04:57:11
博弈论
这个是博弈游戏中的Wythoff博弈:
以下为我的代码:
//POJ 1067
#include<cmath>
#include<cstdio>
#include<algorithm>
int main(){
freopen("1067.in","r",stdin);
int a,b;
double q=(+sqrt(5.0))/2.0;
while(scanf("%d%d",&a,&b)!=EOF){
if (a>b) std::swap(a,b);
int k=b-a;
printf("%d\n",a==(int)(k*q) ? : );
}
return ;
}
最新文章
- HtmlHelper拓展实现RadioList
- [Linux]Linux下redis的安装及配置.
- Compiler Warning (level 3) C4800
- yii2权限控制rbac之rule详细讲解(转)
- Java中对List集合内的元素进行顺序、倒序、随机排序的示例代码
- 【转发】Cross-thread operation not valid: Control &#39;progressBar1&#39; accessed from a thread other than the thread it was created on
- SSTable and Log Structured Storage: LevelDB
- 方法参数out
- asp.net中HTML代码编码、解码与页面的重定向
- 性能测试脚本新玩法---fiddler&;&;Jmeter
- EventBus使用小记
- 修改窗口属性(全部都是SetWindowLong设置)
- CBO学习笔记(转)
- Java与.net的区别delegate和event
- opencv中cvCreateImage大图片时出错
- Windows Server 2008 网管数据采集 努力做“日拱一卒“
- Service介绍(MediaPlayer应用)
- jgs--多线程和synchronized
- OI暑假集训游记
- 响应消息的内容类型 text/html; charset=utf-8 与绑定(application/soap+xml; charset=utf-8)的内容类型不匹配。