码迷,mamicode.com
首页 >  
搜索关键字:zcc loves intersecti    ( 824个结果
BZOJ3309 DZY Loves Math 【莫比乌斯反演】
题目 对于正整数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)。 输入格式 第一行一个数T,表示询问数 ...
分类:其他好文   时间:2018-04-30 21:13:27    阅读次数:154
SPOJ:Decreasing Number of Visible Box(不错的,背包?贪心?)
Shadowman loves to collect box but his roommates woogieman and itman don't like box and so shadowman wants to hide boxes as many as possible. A box ca ...
分类:其他好文   时间:2018-04-29 20:32:24    阅读次数:167
Atcoder 2335 Frequency 题解
Problem Statement Snuke loves constructing integer sequences. There are N piles of stones, numbered 1 through N. The pile numbered i consists of ai st ...
分类:其他好文   时间:2018-04-28 01:30:11    阅读次数:262
SPOJ:Strange Waca(不错的搜索&贪心&剪枝)
Waca loves maths,.. a lot. He always think that 1 is an unique number. After playing in hours, Waca suddenly realize that every integer can be represe ...
分类:其他好文   时间:2018-04-24 21:51:07    阅读次数:189
【AGC 002F】Leftmost Ball
Description Snuke loves colorful balls. He has a total of N*K balls, K in each of his favorite N colors. The colors are numbered 1 through N.He will a ...
分类:其他好文   时间:2018-04-21 10:13:22    阅读次数:148
Exponial (欧拉定理+指数循环定理+欧拉函数+快速幂)
题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=2021 Description Everybody loves big numbers (if you do not, you might want to stop reading at ...
分类:其他好文   时间:2018-04-18 21:54:29    阅读次数:163
349 Intersection of Two Arrays 两个数组的交集
给定两个数组,写一个函数来计算它们的交集。例子: 给定 num1= [1, 2, 2, 1], nums2 = [2, 2], 返回 [2].提示: 每个在结果中的元素必定是唯一的。 我们可以不考虑输出结果的顺序。详见:https://leetcode.com/problems/intersecti ...
分类:编程语言   时间:2018-04-15 11:50:58    阅读次数:185
luogu P2397 yyy loves Maths VI (mode)
题目背景 自动上次redbag用加法好好的刁难过了yyy同学以后,yyy十分愤怒.他还击给了redbag一题,但是这题他惊讶的发现自己居然也不会,所以只好找你 题目描述 [h1]udp2:第一题因为语言性质问题,比赛结束后将所有c/c++的程序的内存调为2.2mb后重测。[/h1] 他让redbag ...
分类:其他好文   时间:2018-04-14 23:03:15    阅读次数:150
Tree Restoring
题目描述 Aoki loves numerical sequences and trees.One day, Takahashi gave him an integer sequence of length N, a1,a2,…,aN, which made him want to construc ...
分类:其他好文   时间:2018-04-12 23:57:52    阅读次数:391
Bzoj3309: DZY Loves Math
题面 "传送门" Sol 莫比乌斯反演一波就是求 $$\sum_{k=1}^{min(a,b)}\lfloor\frac{a}{k}\rfloor\lfloor\frac{b}{k}\rfloor\sum_{d|k}f(d)\mu(\frac{k}{d})$$ 前面的分块就好了 考虑求 $$\sum ...
分类:其他好文   时间:2018-04-12 22:39:37    阅读次数:226
824条   上一页 1 ... 15 16 17 18 19 ... 83 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!