CodeForces - 869A The Artful Expedient】的更多相关文章

A. time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Rock... Paper! After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her brother, Koyomi, comes up…
题意:有两个序列X和Y,各含n个数,这2n个数互不相同,若满足xi^yj的结果在序列X内或序列Y内的(xi,yj)对数为偶数,则输出"Karen",否则输出"Koyomi". 分析: 1.暴力方法不再赘述. 2. (1)若xi ^ yj的结果在序列X内,假设这个数为xk,即xi ^ yj = xk,根据异或定理,可得xk ^ yj = xi, 即(xi, yj)和(xk, yj)都是满足要求的对. (2)若xi ^ yj的结果在序列Y内,假设这个数为yk,即xi ^…
A. The Artful Expedient 题目链接http://codeforces.com/contest/869/problem/A 解题心得:就是一个水题,读懂题就好,题意是,(i,j)ai异或bi,统计ai异或bi得到的数能够在ai或bi中找的个数,如果是偶数输出Karen,否则输出Karen. #include<bits/stdc++.h> using namespace std; const int maxn = 20000; const int maxn2 = 2e7+10…
A. The Artful Expedient time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Rock... Paper! After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her broth…
A. The Artful Expedient time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Rock... Paper! After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her broth…
[链接] 链接 [题意] [题解] 暴力 [错的次数] 在这里输入错的次数 [反思] 在这里输入反思 [代码] #include <bits/stdc++.h> using namespace std; const int INF = 2e6; const int N = 2e3; bool bo[INF+10]; int x[N+10],y[N+10],n; int main() { //freopen("F:\\rush.txt","r",stdin…
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 a…
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Rock... Paper! After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her brother, Koyomi, comes up wit…
A. The Artful Expedient 题目链接:http://codeforces.com/contest/869/problem/A 题目意思:给你两个数列,各包含n个数,现在让你从上下两个数列中各取一个数a[i],b[j],如果a[i]^b[j]在这2×n个数里面出现过,那么就获得一分,问将任意的a[i],b[j]之间的亦或之后,如果分数是奇数则Koyomi胜利,否则Karen胜利.问最后到底谁胜了. 题目思路:非常无聊的题目,暴力都可以过,就是暴力枚举a[i],b[j],把所有答…
Codeforces Round #439 (Div. 2) codeforces 869 A. The Artful Expedient 看不透( #include<cstdio> int main(){ puts("Karen"); ; } 15ms codeforces 869B. The Eternal Immortality(数学,水) 题意:输出两个数的阶乘的商的 个位数 题解:两数之差大于5,个位数就是0.小于5直接个位相乘即可. #include<cs…