CodeForces - 787C Rick and Morty are playing their own version of Berzerk (which has nothing in common with the famous Berzerk game). This game needs a huge space, so they play it with a computer. In this game there are n objects numbered from 1 to n…
http://codeforces.com/problemset/problem/786/A Description Rick and Morty are playing their own version of Berzerk (which has nothing in common with the famous Berzerk game). This game needs a huge space, so they play it with a computer. In this game…
A. Berzerk 题目连接: http://codeforces.com/contest/786/problem/A Description Rick and Morty are playing their own version of Berzerk (which has nothing in common with the famous Berzerk game). This game needs a huge space, so they play it with a computer…
专题[vjudge] - 数论0.1 web-address : https://cn.vjudge.net/contest/176171 A - Mathematically Hard 题意就是定义一个函数S.其中S(x)=sqr(1~x中与x互质的数的个数). 显然,这里要运用到Euler函数(即φ函数,题后已给出).那么,我们计算出5*10^6以内的phi后,计算一个前缀平方和就行了. B - Ifter Party 题意就是让你求一个数大于L的因数,并把它们升序输出.比较水,但是容易PE…
DP+卡常数+高精度/ 计算几何+二分+判区间交/ 凸包 首先感谢徐老师的慷慨,让蒟蒻有幸膜拜了学军的神题.祝NOI2015圆满成功 同时膜拜碾压了蒟蒻的众神QAQ 填填填 我的DP比较逗比……(当时看到其他大神有更加优秀的做法) f[i][j]表示前 i 个数,第一行填了 j 个的方案数,那么如果 i 并没有固定位置,f[i][j]=f[i-1][j]+f[i-1][j-1];即 i 这个数放在第一行或是第二行...(废话) 如果 i 固定的位置是第一行(1,y),那么f[i]中只有f[i…