DZY Love Math 系列 [BOZJ3309] DZY Loves Math 顺着套路就能得到:$Ans = \sum_{T=1}\lfloor \frac{n}{T} \rfloor \lfloor \frac{m}{T} \rfloor \sum_{d|T} f(d) \mu(\frac ...
分类:
其他好文 时间:
2019-02-08 01:04:09
阅读次数:
182
Bholu the Pandit on this New Year wanted to divide his Cuboidal Packaging block into cubes. But he loves uniformity so he asks you to divide it such a ...
分类:
其他好文 时间:
2019-02-02 23:04:03
阅读次数:
154
Problem A. Mushroom Monster Problem Kaylin loves mushrooms. Put them on her plate and she'll eat them up! In this problem she's eating a plate of mush ...
分类:
其他好文 时间:
2019-01-23 20:27:25
阅读次数:
134
Petya loves computer games. Finally a game that he's been waiting for so long came out! The main character of this game has n different skills, each o ...
分类:
其他好文 时间:
2019-01-20 00:54:18
阅读次数:
145
Little Sub loves math very much, and has just come up with an interesting problem when he is working on his geometry homework. It is very kind of him ...
分类:
其他好文 时间:
2019-01-19 22:15:09
阅读次数:
252
1、bzoj3481 DZY Loves Math III 求$xy \equiv Q \pmod {P}$的解的组数。以乘积形式输入$P,Q$。 题解 一来直接把P拆质因子转成多个方程最后求乘积。 现在考虑$xy \equiv Q \pmod {pi^{ai}}$的解的组数。 设$p=pi^{ai ...
分类:
其他好文 时间:
2019-01-19 00:49:43
阅读次数:
214
D - DZY Loves Strings 思路:感觉这种把询问按大小分成两类解决的问题都很不好想。。 https://codeforces.com/blog/entry/12959 题解说得很清楚啦。 ...
分类:
其他好文 时间:
2019-01-14 20:13:42
阅读次数:
165
"problem" 很有意思的一道题 Solution 初看此题毫无头绪,2.2mb太丧心病狂了 再看题目,注意到重要性质: 众数个数大于一半 ~~看完题解之后~~想到使用一个方法:摩尔投票法 摩尔投票法是啥玩意? 考虑一段序列,其中众数的个数超过一半 每一轮投票,从序列中选出两个不同的数,丢弃 无 ...
分类:
其他好文 时间:
2019-01-09 20:31:17
阅读次数:
222
题目描述: 对于正整数n,定义f(n)为n所含质因子的最大幂指数。例如f(1960)=f(2^3 * 5^1 * 7^2)=3, f(10007)=1, f(1)=0。给定正整数a,b,求sigma(sigma(f(gcd(i,j)))) (i=1..a, j=1..b)。 算法标签:数论,欧拉函数 ...
分类:
其他好文 时间:
2019-01-08 12:14:35
阅读次数:
167
DZY has a sequence a, consisting of n integers. We'll call a sequence ai,?ai?+?1,?...,?aj (1?≤?i?≤?j?≤?n) a subsegment of the sequence a. The value (j ...
分类:
其他好文 时间:
2019-01-03 17:28:29
阅读次数:
193