上一页 1 2 3 4 5 6 7 ··· 15 下一页
摘要: The bear has a string s = s1s2... s|s| (record |s| is the string's length), consisting of lowercase English letters. The bear wants to count the numbe 阅读全文
posted @ 2017-08-28 23:35 Crutain 阅读(234) 评论(0) 推荐(1)
摘要: 题目描述 输入 输出 摘自题解。。orz我还是太菜了 #include<bits/stdc++.h> using namespace std; typedef long long LL; #define m first #define w second const int SIZE=1e5+7; i 阅读全文
posted @ 2017-08-28 17:24 Crutain 阅读(139) 评论(0) 推荐(0)
摘要: Some dwarves that are finishing the StUDY (State University for Dwarven Youngsters) Bachelor courses, have been told "no genome, no degree". That mean 阅读全文
posted @ 2017-08-27 14:15 Crutain 阅读(131) 评论(0) 推荐(0)
摘要: Description My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of vari 阅读全文
posted @ 2017-08-26 16:07 Crutain 阅读(144) 评论(0) 推荐(0)
摘要: One day n friends gathered together to play "Mafia". During each round of the game some player must be the supervisor and other n - 1 people take part 阅读全文
posted @ 2017-08-24 01:49 Crutain 阅读(195) 评论(0) 推荐(0)
摘要: An infinitely long railway has a train consisting of n cars, numbered from 1 to n (the numbers of all the cars are distinct) and positioned in arbitra 阅读全文
posted @ 2017-08-24 01:07 Crutain 阅读(183) 评论(0) 推荐(0)
摘要: 莫比乌斯的模板题 都是差不多的 F(m)为gcd(i,j) = m(i∈[1,m],j∈[1,n])的个数 f(m) = ∑(m\d) F(d) 意义为gcd(i,j)为m的倍数的个数 运用莫比乌斯反演得到 F(m) = ∑(m\d)μ(d/m) * f(d) #include <iostream> 阅读全文
posted @ 2017-08-23 11:33 Crutain 阅读(142) 评论(0) 推荐(0)
摘要: 原根存在的充要条件 n = 1,2,4,p^r (p为奇素数,r为任意正整数) 原根的性质 若n存在原根,则原根个数为φ(φ(n)) 若g是n的一个原根,则g^d是n的原根的充要条件为gcd(d,φ(n)) = 1 一个数的全体原根乘积模n余1 一个数的全体原根和模n余μ(n-1) #include 阅读全文
posted @ 2017-08-22 21:08 Crutain 阅读(160) 评论(0) 推荐(0)
摘要: Devu wants to decorate his garden with flowers. He has purchased n boxes, where the i-th box contains fi flowers. All flowers in a single box are of t 阅读全文
posted @ 2017-08-22 13:39 Crutain 阅读(166) 评论(0) 推荐(0)
摘要: Some days ago, I learned the concept of LCM (least common multiple). I've played with it for several times and I want to make a big number with it. Bu 阅读全文
posted @ 2017-08-21 16:49 Crutain 阅读(212) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 15 下一页