当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

7022:Jsljgame

题目描述
Jslj and Penguin like playing games very much. One day Jslj come up with a good idea.

There are $n$ piles of stones, where the $i$-th pile has $a_i$ stones.

Jslj and Penguin take alternating turns removing stones. Jslj goes first. In a move, Jslj can remove a positive number of stones except for $x$ from any pile, Penguin can remove a positive number of stones except for $y$ from any pile. The first player who can't make a move loses the game.

Your task is to determine who is winner.
输入解释
The first line contains an integer $T$ $(1\le T\le 2000)$ representing the number of test cases.

For each test case, the first contain three integers $n,x,y$$(1 \le n \le 10^3 , 1
\le x,y \le 10^9)$ representing the number of piles, the number of stones Jslj can't remove, the number of stones Penguin can't remove.

The second line contain n integers $a_i$$(1 \le a_i \le 10^9)$, $a_i$ is the number of stones in the $i$-th pile.
输出解释
For each test case, if Jslj wins, output Jslj. Otherwise, output yygqPenguin.
输入样例
1
3 20 100
5 800000 10
输出样例
Jslj

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-7022

最后修改于 2021-10-23T19:11:05+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 262144/262144K(Java/Others)