Adieu l'ami. Koyomi is helping Oshino, an acquaintance of his, to take care of an open space around the abandoned Eikou Cram School building, Oshino's makeshift residence. The space is represented by a rectangular grid of n × m cells, arranged into n…
— This is not playing but duty as allies of justice, Nii-chan! — Not allies but justice itself, Onii-chan! With hands joined, go everywhere at a speed faster than our thoughts! This time, the Fire Sisters — Karen and Tsukihi — is heading for somewher…
Even if the world is full of counterfeits, I still regard it as wonderful. Pile up herbs and incense, and arise again from the flames and ashes of its predecessor — as is known to many, the phoenix does it like this. The phoenix has a rather long lif…
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…
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],把所有答…
C. The Intriguing Obsession 题目链接http://codeforces.com/contest/869/problem/C 解题心得: 1.由于题目中限制了两个相同颜色的点之间长度至少为3,这样就只能两两不同颜色的点相互组合,再将三种组合情况的可能种数乘起来. 2.然后就是两个不同颜色的点怎么组合的问题,这就是一个记忆化搜索(DP),假如红色点和黄色点相互组合,这样一个红色点可以对应一个黄色点(dp[x][y] = dp[x-1][y-1]*y),或者…