
数论
ZJLORD
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Harmonic Number 数论
Harmonic NumberIn mathematics, thenth harmonic number is the sum of the reciprocals of the firstn natural numbers:In this problem, you are givenn, you have to find Hn.InputInput原创 2017-07-14 00:01:39 · 488 阅读 · 0 评论 -
中国剩余定理 Biorhythms HDU - 1370
中国剩余定理(孙子定理): 孙子定理是中国古代求解一次同余式组(见同余)的方法。是数论中一个重要定理。又称中国余数定理。 ————参见百度;中国剩余定理给出了以下的一元线性同余方程组有解的原创 2017-07-31 20:20:47 · 414 阅读 · 0 评论 -
Dead Fraction POJ - 1930
Dead Fraction POJ - 1930 Mike is frantically scrambling to finish his thesis at the last minute. He needs to assemble all his research notes into vaguely coherent form in the next 3 days. Unfortunat原创 2017-09-04 18:35:27 · 308 阅读 · 0 评论 -
[离散对数] uva 11916 Emoogle Grid
点击打开链接转载 2017-08-15 20:06:42 · 246 阅读 · 0 评论 -
DP? HDU - 3944 排列 模板
socaily题意: 给定你 n,k,p,有一个杨辉三角,现在从顶点到第n行第k列,只能向下或向右下,问最短路径和模p的值我们可以发现: 对于n>2k 的时候: 我们可以往左上走直到边界然后再往上到顶点。这样的路径最短。 C(n,k)= C(n+1,m)+n-m;原创 2017-08-11 16:18:11 · 288 阅读 · 0 评论 -
Prime Time 暴力打表
Prime Time Euler is a well-known matematician, and, among many other things, he discovered that the formula n2 +n+41 produces a prime for 0 ≤ n < 40. For n = 40, the formula produces 16原创 2017-08-05 19:52:50 · 477 阅读 · 3 评论 -
Help Hanzo light OJ 1197 “素数筛”
Help HanzoAmakusa, the evil spiritual leader has captured the beautiful princess Nakururu. The reason behind this is he had a little problem with Hanzo Hattori, the best ninja and the love of原创 2017-08-05 19:42:01 · 310 阅读 · 0 评论 -
Counting Divisors (2017 多校4)“素 数 筛”
- Counting Divisors In mathematics, the functiond(n)d(n) denotes the number of divisors of positive integer nn.For example, d(12)=6d(12)=6 because 1,2,3,4,6,121,原创 2017-08-05 18:58:25 · 407 阅读 · 0 评论 -
Killer Names 2017 多校 8
Killer Names 2017 多校八;点击打开链接题意: 给你 m 种字符,求用 m 种字符组成 姓和名 (每个长度为 n ) ,有多少种组合方法?(姓和名中不能有相同的字符)思路:排列组合;比赛的时候"成功"的没有推出来,太菜。。。先说一下比赛时候的思路吧: 其实到现在搜题解的时候发现就跟别人后面求排列的时候有一点不一样原创 2017-08-18 14:57:01 · 209 阅读 · 0 评论 -
超能粒子炮·改 HYSBZ - 4591
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=4591求求 C(n,0)+C(n,1)+...+C(n,k)mod2lucas 定理:公式推了半天,结果思路混乱,不知道推出了个啥,哎,果断搜了一波代码,看了半天也不是很懂,先记录一下吧!这个博客写的可以的:点击打开链接果原创 2017-08-11 15:00:12 · 426 阅读 · 0 评论 -
GCD - Extreme (II)
GCD - Extreme (II)题目:https://odzkskevi.qnssl.com/6d2fb605cd58bb13f31bd33772a3181c?v=1501190121for(i=1;i就是这个式子了,求 G =? #include#include#include#include#define maxn 4000101原创 2017-08-03 23:53:47 · 201 阅读 · 0 评论 -
Help Hanzo
Help Hanzo Amakusa, the evil spiritual leader has captured the beautiful princess Nakururu. The reason behind this is he had a little problem with Hanzo Hattori, the best n原创 2017-08-03 23:34:57 · 333 阅读 · 0 评论 -
Fantasy of a Summation
Fantasy of a SummationIf you think codes, eat codes then sometimes you may get stressed. In your dreams you may see huge codes, as I have seen once. Here is the code I saw in my dream.原创 2017-08-03 23:24:17 · 278 阅读 · 0 评论 -
Mysterious Bacteria
Mysterious BacteriaDr. Mob has just discovered a Deathly Bacteria. He named it RC-01. RC-01 has a very strange reproduction system. RC-01 lives exactlyx days. Now RC-01 produces exactly p ne原创 2017-08-03 22:52:40 · 345 阅读 · 1 评论 -
- 青蛙的约会 exgcd 扩欧
两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的。为了帮助这两只乐观的青蛙,原创 2017-07-17 23:49:39 · 319 阅读 · 0 评论 -
I - Large Division
I - Large DivisionGiven two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and only if there exists an intege原创 2017-08-03 22:17:41 · 332 阅读 · 0 评论 -
Description has only two Sentences HDU - 3307 欧拉定理
Description has only two Sentences HDU - 3307题目:a n = X*a n-1 + Y and Y mod (X-1) = 0. Your task is to calculate the smallest positive integer k that a k mod a0 = 0. InputEach line原创 2017-08-02 10:59:51 · 329 阅读 · 0 评论 -
51 nod 1135原根
51 nod 1135原根题意: a 模 m 的阶定义: gcd(a,m)=1,使得成立的最小的 r,称为 a 对 模m 的 阶 那么整个题就是要求 a^(p-1) % p==1 成立的 最小 a ;方法: copy by 点击打开链接分解质因子,对任何整数 a ∈[1,p-1], 检验 a 是否为 p 的原创 2017-11-08 23:54:06 · 583 阅读 · 0 评论