随笔分类 -  数学

摘要:4517: [Sdoi2016]排列计数 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4517 Description 求有多少种长度为 n 的序列 A,满足以下条件: 1 ~ n 这 n 个数在序列中各出现了一次 若第 i 个数 A[ 阅读全文
posted @ 2016-04-27 19:07 qscqesze 阅读(469) 评论(0) 推荐(0)
摘要:C. Digital Root 题目连接: http://www.codeforces.com/contest/10/problem/C Description Not long ago Billy came across such a problem, where there were given 阅读全文
posted @ 2016-04-27 15:31 qscqesze 阅读(463) 评论(0) 推荐(0)
摘要:C. Little Artem and Random Variable 题目连接: http://www.codeforces.com/contest/668/problem/C Description Little Artyom decided to study probability theor 阅读全文
posted @ 2016-04-26 21:13 qscqesze 阅读(369) 评论(0) 推荐(0)
摘要:Robot 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5673 Description There is a robot on the origin point of an axis.Every second, the robot can mov 阅读全文
posted @ 2016-04-24 15:59 qscqesze 阅读(588) 评论(0) 推荐(1)
摘要:F. Four Divisors 题目连接: http://www.codeforces.com/contest/665/problem/F Description If an integer a is divisible by another integer b, then b is called 阅读全文
posted @ 2016-04-22 22:53 qscqesze 阅读(1027) 评论(0) 推荐(1)
摘要:1035 最长的循环节 题目连接: https://www.51nod.com/onlineJudge/questionCode.html !problemId=1035 Description 正整数k的倒数1/k,写为10进制的小数如果为无限循环小数,则存在一个循环节,求 using names 阅读全文
posted @ 2016-04-19 22:24 qscqesze 阅读(693) 评论(0) 推荐(1)
摘要:模板如下: 扩展版本: 求解a^k=b %p 求k,最小的k一定小于p,否则会重复,否则无解 gcd(a,p)=1时 设k=mi+v m=sqrt(p); i,v include include define MOD 76543 using namespace std; int hs[MOD], h 阅读全文
posted @ 2016-04-19 21:26 qscqesze 阅读(538) 评论(0) 推荐(0)
摘要:1040 最大公约数之和 题目连接: https://www.51nod.com/onlineJudge/questionCode.html !problemId=1040 Description 给出一个n,求1 n这n个数,同n的最大公约数的和。比如:n = 6 1,2,3,4,5,6 同6的最 阅读全文
posted @ 2016-04-18 22:43 qscqesze 阅读(379) 评论(0) 推荐(0)
摘要:1179 最大的最大公约数 题目连接: https://www.51nod.com/onlineJudge/questionCode.html !problemId=1179 Description 给出N个正整数,找出N个数两两之间最大公约数的最大值。例如:N = 4,4个数为:9 15 25 1 阅读全文
posted @ 2016-04-18 22:23 qscqesze 阅读(421) 评论(0) 推荐(0)
摘要:2818: Gcd 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=2818 Description 给定整数N,求1 using namespace std; const int maxn = 1e7+5; long long phi[m 阅读全文
posted @ 2016-04-18 11:12 qscqesze 阅读(403) 评论(0) 推荐(0)
摘要:2976: [Poi2002]出圈游戏 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=2976 Description Input 中第一行有一个正整数n, 2 include include include using namespac 阅读全文
posted @ 2016-04-16 23:46 qscqesze 阅读(447) 评论(0) 推荐(0)
摘要:4423: Necklace 题目连接: http://acm.scu.edu.cn/soj/problem.action?id=4423 Description baihacker bought a necklace for his wife on their wedding anniversar 阅读全文
posted @ 2016-04-16 17:15 qscqesze 阅读(291) 评论(0) 推荐(0)
摘要:Hash Perfectly 题目连接: http://acm.uestc.edu.cn/ /problem/show/1314 Description In computing, a hash table is a data structure used to implement an assoc 阅读全文
posted @ 2016-04-11 20:32 qscqesze 阅读(495) 评论(0) 推荐(0)
摘要:3 idiots 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=4609 Description King OMeGa catched three men who had been streaking in the street. Looking a 阅读全文
posted @ 2016-04-11 19:59 qscqesze 阅读(328) 评论(0) 推荐(0)
摘要:A B Problem Plus 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=1402 Description Calculate A \ B. Input Each line will contain two integers A and B. 阅读全文
posted @ 2016-04-11 19:13 qscqesze 阅读(359) 评论(0) 推荐(0)
摘要:FFT,这份代码在51nod跑的非常快,赶紧扒下来! //FFT 大整数乘法 include include include include using namespace std; const int N = 500005; const double pi = acos( 1.0); char s 阅读全文
posted @ 2016-04-11 19:02 qscqesze 阅读(649) 评论(2) 推荐(2)
摘要:Balls Rearrangement 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=4611 Description Bob has N balls and A boxes. He numbers the balls from 0 to N 1, 阅读全文
posted @ 2016-04-10 10:56 qscqesze 阅读(269) 评论(0) 推荐(0)
摘要:C. Line 题目连接: http://www.codeforces.com/contest/7/problem/C Description A line on the plane is described by an equation Ax + By + C = 0. You are to fi 阅读全文
posted @ 2016-04-07 18:52 qscqesze 阅读(502) 评论(0) 推荐(0)
摘要:1225 余数之和 题目连接: http://www.51nod.com/onlineJudge/questionCode.html !problemId=1225 Description F(n) = (n % 1) + (n % 2) + (n % 3) + ...... (n % n)。其中% 阅读全文
posted @ 2016-04-04 14:30 qscqesze 阅读(546) 评论(0) 推荐(1)
摘要:E. Bear and Contribution 题目连接: http://www.codeforces.com/contest/658/problem/E Description Codeforces is a wonderful platform and one its feature show 阅读全文
posted @ 2016-03-29 10:48 qscqesze 阅读(412) 评论(3) 推荐(0)