
数学-数论
文章平均质量分 70
acm_cxq
这个作者很懒,什么都没留下…
展开
-
hdu 1005 Number Sequence(循环节)
Number SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 149591 Accepted Submission(s): 36421Problem DescriptionA numbe原创 2016-06-08 16:47:39 · 367 阅读 · 0 评论 -
hdu 2669 Romantic(线性同余,扩展欧几里得)
RomanticTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4433 Accepted Submission(s): 1868Problem DescriptionThe Sky is Sprite原创 2016-06-15 20:06:28 · 916 阅读 · 0 评论 -
hdu 1576 A/B(乘法逆元,扩展欧几里得)
A/BTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3916 Accepted Submission(s): 3007Problem Description要求(A/B)%9973,但由于A很大,我们原创 2016-06-15 21:37:50 · 545 阅读 · 0 评论 -
hdu 1792 A New Change Problem(数论)
A New Change ProblemTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1236 Accepted Submission(s): 737Problem DescriptionNow gi原创 2016-06-17 21:10:21 · 876 阅读 · 0 评论 -
hdu 1021 Fibonacci Again(斐波那契数列,取余)
Fibonacci AgainTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 51621 Accepted Submission(s): 24423Problem DescriptionThere ar原创 2016-06-17 21:12:03 · 488 阅读 · 0 评论 -
hdu 5150 Sum Sum Sum(判断素数)
Sum Sum SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1032 Accepted Submission(s): 611Problem DescriptionWe call a posit原创 2016-07-14 23:52:46 · 442 阅读 · 0 评论 -
hdu 5175 Misaki's Kiss again(数论)
Misaki's Kiss againTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1618 Accepted Submission(s): 412Problem DescriptionAfter t原创 2016-07-19 15:15:54 · 420 阅读 · 0 评论 -
hdu 5778 abs(分解质因子,枚举平方数,数论)
absTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 157 Accepted Submission(s): 63Problem DescriptionGiven a number x, ask p原创 2016-07-30 22:37:29 · 1596 阅读 · 0 评论 -
poj 2551 Ones(同余)
OnesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11459 Accepted: 6487DescriptionGiven any integer 0 InputEach line contains a number n.Outp原创 2016-08-06 10:37:54 · 383 阅读 · 0 评论 -
poj 1426 Find The Multiple(bfs+同余定理)
Find The MultipleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 26925 Accepted: 11173 Special JudgeDescriptionGiven a positive integer n, write a原创 2016-08-06 11:11:59 · 674 阅读 · 0 评论 -
hdu 1226 超级密码(BFS,同余剪枝)
超级密码Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3868 Accepted Submission(s): 1242Problem DescriptionIgnatius花了一个星期的时间终于原创 2016-08-06 17:29:20 · 501 阅读 · 0 评论 -
csu 1416 Practical Number(数论,结论题)
Practical NumberTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 182 Solved: 48[Submit][Status][Web Board]DescriptionIn number theory, a practical number is a positive integer n such原创 2016-08-18 20:27:18 · 412 阅读 · 0 评论 -
hdu 1104/poj 2426 Remainder(数论,BFS)
RemainderTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3849 Accepted Submission(s): 925Problem DescriptionCoco is a clever原创 2016-08-08 11:09:52 · 897 阅读 · 0 评论 -
hdu 1395 2^x mod n = 1(欧拉函数)
2^x mod n = 1Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16236 Accepted Submission(s): 5053Problem DescriptionGive a numb原创 2016-08-11 00:08:11 · 1084 阅读 · 0 评论 -
欧拉函数,欧拉定理模板
欧拉定理:设gcd(a,m)=1,必有正整数x,使得a^x=1(mod m),且设满足等式的最小正整数为x0,必满足x0|phi(m).注意m>1.否则如果gcd(a,m)!=1,则方程a^x=1(mod m)没有解。phi(m)是m的欧拉函数,值为具体的求法是m*(m的质因子-1)/(m的质因子)(边分解质因数边算即可)最小的正整数解必然是phi(m)的一原创 2016-08-11 00:11:43 · 629 阅读 · 0 评论 -
csu 1755 阶数(欧拉函数)
1755: 阶数Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 54 Solved: 6[Submit][Status][Web Board]Description满足a^x≡1(mod n)的最小正整数x称为a模n的阶。现给出两个正整数,求x。Input第一行输入k,表示有k组数据之后k行每行两个原创 2016-08-11 00:14:34 · 573 阅读 · 0 评论 -
csu 1756 prime(数论)
PrimeTime Limit: 3 Sec Memory Limit: 128 MBSubmit: 79 Solved: 11[Submit][Status][Web Board]Description如果a,b的最大公约数是1,说明a,b是一对互素的数,给定你n个数字,希望你找出互素的数的对数Input第一行输入一原创 2016-08-12 20:34:51 · 400 阅读 · 0 评论 -
hdu 5832 A water problem(简单数论)
A water problemTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 291 Accepted Submission(s): 161Problem DescriptionTwo planets原创 2016-08-14 23:17:07 · 458 阅读 · 0 评论 -
hdu 5750 Dertouzos(数论,打表,暴力)
DertouzosTime Limit: 7000/3500 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 853 Accepted Submission(s): 262Problem DescriptionA positive prope原创 2016-07-24 10:49:05 · 499 阅读 · 0 评论 -
poj 1061 青蛙的约会 (线性同余,扩展欧几里得)
青蛙的约会Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 104562 Accepted: 20456Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直原创 2016-06-15 10:08:49 · 508 阅读 · 0 评论 -
hdu 5108 Alexandra and Prime Numbers(素数)
Alexandra and Prime NumbersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1849 Accepted Submission(s): 630Problem Description原创 2016-07-12 09:23:48 · 535 阅读 · 0 评论 -
hdu 1852 Beijing 2008(快速幂取模)
Beijing 2008Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/65535 K (Java/Others)Total Submission(s): 744 Accepted Submission(s): 294Problem DescriptionAs we all know,原创 2016-06-08 18:19:19 · 577 阅读 · 0 评论 -
hdu 1454 Happy 2004(数论,分解因子,乘法逆元,快速幂取模)
Happy 2004Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1413 Accepted Submission(s): 1029Problem DescriptionConsider a posi原创 2016-06-08 16:06:58 · 504 阅读 · 0 评论 -
hdu 2582 f(n)(找规律,素数筛选,优化)
f(n)Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 471 Accepted Submission(s): 283Problem DescriptionThis time I need you to原创 2016-06-08 21:19:25 · 880 阅读 · 0 评论 -
hdu 2197 本原串(递推,快速幂取模)
本原串Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1135 Accepted Submission(s): 364Problem Description由0和1组成的串中,不能表示为由几个相同的较小原创 2016-06-09 10:56:48 · 731 阅读 · 0 评论 -
hdu 2866 Special Prime(数论,推公式)
Special PrimeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 390 Accepted Submission(s): 200Problem DescriptionGive you a pri原创 2016-06-09 16:02:02 · 847 阅读 · 2 评论 -
hdu 2104 hide handkerchief(判断互素)
hide handkerchiefTime Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3986 Accepted Submission(s): 1895Problem DescriptionThe Chi原创 2016-06-09 16:08:31 · 795 阅读 · 0 评论 -
hdu 5019 Revenge of GCD(数论,枚举)
Revenge of GCDTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2130 Accepted Submission(s): 592Problem DescriptionIn mathemati原创 2016-06-10 01:18:12 · 752 阅读 · 0 评论 -
hdu 3092 Least common multiple(完全背包+数论)
Least common multipleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 437 Accepted Submission(s): 162Problem DescriptionPartyc原创 2016-06-10 11:25:13 · 1620 阅读 · 1 评论 -
hdu 2674 N!Again(数论,水题)
N!AgainTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4739 Accepted Submission(s): 2500Problem DescriptionWhereIsHeroFrom:原创 2016-06-10 11:48:11 · 439 阅读 · 0 评论 -
hdu 2620 Ice Rain(数论)
Ice RainTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 181 Accepted Submission(s): 76Problem DescriptionIce Rain------I was原创 2016-06-10 17:37:07 · 821 阅读 · 0 评论 -
hdu 2619 Love you Ten thousand years(数论,待解决)
Love you Ten thousand yearsTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 92 Accepted Submission(s): 34Problem DescriptionLo原创 2016-06-10 20:10:41 · 707 阅读 · 1 评论 -
hdu 3524 Perfect Squares(找规律,循环节,快速幂取模)
Perfect SquaresTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 546 Accepted Submission(s): 293Problem DescriptionA number x i原创 2016-06-10 23:42:43 · 761 阅读 · 1 评论 -
hdu 2136 Largest prime factor(素数筛选)
Largest prime factorTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10043 Accepted Submission(s): 3552Problem DescriptionEver原创 2016-06-06 10:40:16 · 315 阅读 · 0 评论 -
hdu 1492The number of divisors(约数) about Humble Numbers(因子个数)
The number of divisors(约数) about Humble NumbersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3344 Accepted Submission(s): 1638P原创 2016-06-06 11:05:39 · 437 阅读 · 0 评论 -
hdu 1215 七夕节(因子和)
七夕节Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 40232 Accepted Submission(s): 12657Problem Description七夕节那天,月老来到数字王国,他在城门上原创 2016-06-06 11:50:20 · 408 阅读 · 0 评论 -
hdu 5407 CRB and Candies(数论,LCM,快速幂取模,求逆元)
CRB and CandiesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 947 Accepted Submission(s): 442Problem DescriptionCRB has N di原创 2016-06-13 19:38:46 · 585 阅读 · 0 评论 -
hdu 5104 Primes Problem(素数判定)
Primes ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2838 Accepted Submission(s): 1275Problem DescriptionGiven a num原创 2016-07-11 10:22:44 · 581 阅读 · 0 评论 -
求C(n,m)%mod
long long pow_mod(int a,int n){ long long ans=1; while(n) { if(n&1) ans=ans*a%mod; a=a*a%mod; n>>=1; } return ans;}long long C(int k,int n){ long lo原创 2016-07-11 15:38:54 · 1246 阅读 · 0 评论