-------------------------数学
文章平均质量分 81
hxer
这个作者很懒,什么都没留下…
展开
-
hdu5548
2015ACM/ICPC亚洲区上海站LCM WALK题意:定义了一种走法,就是从当前的点为sx,sy,可以走到ex,ey;并且ex = sx + z,或者 ey = sy + z,其中z为lcm(sx,sy);如果是顺着给你sx,sy,那很好得到之后的两个可能走到的点,但是题目并没有这么给出;而是给了终点;这就需要从可约及前后变化形式的角度来逆推回去了;一般的数论都需要用到__原创 2015-12-21 00:31:55 · 793 阅读 · 0 评论 -
codeforces 615D - Multipliers
———-[615D - Multipliers ](http://codeforces.com/problemset/problem/615/D)题意:给定一个2e5范围内的整数m,之后输入m个2e5内的素数(当然可以重复了),问把这些输入的素数全部乘起来所得的数的约数的乘积mod(1e9+7)等于多少?思路:对题目样例模拟之后很容易就知道,对于每个素数pi出现的次数m就有pi^(m+1)*m/原创 2016-01-19 17:56:02 · 509 阅读 · 0 评论 -
Codeforces 612E - Square Root of Permutation
E. Square Root of PermutationA permutation of length n is an array containing each integer from 1 to n exactly once. For example, q = [4, 5, 1, 2, 3] is a permutation. For the permutation q the square原创 2016-01-21 17:07:23 · 517 阅读 · 0 评论 -
Codeforces 616E - Sum of Remainders
616E Sum of Remainders题目:Calculate the value of the sum: n mod 1 + n mod 2 + n mod 3 + … + n mod m. As the result can be very large, you should print the value modulo 109 + 7 (the remainder when divide原创 2016-01-21 10:47:31 · 624 阅读 · 0 评论