正解:博弈论

解题报告:

传送门!

威佐夫博弈板子昂$QwQ$

关于这一类问题也有个结论,是说,先手必败的状态一定形如$(\left \lfloor i+\phi \right \rfloor,\left \lfloor i+\phi^{2} \right \rfloor)$,然后$\phi=\frac{\sqrt{5}+1}{2}$

证是不会证的了,但找到了一篇证明看这个趴$QAQ$

#include<bits/stdc++.h>
using namespace std;
#define il inline
#define gc getchar()
#define ri register int
#define rb register bool
#define rc register char
#define rp(i,x,y) for(ri i=x;i<=y;++i) const double phi=(sqrt()+)/; il int read()
{
rc ch=gc;ri x=;rb y=;
while(ch!='-' && (ch>'' || ch<''))ch=gc;
if(ch=='-')ch=gc,y=;
while(ch>='' && ch<='')x=(x<<)+(x<<)+(ch^''),ch=gc;
return y?x:-x;
}
int main()
{
ri a=read(),b=read();if(a>b)swap(a,b);ri tmp=(b-a)*phi;
if(tmp==a)printf("0\n");else printf("1\n");
return ;
}

最新文章

  1. HP网络打印机--如何添加打印机
  2. MySQL学习笔记四:字符集
  3. 关于display:flex
  4. 10月16日下午MySQL数据库CRUD操作(增加、删除、修改、查询)
  5. property attribute: assign, strong, weak, unsafe_unretain and copy
  6. Modifiers: virtual, override, new, abstract, sealed, internal
  7. Python学习笔记6-字典
  8. Android ViewPager自动播放
  9. 转:关于Apache与Nginx的优势比较(经典)
  10. Spring – Sending E-Mail Via Gmail SMTP Server With MailSender--reference
  11. 人工智能2:智能Agent
  12. 希腊字母、拉丁字母、Markdown、拼写与读音中英对照表
  13. [Hadoop] - Hadoop3.0.x编译
  14. 创建docker公共仓库
  15. 存储区域网络(Storage Area Network,简称SAN)
  16. 【第六篇】SAP ABAP7.5x新语法之SQL注入
  17. Ehcache缓存配置和基本使用
  18. .NetCore 使用AutoMapper
  19. git配置教程
  20. Python 正则表达式学习摘要及资料

热门文章

  1. @loj - 2461@ 「2018 集训队互测 Day 1」完美的队列
  2. 爬虫:Selenium + PhantomJS
  3. oracle函数 decode(条件,值1,翻译值1,值2,翻译值2,...值n,翻译值n,缺省值)
  4. OpenStack☞网关协议
  5. js常见运算符
  6. Spring MVC 解决 Could not write JSON: No serializer found for class java.lang.Object
  7. PyCharm indexing goes into infinite loop pycharm 不同的indexing
  8. 接管SpringBoot对Activiti的数据源自动配置
  9. Python--day30--互联网协议与osi模型
  10. CSS 个性化滚动条样式