数论
文章平均质量分 82
say_c_box
小白不能不努力~
展开
-
ZOJ3609——数论基础 扩展欧几里得求解乘法逆元
原题如下:DescriptionThe modular modular multiplicative inverse of an integer a modulo m is an integer x such that a-1≡x (mod m). This is equivalent toax≡1 (mod m).InputThere are原创 2016-03-24 13:11:45 · 504 阅读 · 0 评论 -
HDU6044 Limited Permutation (递归,预处理阶乘逆元)
Limited PermutationTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 680 Accepted Submission(s): 130Problem DescriptionAs to原创 2017-07-26 15:03:50 · 1355 阅读 · 2 评论 -
POJ2369————Permutations(置换群,数论)
PermutationsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3094 Accepted: 1670DescriptionWe remind that the permutation of some final set is a one-to原创 2017-03-03 17:20:52 · 384 阅读 · 0 评论 -
codeforces725D————Taxes(哥德巴赫猜想)
Taxestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMr. Funt now lives in a country with a very specific原创 2016-11-30 18:25:10 · 322 阅读 · 0 评论 -
HDU5833(2016CCPC网赛)——Zhu and 772002(异或方程组,素数分解)
Zhu and 772002Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 510 Accepted Submission(s): 170Problem DescriptionZhu and 77200原创 2016-08-15 10:21:51 · 868 阅读 · 0 评论 -
HDU5812(2016多校第七场)——Distance(数论,枚举)
DistanceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 304 Accepted Submission(s): 111Problem DescriptionIn number theory,原创 2016-08-10 14:26:09 · 658 阅读 · 0 评论 -
HDU3037——Saving Beans(数论,组合数取模,lucas定理模板)
题目如下:Saving BeansTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4084 Accepted Submission(s): 1581Problem DescriptionAl原创 2016-07-20 22:27:01 · 1172 阅读 · 0 评论 -
POJ2480——Longge's problem(数论,欧拉函数d)
题目:Longge's problemTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8050 Accepted: 2666DescriptionLongge is good at mathematics and he likes to t原创 2016-07-20 22:21:05 · 869 阅读 · 0 评论 -
HDU1796(数论,容斥原理)
也是容斥原理的应用,这篇博客用了DFS,比较明晰。原文地址:http://www.cnblogs.com/jackge/archive/2013/04/03/2997169.htmllHow many integers can you findTime Limit: 12000/5000 MS (Java/Others) Memory Limit: 65536/32768转载 2016-07-20 12:02:40 · 349 阅读 · 0 评论 -
HDU4135——Co-prime(数论,容斥原理)
题目:Co-primeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3490 Accepted Submission(s): 1379Problem DescriptionGiven a原创 2016-07-20 10:41:26 · 607 阅读 · 0 评论 -
POJ268————Prime Distance(数论,素数筛)
题目:Prime DistanceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16193 Accepted: 4301DescriptionThe branch of mathematics called number theory i原创 2016-07-19 14:49:35 · 1401 阅读 · 0 评论 -
组合数取模,预处理阶乘逆元模板
LL inv[MAXN]; LL fac[MAXN]; LL get_inv(LL n){ if(n==1) return 1; return get_inv(mod%n)*(mod-mod/n)%mod; } LL Com(LL n,LL m){ return fac[n]*inv[m]%mod*inv[n-m]%mod; }原创 2017-07-26 12:28:40 · 1188 阅读 · 0 评论