math
superkunn
这个作者很懒,什么都没留下…
展开
-
sgu 118 Digital Root 数学规律
118. Digital Roottime limit per test: 0.25 sec. memory limit per test: 4096 KBLet f(n) be a sum of digits for positive integer n. If f(n) is one-digit number then it is a digital root for n and otherw...原创 2018-05-16 19:07:35 · 234 阅读 · 0 评论 -
codeforces 1043 F. Make It One 数学?随机?
https://codeforces.com/contest/1043/problem/F 没搜到中文题解,看了一下官方题解,翻译解释一发。 题意,从n个数中选最少个数的数使得取出的数gcd为1。数据范围是n最大3e5,每个数最大3e5. 思路:我们很容易观察出,如果存在可行答案,那么取出数量不超过7,因为最小的7个质数相乘都大于3e5了。 然后定义dp[ i ][ j ] 的意义为,取出...原创 2018-10-30 14:16:37 · 459 阅读 · 0 评论