Rock... Paper!

After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her brother, Koyomi, comes up with a new game as a substitute. The game works as follows.

A positive integer n is decided first. Both Koyomi and Karen independently choose n distinct positive integers, denoted by x1, x2, ..., xn and y1, y2, ..., yn respectively. They reveal their sequences, and repeat until all of 2n integers become distinct, which is the only final state to be kept and considered.

Then they count the number of ordered pairs (i, j) (1 ≤ i, j ≤ n) such that the value xi xor yj equals to one of the 2n integers. Here xormeans the bitwise exclusive or operation on two integers, and is denoted by operators ^ and/or xor in most programming languages.

Karen claims a win if the number of such pairs is even, and Koyomi does otherwise. And you're here to help determine the winner of their latest game.

Input

The first line of input contains a positive integer n (1 ≤ n ≤ 2 000) — the length of both sequences.

The second line contains n space-separated integers x1, x2, ..., xn (1 ≤ xi ≤ 2·106) — the integers finally chosen by Koyomi.

The third line contains n space-separated integers y1, y2, ..., yn (1 ≤ yi ≤ 2·106) — the integers finally chosen by Karen.

Input guarantees that the given 2n integers are pairwise distinct, that is, no pair (i, j) (1 ≤ i, j ≤ n) exists such that one of the following holds: xi = yji ≠ j and xi = xji ≠ j and yi = yj.

Output

Output one line — the name of the winner, that is, "Koyomi" or "Karen" (without quotes). Please be aware of the capitalization.

Examples
input
3
1 2 3
4 5 6
output
Karen
input
5
2 4 6 8 10
9 7 5 3 1
output
Karen
Note

In the first example, there are 6 pairs satisfying the constraint: (1, 1), (1, 2), (2, 1), (2, 3), (3, 2) and (3, 3). Thus, Karen wins since 6 is an even number.

In the second example, there are 16 such pairs, and Karen wins again.


  题目大意 给定两组数,每组中各选一个数异或得到后的结果在这两组数中出现过的方案数如果是偶数就是Karen赢,否则是Koyomi赢。

  暴力for,开个数组去check。完事。

Code

 /**
* Codeforces
* Problem#869A
* Accepted
* Time: 280ms
* Memory: 100k
*/
#include <bits/stdc++.h>
using namespace std; int n;
int *x, *y;
set<int> been; inline void init() {
scanf("%d", &n);
x = new int[(n + )];
y = new int[(n + )];
for(int i = ; i <= n; i++)
scanf("%d", x + i), been.insert(x[i]);
for(int i = ; i <= n; i++)
scanf("%d", y + i), been.insert(y[i]);
} int counter = ;
inline void solve() {
for(int i = ; i <= n; i++)
for(int j = ; j <= n; j++)
if(been.count(x[i] ^ y[j])) {
counter++;
}
if(counter & ) puts("Koyomi");
else puts("Karen");
} int main() {
init();
solve();
return ;
}

