CF276B.Little Girl and Game

普及-

通过率:0%

时间限制:2.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

The Little Girl loves problems on games very much. Here's one of them.

Two players have got a string s, consisting of lowercase English letters. They play a game that is described by the following rules:

  • The players move in turns; In one move the player can remove an arbitrary letter from string s.
  • If the player before his turn can reorder the letters in string s so as to get a palindrome, this player wins. A palindrome is a string that reads the same both ways (from left to right, and vice versa). For example, string "abba" is a palindrome and string "abc" isn't.

Determine which player will win, provided that both sides play optimally well — the one who moves first or the one who moves second.

这位小女孩非常喜欢博弈类问题。下面就是其中一道。

两名玩家共同拥有一串由小写英文字母组成的字符串 ss。他们按照如下规则进行一场游戏:

  • 两名玩家轮流进行操作;每次操作中,当前玩家可以从字符串 ss 中任意移除一个字母。
  • 若在某位玩家即将进行操作之前,剩余的字符串 ss 的字母可以被重新排列成一个回文串,则该玩家获胜。回文串是指正读与反读都完全相同的字符串。例如,字符串 "abba" 是回文串,而 "abc" 不是。

假设双方均以最优策略进行游戏,请判断获胜者是先手玩家还是后手玩家。

输入格式

The input contains a single line, containing string s (1 ≤ |s|  ≤  103). String s consists of lowercase English letters.

输入包含一行,其中包含字符串 ss(1 ≤ ∣s∣ ≤ 1031 ≤ |s| ≤ 10^3)。字符串 ss 仅由小写英文字母组成。

输出格式

In a single line print word "First" if the first player wins (provided that both players play optimally well). Otherwise, print word "Second". Print the words without the quotes.

在一行中输出单词“First”,如果第一位玩家获胜(假设双方都以最优策略进行游戏);否则输出单词“Second”。输出时不带引号。

输入输出样例

  • 输入#1

    aba

    输出#1

    First
  • 输入#2

    abca

    输出#2

    Second

输入解题思路,AI测评打分。不知道怎么写?

首页