A. The Artful Expedient

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 xor means 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 = yj; i ≠ j and xi = xj; i ≠ 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.


题目的意思是给出2n个不同的数字问上下两行两两异或结果有出现的对数是奇还是偶

思路:直接先存下每个数字数否出现 然后暴力

#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include <map>
#include <cmath>
#include <set>
#include <stack>
#include <queue>
#include <vector>
#include <bitset>
#include <functional>
#include <bitset>
using namespace std;int a[2005], b[2005], cnt[5000006];int main()
{int n;memset(a, 0, sizeof a);memset(b, 0, sizeof b);memset(cnt, 0, sizeof cnt);scanf("%d", &n);for (int i = 0; i < n; i++)scanf("%d", &a[i]), cnt[a[i]]++;for (int i = 0; i < n; i++)scanf("%d", &b[i]), cnt[b[i]]++;int ans = 0;for (int i = 0; i < n; i++)for (int j = 0; j < n; j++)if (cnt[a[i] ^ b[j]] > 0)ans++;printf("%s\n", ans % 2 ? "Koyomi" : "Karen");return 0;
}

Codeforces 869A. The Artful Expedient相关推荐

  1. CodeForces 869A The Artful Expedient

    题目链接:http://codeforces.com/contest/869/problem/A 题意:给你长度都为n的序列,xn和yn,问你存在多少组pair(i.j),即x[i]^y[j]是这2n ...

  2. Codeforces Round #439 (Div. 2) A. The Artful Expedient

    A. The Artful Expedient Problem Statement Rock- Paper!     After Karen have found the deterministic ...

  3. CF 869 A. The Artful Expedient【异或】

    A. The Artful Expedient time limit per test1 second memory limit per test256 megabytes inputstandard ...

  4. codeforces The Artful Expedient(数学思维题)

    题目链接: http://codeforces.com/contest/869/problem/A 题目大意: 给你一个n,分别输入两组n个数字,如果这两组数字两两异或的结果与两组数字中的某一个数字相 ...

  5. Codeforces 869 A.The Artful Expedient(博弈论)

    题解 emmmm 看不懂...英语不行,看大意应该是博弈论 , 我就猜谁在什么情况下会赢,结果是胜者只有一个---Karen #include <bits/stdc++.h> using ...

  6. 【Codeforces Round #439 (Div. 2) A】The Artful Expedient

    [链接] 链接 [题意] [题解] 暴力 [错的次数] 在这里输入错的次数 [反思] 在这里输入反思 [代码] #include <bits/stdc++.h> using namespa ...

  7. CF869A The Artful Expedient 结论题+数论

    传送门 题目描述 Tommy和Karen在玩一个游戏. 他们各自准备了一个长度为n的数组,Tommy的数组称作a,Karen的数组称作b. 保证这2n个数互不相同,设这2n个数构成的集合为S. 现在他 ...

  8. Codeforces--896A--The Artful Expedient

    题目描述: Rock- Paper! After Karen have found the deterministic winning (losing?) strategy for rock-pape ...

  9. Codeforces869A The Artful Expedient

    标签:模拟 Rock... Paper! After Karen have found the deterministicwinning (losing?) strategy for rock-pap ...

最新文章

  1. FPGA之道(68)原语的使用
  2. 【 C 】对指针表达式的个人总结与思考
  3. 访问者模式用到了一种双分派的技术——静态分派和动态分派
  4. 离2006年考研还有一个月
  5. 大数据思维是企业互联网化的思维内核
  6. delphi文本转换mp3_基于百度AI 的语音合成、转换的 Yii2 sdk.
  7. openwrt刷回原厂固件_小米路由器4刷breed, pandavan,openwrt
  8. MTK车载平台实现MIPI转LVDS驱动移植
  9. JavaScript 基础知识总结归纳(一)
  10. HDU 4173(计算几何
  11. sql server在指定模式下创建表
  12. vue项目实现权限控制的几种思路
  13. SpringBoot基础
  14. 用debugserver+lldb代替gdb进行iOS远程动态调试
  15. 电脑画流程图用什么软件好?这3款软件很好用
  16. 达梦使用powerdesigner生成er模型图
  17. Android—— ListView 的简单用法及定制ListView界面
  18. 亲爱的,听说做完这一百件事,我们就不用分手了。dear,i miss you...
  19. 全球与中国3-溴苯甲酸叔丁酯市场深度研究分析报告
  20. php机内码,一个汉字的机内码需用( )个字节存储。

热门文章

  1. React+阿里云Aliplayer播放器实现rtmp直播(推流时间差,重启播放器,计时观看)
  2. OpenGL画三角形
  3. Uber Thomas 论文整理
  4. 攻防世界_mobil_app1
  5. 如何提高自己的 Java 编程技能
  6. php小程序地图处理,微信小程序地图 map
  7. 关于压缩文件后删除源文件的一点问题
  8. 从myspace数据库看分布式系统数据结构变迁
  9. Linux /dev/mapper/ubuntu--vg-ubuntu--lv 磁盘空间不足的问题
  10. [ 电脑维修那些事 ] 一招教你自己解决电脑蓝屏