CF255E.Furlo and Rublo and Game

提高+/省选-

通过率:0%

时间限制:2.00s

内存限制:256MB

AC君温馨提醒

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

题目描述

Furlo and Rublo play a game. The table has n piles of coins lying on it, the i-th pile has a__i coins. Furlo and Rublo move in turns, Furlo moves first. In one move you are allowed to:

  • choose some pile, let's denote the current number of coins in it as x;
  • choose some integer y (0 ≤ y < x; _x_1 / 4 ≤ y ≤ _x_1 / 2) and decrease the number of coins in this pile to y. In other words, after the described move the pile will have y coins left.

The player who can't make a move, loses.

Your task is to find out, who wins in the given game if both Furlo and Rublo play optimally well.

弗洛和鲁布洛进行一场游戏。桌面上有 nn 堆硬币,其中第 ii 堆有 aia_i 枚硬币。弗洛和鲁布洛轮流行动,弗洛先手。每次行动允许你执行以下操作:

  • 选择某一堆硬币,记其当前硬币数为 xx;
  • 选择某个整数 yy(满足 0≤y<x0 \leq y < x 且 x1/4≤y≤x1/2x^{1/4} \leq y \leq x^{1/2}),并将该堆硬币数减少至 yy。换言之,经过上述操作后,该堆将剩余 yy 枚硬币。

无法进行合法操作的玩家判负。

你的任务是:在双方均采取最优策略的前提下,判断本局游戏中谁将获胜。

输入格式

The first line contains integer n (1 ≤ n ≤ 77777) — the number of piles. The next line contains n integers _a_1, _a_2, ..., a__n (1 ≤ a__i ≤ 777777777777) — the sizes of piles. The numbers are separated by single spaces.

Please, do not use the %lld specifier to read or write 64-bit integers in С++. It is preferred to use the cin, cout streams or the %I64d specifier.

第一行包含一个整数 nn(1≤n≤777771 \leq n \leq 77777)—— 表示石堆的数量。
下一行包含 nn 个整数 a1, a2, …, ana_1,\,a_2,\,\dots,\,a_n(1≤ai≤7777777777771 \leq a_i \leq 777777777777)—— 表示各石堆的大小。这些数字以单个空格分隔。

请注意,在 C++ 中读写 64 位整数时,请勿使用 %lld 说明符。推荐使用 cin、cout 流,或 %I64d 说明符。

输出格式

If both players play optimally well and Furlo wins, print "Furlo", otherwise print "Rublo". Print the answers without the quotes.

如果双方都采取最优策略且 Furlo 获胜,则输出 "Furlo",否则输出 "Rublo"。输出答案时不要包含引号。

输入输出样例

  • 输入#1

    1
    1

    输出#1

    Rublo
  • 输入#2

    2
    1 2

    输出#2

    Rublo
  • 输入#3

    10
    1 2 3 4 5 6 7 8 9 10

    输出#3

    Furlo

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

首页