nyoj-837-Wythoff Game
来源:互联网 发布:mac 替换war文件 编辑:程序博客网 时间:2024/05/17 08:49
#include<stdio.h>
#include<string.h>
int a[261900];
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
int i,t=0;
memset(a,0,sizeof(a));
for(i=0;;i++)
{
if(t==n+1) break;
if(a[i]==0)
{
printf("(%d,%d)",i,i+t);
a[i]=1;
a[i+t]=1;
t++;
}
}
printf("\n");
}
return 0;
}
#include<string.h>
int a[261900];
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
int i,t=0;
memset(a,0,sizeof(a));
for(i=0;;i++)
{
if(t==n+1) break;
if(a[i]==0)
{
printf("(%d,%d)",i,i+t);
a[i]=1;
a[i+t]=1;
t++;
}
}
printf("\n");
}
return 0;
}
0 0
- NYOJ 837 Wythoff Game
- nyoj-837-Wythoff Game
- NYOJ 837 Wythoff Game
- nyoj 837 Wythoff Game
- NYOJ-837-Wythoff Game
- NYOJ 837-Wythoff Game
- NYOJ-837-Wythoff Game 【威佐夫博奕】
- NYOJ 837 Wythoff Game(威佐夫博奕公式利用)
- NYOJ 题目837 Wythoff Game(威佐夫博奕必败点,水题)
- nyoj Wythoff Game(暴力枚举)
- Wythoff Game
- Proof of Wythoff Game
- Wythoff Game(hdu2177)
- HDOJ1527(Wythoff Game)
- NYOJ 题目161 取石子(四) 威佐夫博奕(Wythoff Game)
- 威佐夫博弈(Wythoff Game)
- HDOJ 2177 (Wythoff Game)
- hdu1527威佐夫博奕(Wythoff Game)
- java基础13
- ZooKeeper源码阅读之Eclipse工程搭建
- 养成写学习博客的习惯,从今天2014-04-06开始
- iPhone/iPad高级应用与手游开发学习笔记:sqlite3学习(简单英文生词本demo)
- easyUI Tabs 切换问题
- nyoj-837-Wythoff Game
- Windows Time服务无法启动 错误5拒绝访问
- 一小时内破解16位强密码
- Xcode 编程中得常用快捷键
- win7中使用runas命令(替代右键“以管理员身份运行”)
- Java 中使用HttpURLConnection发起POST 请求
- 纳德拉干得不错!微软股价逼近14年最高点
- HDU 3518 Boring counting 重复出现不重叠子串个数(后缀数组)
- 在Eclipse中使用JUnit4进行单元测试