Codeforces Round #439 (Div. 2) Problem A (Codeforces 869A) - 暴力的更多相关文章

  1. Codeforces Round #439 (Div. 2) Problem E (Codeforces 869E) - 暴力 - 随机化 - 二维树状数组 - 差分

    Adieu l'ami. Koyomi is helping Oshino, an acquaintance of his, to take care of an open space around ...

  2. Codeforces Round #439 (Div. 2) Problem C (Codeforces 869C) - 组合数学

    — This is not playing but duty as allies of justice, Nii-chan! — Not allies but justice itself, Onii ...

  3. Codeforces Round #439 (Div. 2) Problem B (Codeforces 869B)

    Even if the world is full of counterfeits, I still regard it as wonderful. Pile up herbs and incense ...

  4. Codeforces Round #439 (Div. 2)【A、B、C、E】

    Codeforces Round #439 (Div. 2) codeforces 869 A. The Artful Expedient 看不透( #include<cstdio> in ...

  5. Codeforces Round #716 (Div. 2), problem: (B) AND 0, Sum Big位运算思维

    & -- 位运算之一,有0则0 原题链接 Problem - 1514B - Codeforces 题目 Example input 2 2 2 100000 20 output 4 2267 ...

  6. Codeforces Round #297 (Div. 2)D. Arthur and Walls 暴力搜索

    Codeforces Round #297 (Div. 2)D. Arthur and Walls Time Limit: 2 Sec  Memory Limit: 512 MBSubmit: xxx ...

  7. Codeforces Round #753 (Div. 3), problem: (D) Blue-Red Permutation

    还是看大佬的题解吧 CFRound#753(Div.3)A-E(后面的今天明天之内补) - 知乎 (zhihu.com) 传送门  Problem - D - Codeforces 题意 n个数字,n ...

  8. Codeforces Round #771 (Div. 2), problem: (B) Odd Swap Sort

    Problem - B - Codeforces 就是给你个序列, 给他整成升序的, 每次操作可以使相邻两个数交换位置, 交换条件是二数之和为奇数 结果只需输出是否可以整成升序的 思路: 需要奇数偶数 ...

  9. Codeforces Round #306 (Div. 2), problem: (B) Preparing Olympiad【dfs或01枚举】

    题意: 给出n个数字,要求在这n个数中选出至少两个数字,使得它们的和在l,r之间,并且最大的与最小的差值要不小于x.n<=15 Problem - 550B - Codeforces 二进制 利 ...

随机推荐

  1. (转)Xcode导航快捷键(大全)

    Xcode导航快捷键1.工程导航器:Command+1快速浏览代码.图片以及用户界面文件. 2.显示/隐藏导航器面板:Command+0当你在对屏幕进行截图的时候可能会想要隐藏起与你感兴趣内容的无关的 ...

  2. 排名前10的vue前端UI框架框架值得你掌握

    参考:https://juejin.im/post/5b34faeef265da59645b188e muse-ui 框架: https://juejin.im/entry/582974eb8ac24 ...

  3. 18.搭建 vue 环境

    第一步 node环境安装 1.1 如果本机没有安装node运行环境,请下载node 安装包进行安装1.2 如果本机已经安装node的运行换,请更新至最新的node 版本下载地址:https://nod ...

  4. node.js初识08

    1.模块的概念,在前端的世界里,jq和js的关系,在后台里就是express和原生node的关系, 2.每一个js里的函数都只在当前文件里起作用,如果你希望在其他js里调用这个函数,这么你需要在这个j ...

  5. teragen/terasort_简化版

    1, 关闭Hadoop安全模式 进入hdfs用户 su – hdfs Cd /opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/bin hdfs dfs ...

  6. es6函数的扩展

    扩展运算符 含义 扩展运算符(spread)是三个点(...).它好比 rest 参数的逆运算,将一个数组转为用逗号分隔的参数序列. 扩展运算符的应用 (1)合并数组 // ES5 [1, 2].co ...

  7. Django中的View视图讲解

    Django中的View视图(view.py)是负责处理用户请求和返回响应的逻辑. 视图函数或视图简而言之就是一个python函数,它接受一个web请求并返回一个Web响应. 此响应可以是网页的HTM ...

  8. hdu5293 lca+dp+树状数组+时间戳

    题意是给了 n 个点的树,会有m条链条 链接两个点,计算出他们没有公共点的最大价值,  公共点时这样计算的只要在他们 lca 这条链上有公共点的就说明他们相交 dp[i]为这个点包含的子树所能得到的最 ...

  9. hdu2295DLX重复覆盖+二分

    题目是说 给了n个城市 m个雷达 你只能选择其中的k个雷达进行使用 你可以设置每个雷达的半径,最后使得所有城市都被覆盖,要求雷达的半径尽可能的小(所有雷达的半径是一样的) 二分最小半径,然后每次重新建 ...

  10. 如何登录Sitecore CMS

    这是关于学习如何使用和开发Sitecore CMS的系列文章中的第一篇. 在使用Sitecore CMS之前,必须先登录.新Sitecore开发人员常见的一个问题是“我该在哪里登录?” 安装任何版本的 ...