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. robots.txt文件的解析及过滤
  2. Angualr6表单提交验证并跳转
  3. 增强学习(一) ----- 基本概念
  4. Zookeeper下载
  5. SqlServer中的动态Sql
  6. 3月15日之前的FreeEIM
  7. SQL Server使用convert对datetime日期数据进行获取
  8. THREE.JS OrbitControls的参数设置
  9. [转载] Python函数中把列表(list)当参数
  10. Atitit Kafka 使用总结 内容 Kafka2.0 50M1 启动 要启动zookeeper 先,比ativemp麻烦很多啊1 Kafka生产者 1 Kafka消费者2 2
  11. 菜鸟又出手!家里没人也能收包裹,这个黑科技还获过阿里内部大奖
  12. ICO图标在线生成,php生成ICO图标在线制作源码
  13. Eclipse Memory Analyzer,内存泄漏插件,安装使用
  14. PyGmae:有限状态机实践(十三)
  15. 绿盟SecXOps安全智能分析技术
  16. 仪表盘服务(Dashboard)安装配置
  17. 【SEO经验分享】网站分析对SEO优化有什么用
  18. “敬老孝亲颂家风 做美德传承人”主题实践活动总结
  19. 威纶通宏开机后使用初始化宏指令_计算机从摁下电源到开机是怎么工作的
  20. 【渗透测试】如何使用burpsuite对特殊密码进行爆破

热门文章

  1. 用PS做法线,高光贴图的最简图文教程
  2. ArcGIS 切片/瓦片的发布与加载
  3. 发布3天获推荐10w+,视频号内容出现新玩法?
  4. 表白神器-摩斯密码1121311233321113212313323332113
  5. Educational Codeforces Round 40千名记
  6. 如何修改C:\Windows\System32\drivers\etc\hosts文件
  7. java base64转字图片、图片转base64字符串
  8. 【划词翻译】Ubuntu 实现划词翻译
  9. 计算机碎片整理,计算机磁盘碎片整理
  10. (附源码)anjule客户信息管理系统 毕业设计 181936