AtCoder Beginner Contest 048
翻译中…
Problem Statement
翻译中…
There is a string $s$ of length $3$ or greater. No two neighboring characters in $s$ are equal.
翻译中…
Takahashi and Aoki will play a game against each other. The two players alternately performs the following operation, Takahashi going first:
翻译中…
- Remove one of the characters in
$s$, excluding both ends. However, a character cannot be removed if removal of the character would result in two neighboring equal characters in$s$.
翻译中…
The player who becomes unable to perform the operation, loses the game. Determine which player will win when the two play optimally.
翻译中…
Constraints
翻译中…
$3 ≤ |s| ≤ 10^5$$s$consists of lowercase English letters.- No two neighboring characters in
$s$are equal.
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
s
翻译中…
Output
翻译中…
If Takahashi will win, print First. If Aoki will win, print Second.
翻译中…
样例
Input #1
aba
Output #1
Second
Takahashi, who goes first, cannot perform the operation, since removal of the `b`, which is the only character not at either ends of $s$, would result in $s$ becoming `aa`, with two `a`s neighboring.
Input #2
abc
Output #2
First
When Takahashi removes `b` from $s$, it becomes `ac`. Then, Aoki cannot perform the operation, since there is no character in $s$, excluding both ends.
Input #3
abcab
Output #3
First
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。