
编程题——数论/数学
文章平均质量分 83
David_Jett
我要变得很强!2017-8-30
展开
-
HDU 1098 Ignatius's Puzzle(解法汇集)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1098题意: 求针对输入的k,能否找到一个最小的a,使得当x取任意自然数时,f(x)=5*x^13+13*x^5+k*a*x始终能被65整除。我的解法: 取f(1),f(2)两个特殊值得。 1. 5+13+k*a=65*T1 ->> k*a=47+65*T原创 2015-04-03 15:31:01 · 1090 阅读 · 0 评论 -
2015浙工大校赛-Problem C: 三角-(费马大定理)
链接:http://acm.zjut.edu.cn/onlinejudge/problem.php?cid=1101&pid=2 题面: Problem C: 三角Time Limit: 1 Sec Memory Limit: 32 MBSubmit: 375 Solved: 56[Submit][Status][Web Board]Description...原创 2015-03-30 14:37:48 · 2608 阅读 · 2 评论 -
2015浙工大校赛- Problem I: no2(概率题,贝叶斯公式)
题目链接:http://acm.zjut.edu.cn/onlinejudge/problem.php?cid=1101&pid=8题面:Problem I: no2Time Limit: 1 Sec Memory Limit: 32 MBSubmit: 342 Solved: 23[Submit][Status][Web Board]Descrip原创 2015-03-30 15:37:30 · 1704 阅读 · 0 评论 -
ZOJ 3609 Modular Inverse
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3609题面:Modular InverseTime Limit: 2 Seconds Memory Limit: 65536 KBThe modular modular multiplicative inve原创 2015-04-16 21:29:57 · 843 阅读 · 0 评论 -
BestCoder Round 38-1002 Greatest Greatest Common Divisor
题目链接:http://bestcoder.hdu.edu.cn/contests/contest_showproblem.php?cid=577&pid=1002题面:Greatest Greatest Common Divisor Accepts: 271 Submissions: 1138 Time Limit: 4000/20原创 2015-04-18 22:47:36 · 835 阅读 · 0 评论 -
HDU 5223 GCD
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5223题面:GCDTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 4 Accepted Submiss原创 2015-05-02 21:56:35 · 1063 阅读 · 0 评论 -
CPP 1192 整数的因子数
题目链接:http://cpp.zjut.edu.cn/ShowProblem.aspx?ShowID=1192题面:整数的因子数 Time Limit:2000MS Memory Limit:32768KDescription:找出整数的所有因子数。 一个整数n的因子数为包含它自身的所有因子的个数。例如:12的因子数为6(1,2,3,4,6,12)。原创 2015-05-03 23:21:22 · 1445 阅读 · 0 评论 -
HDU 4965 Fast Matrix Calculation
题目链接:Fast Matrix Calculation题面:Fast Matrix CalculationTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1078 Accepted Submiss原创 2015-06-09 22:50:52 · 1345 阅读 · 0 评论 -
【打CF,学算法——三星级】CF Gym 100548K Last Denfence
题目链接:Last Denfence题面: Last DefenceDescription Given two integers A and B. Sequence S is defined as follow: • S0 = A • S1 = B • Si = |Si−1 − Si−2| for i ≥ 2 Count the原创 2015-07-07 23:39:57 · 1265 阅读 · 0 评论 -
HDU 1796 How many integers can you find (容斥原理)
题目链接:How many integers can you find题面:How many integers can you findTime Limit: 12000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5345原创 2015-07-08 22:08:17 · 1032 阅读 · 0 评论 -
HDU 5072 Coprime (单色三角形+容斥原理)
题目链接:Coprime题面:CoprimeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1181 Accepted Submission(s): 471Problem Descripti原创 2015-07-09 13:10:08 · 1413 阅读 · 0 评论 -
HDU 5318 The Goddess Of The Moon(矩阵快速幂详解)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5318题面:The Goddess Of The MoonTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 800原创 2015-07-31 13:36:07 · 1909 阅读 · 0 评论 -
HDU 5050 Divided Land (二进制上的最大公约数)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5050题面:Divided LandTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1024 Accepted原创 2015-10-05 09:52:59 · 656 阅读 · 0 评论 -
HDU 5512 Pagodas (扩展欧几里德)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5512题面:PagodasTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 593 Accepted Submi原创 2016-07-05 18:27:31 · 1508 阅读 · 0 评论 -
UVA 10375 Choose and divide (唯一分解定理)
题面:Choose and divideThe binomial coefficient C(m; n) is defined as C(m; n) =m!/(m -n)! n! Given four natural numbers p, q, r, and s, compute the the result of dividing C(p; q) by C(r; s).Inp原创 2016-10-04 10:37:11 · 707 阅读 · 0 评论 -
ZOJ 2105 Number Sequence(矩阵快速幂)
题意:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.给定A,B,求f(n)。法一: 网上较多的题解都提到了寻找1 1循环节的方法,的确非常巧妙,每位0~6,共7种可能,相邻两位共49种可能,因此循环周期至多为49,一旦出现相同数对,那么其后必相同。但是,该方法只是简单提及了49,却并原创 2015-02-09 16:58:08 · 1428 阅读 · 2 评论