【SG函数】HDU1847[Good Luck in CET-4 Everybody!]题解
来源:互联网 发布:淘宝卖家流量钱包充值 编辑:程序博客网 时间:2024/06/05 23:45
题目概述
有
解题报告
先求出
这个数据范围是给
示例程序
#include<cstdio>using namespace std;const int maxn=1000;int n,sg[maxn+5],ti,vis[maxn+5];void Make(){ for (int i=1;i<=maxn;i++,ti++) { for (int j=0;(1<<j)<=i;j++) vis[sg[i-(1<<j)]]=ti; while (vis[sg[i]]==ti) sg[i]++; }}int main(){ freopen("program.in","r",stdin); freopen("program.out","w",stdout); for (Make();~scanf("%d",&n);) puts(sg[n]?"Kiki":"Cici"); return 0;}
阅读全文
0 0
- 【SG函数】HDU1847[Good Luck in CET-4 Everybody!]题解
- HDU1847:Good Luck in CET-4 Everybody!(SG博弈)
- hdu1847-Good Luck in CET-4 Everybody! (博弈论 SG函数 找规律)
- hdu1847 Good Luck in CET-4 Everybody! ,巴什博奕,理解SG函数及性质
- HDU1847 Good Luck in CET-4 Everybody!
- Hdu1847 Good Luck in CET-4 Everybody!
- hdu1847 Good Luck in CET-4 Everybody!
- HDU1847-Good Luck in CET-4 Everybody!
- HDU1847:Good Luck in CET-4 Everybody!
- HDU1847----Good Luck in CET-4 Everybody!
- hdu1847 Good Luck in CET-4 Everybody!
- hdu1847 Good Luck in CET-4 Everybody!
- HDU1847 Good Luck in CET-4 Everybody!
- HDU1847 Good Luck in CET-4 Everybody!
- hdu1847 Good Luck in CET-4 Everybody!
- hdu1847 Good Luck in CET-4 Everybody!
- HDU1847 Good Luck in CET-4 Everybody!
- Good Luck in CET-4 Everybody! + 博弈 + sg函数
- macOS 配置 Java 和 Hadoop
- MyEclipse中运行tomcat报Confirm Perspective Switch
- u-net segnet 学习笔记
- CS 400 Tournament Swaps 循环赛,完全二叉树.
- Android中的Service组件(一)
- 【SG函数】HDU1847[Good Luck in CET-4 Everybody!]题解
- PayPal创始人:北京创业氛围仅次于硅谷
- elasticsearch源码分析之集群管理
- 设计模式_装饰设计模式
- python3+selenium,web自动化测试
- FCN语义分割初探——使用训练好的模型进行分割
- 字符设备文件的打开
- 关于malloc(0) 的一些探讨
- JVM一:Java虚拟机