21737_CrossesandCrosses

2022-5-16 18:20| 发布者: Hocassian| 查看: 35| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505804260199-Problem List-采集的数据-后羿采集器.html

Pro.ID

21737

Title

Crosses and Crosses

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21737

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    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 and the game stops.
    You are given a position in the game. Find out, who has won the game.

    输入

    The input file contains one line containing only characters '×' (ASCII code 120) denoting crosses and '.' (ASCII code 46) denoting empty cells. The number of cells in the given position does not exceed 30.

    输出

    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 and the game stops.
    You are given a position in the game. Find out, who has won the game.
    Input
    The input file contains one line containing only characters '×' (ASCII code 120) denoting crosses and '.' (ASCII code 46) denoting empty cells. The number of cells in the given position does not exceed 30.
    Output
    The first line of output file should contain one of the following strings:
    "First", if the first player has won the game;
    "Second", if the second player has won the game;
    "Nobody", if nobody has won yet;
    "Invalid", if the position is invalid, i.e. it could not have been reached in a correctly played game.
    Sample Input
    Sample #1

    x.xxx.x

    Sample #2

    xxxxxxxx
    Sample Output
    Sample #1

    First

    Sample #2

    Invalid
    Source

    样例输入

    Sample #1

    x.xxx.x

    Sample #2

    xxxxxxxx

    样例输出

    Sample #1

    First

    Sample #2

    Invalid

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部