[Spoj 2021]Moving Pebbles

时间限制:10s      空间限制:64MB

题目描述

2021. Moving Pebbles Two players play the following game. At the beginning of the game they start with n (1<=n<=100000) piles="" of="" stones.="" at="" each="" step="" the="" game,="" player="" chooses="" a="" pile="" and="" remove="" least="" one="" stone="" from="" this="" move="" zero="" or="" more="" stones="" to="" any="" other="" that="" still="" has="" loses="" if="" he="" no="" possible="" moves.="" given="" initial="" piles,="" determine="" who="" wins:="" first="" player,="" second="" both="" play="" perfectly.="" 给你n堆stone,两个人玩游戏.="" 每次任选一堆,首先拿掉至少一个石头,然后移动任意个石子到任意堆中.="" 谁不能移动了,谁就输了...="" <="" p="">


输入格式

Each line of input has integers 0 < n <= 100000,="" followed="" by="" n="" positive="" integers="" denoting="" the="" initial="" piles.="" <="" p="">


输出格式

For each line of input, output "first player" if first player can force a win, or "second player", if the second player can force a win.


样例输入

3 2 1 3




样例输出

first player

提示

鸣谢lqp18_31..


题目来源

没有写明来源

Menuappsclose