B. The Eternal Immortality 题目链接http://codeforces.com/contest/869/problem/B 解题心得:题意就是给出a,b,问(a!)/(b!)的个位数,要注意0,5两个数,只要a,b相差超过5个位数就只能是0,其实没有看到相差5看到相差10也可以的,然后又暴力跑一个末位数就可以了. /*这里跑的是相差10位*/ #include<bits/stdc++.h> using namespace std; typedef long long…
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…
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],把所有答…
题目链接  Round 439 div2 就做了两道题TAT 开场看C题就不会 然后想了好久才想到. 三种颜色挑出两种算方案数其实是独立的,于是就可以乘起来了. E题想了一会有了思路,然后YY出了一种方案. 我们可以对每个矩形随机一个权值,然后用二维树状数组搞下. 询问的时候看两个点权值是否相等就可以了 于是就过了. D题待补 给出一棵完全二叉树,这棵树上有附带的m条边(m <= 4),求这张图的简单路径条数. qls的题就是厉害…… C题 #include <bits/stdc++.h>…
强哉qls,这场div2竟是其出的!!! A. The Artful Expedient 暴力 ^ ,判断是否出现,有大佬根据亦或的性质推出 Karen 必赢,太强啦23333333333333. #include <stdio.h> #include <stdlib.h> #include <cmath> #include <string.h> #include <iostream> #include <algorithm> #in…
[链接] 链接 [题意] 求b!/a!的最后一位数字 [题解] b-a>=20的话 a+1..b之间肯定有因子2和因子5 答案一定是0 否则暴力就好 [错的次数] 在这里输入错的次数 [反思] 暴力很大,但是差值很小就确定了. 可以作为一个trick [代码] #include <bits/stdc++.h> #define ll long long using namespace std; ll a,b; int main() { //freopen("F:\\rush.tx…
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…