Codeforces Round 334 (Div. 1)
C
Lieges of Legendre
Codeforces
2200
原题
← BD →
翻译中…

Kevin and Nicky Sun have invented a new game called Lieges of Legendre. In this game, two players take turns modifying the game state with Kevin moving first. Initially, the game is set up so that there are $*n*$ piles of cows, with the $*i*$-th pile containing $*a*_{*i*}$ cows. During each player's turn, that player calls upon the power of Sunlight, and uses it to either:

翻译中…
  1. Remove a single cow from a chosen non-empty pile.
  2. Choose a pile of cows with even size $2·*x*$ ($*x* > 0$), and replace it with $*k*$ piles of $*x*$ cows each.
翻译中…

The player who removes the last cow wins. Given $*n*$, $*k*$, and a sequence $*a*_{1}, *a*_{2}, ..., *a*_{*n*}$, help Kevin and Nicky find the winner, given that both sides play in optimal way.

翻译中…

Input

翻译中…

The first line of the input contains two space-separated integers $*n*$ and $*k*$ ($1 ≤ *n* ≤ 100 000, 1 ≤ *k* ≤ 10^{9}$).

翻译中…

The second line contains $*n*$ integers, $*a*_{1}, *a*_{2}, ... *a*_{*n*}$ ($1 ≤ *a*_{*i*} ≤ 10^{9}$) describing the initial state of the game.

翻译中…

Output

翻译中…

Output the name of the winning player, either "Kevin" or "Nicky" (without quotes).

翻译中…

Note

翻译中…

In the second sample, Nicky can win in the following way: Kevin moves first and is forced to remove a cow, so the pile contains two cows after his move. Next, Nicky replaces this pile of size 2 with two piles of size 1. So the game state is now two piles of size 1. Kevin then removes one of the remaining cows and Nicky wins by removing the other.

翻译中…

样例

Input #1
2 1
3 4
Output #1
Kevin
InputCopy OutputCopy
Input #2
1 2
3
Output #2
Nicky
InputCopy OutputCopy
题目信息
题号
603C
时间限制
2 s
内存限制
256 MB
标签
博弈论
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。