302638: CF513A. Game

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Game

题意翻译

有两个箱子,A箱子里有n1个球,B箱子里有n2个球。第一个人先从A箱子里取1~k1个球,第二个人再从B箱子里取1~k2个球,如此往复。先取完的人输掉游戏。输出赢的人。 【输入格式】:一行,四个数,n1,n2,k1,k2 【输出格式】:一行,第一个人赢输出"First",否则输出"Second"

题目描述

Two players play a simple game. Each player is provided with a box with balls. First player's box contains exactly $ n_{1} $ balls and second player's box contains exactly $ n_{2} $ balls. In one move first player can take from 1 to $ k_{1} $ balls from his box and throw them away. Similarly, the second player can take from 1 to $ k_{2} $ balls from his box in his move. Players alternate turns and the first player starts the game. The one who can't make a move loses. Your task is to determine who wins if both players play optimally.

输入输出格式

输入格式


The first line contains four integers $ n_{1},n_{2},k_{1},k_{2} $ . All numbers in the input are from 1 to 50. This problem doesn't have subproblems. You will get 3 points for the correct submission.

输出格式


Output "First" if the first player wins and "Second" otherwise.

输入输出样例

输入样例 #1

2 2 1 2

输出样例 #1

Second

输入样例 #2

2 1 1 1

输出样例 #2

First

说明

Consider the first sample test. Each player has a box with 2 balls. The first player draws a single ball from his box in one move and the second player can either take 1 or 2 balls from his box in one move. No matter how the first player acts, the second player can always win if he plays wisely.

Input

题意翻译

有两个箱子,A箱子里有n1个球,B箱子里有n2个球。第一个人先从A箱子里取1~k1个球,第二个人再从B箱子里取1~k2个球,如此往复。先取完的人输掉游戏。输出赢的人。 【输入格式】:一行,四个数,n1,n2,k1,k2 【输出格式】:一行,第一个人赢输出"First",否则输出"Second"

加入题单

上一题 下一题 算法标签: