我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Crosses and Crosses

Description
The game of Crosses and Crosses is played on the field of 1 × n cells. Two players make moves in turn. Each move the player selects any free cell on the field and puts a cross ‘×’ to it. If after the player’s move there are three crosses in a row, he wins.

You are given n. Find out who wins if both players play optimally.

Input
Input file contains one integer number n (3 ≤ n ≤ 2000).

Output
Output ‘1’ if the first player wins, or ‘2’ if the second player does.

Sample Input
#1 3
#2 6
Sample Output
#1 1
#2 2

http://blog.csdn.net/clover_hxy/article/details/53843600

近期文章

  • java在实际应用中的算法推荐
  • Hot girl with cool car
  • WebBrowser如何实现加载网页时注入js代码
  • 求大神帮忙,用c语言实现bit的分组。
  • JAVA如何按指定宽高等比无损压缩图片
  • 一维数组的折半查找,不懂意思
  • 急! 如何往条形码中存放数据库中的数据(比如说某表的字段的值)然后微信可以扫描出来
  • 安卓smartrefreshlayout问题
  • C# 不改变文件扩展名,修改文件图标
  • unity3d 角色控制器 move 和simple方法问题
  • 关于12864动态显示数字的问题
  • Refrigerator Magnets
  • ubuntu安装完eclipse以后打不开
  • Power Eggs
  • Cell Phone Network
  • python+selenium 打开chrome浏览器后闪退是什么原因呢?
  • 有没有哪位大神做过高德地图开发
  • 关于mysql count的用法
  • Queue-jumpers
  • mongo数据均衡,如何修改chunksize,修改Thresholds阈值?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华