数论
我好想逃
这个作者很懒,什么都没留下…
展开
-
HDU - 4349 Xiao Ming's Hope(卢卡斯定理)
Problem Description Xiao Ming likes counting numbers very much, especially he is fond of counting odd numbers. Maybe he thinks it is the best way to show he is alone without a girl friend. Th...原创 2018-11-05 18:30:51 · 422 阅读 · 0 评论 -
HDU 1852 Beijing 2008(快速幂+取模)
Problem Description As we all know, the next Olympic Games will be held in Beijing in 2008. So the year 2008 seems a little special somehow. You are looking forward to it, too, aren't you? Un...原创 2018-11-16 12:20:49 · 207 阅读 · 0 评论 -
CF892C (gcd++)
You have an array a with length n, you can perform operations. Each operation is like this: choose two adjacent elements from a, say xand y, and replace one of them with gcd(x, y), where gcd denotes ...原创 2018-11-27 13:05:36 · 824 阅读 · 0 评论 -
反素数学习~Codeforces 27E (模板题)
先上一篇大佬的文章学习一下反素数的概念 https://www.cnblogs.com/liuweimingcprogram/p/5877411.html Given the number n, find the smallest positive integer which has exactly n divisors. It is guaranteed that for the...原创 2018-11-27 22:12:15 · 297 阅读 · 0 评论 -
算法训练 Hankson的趣味题
问题描述 Hanks 博士是BT (Bio-Tech,生物技术) 领域的知名专家,他的儿子名叫Hankson。现 在,刚刚放学回家的Hankson 正在思考一个有趣的问题。 今天在课堂上,老师讲解了如何求两个正整数c1 和c2 的最大公约数和最小公倍数。现 在Hankson 认为自己已经熟练地掌握了这些知识,他开始思考一个“求公约数”和“求公 倍数”之类问题的“逆问题”,这个问题是这样的:...原创 2019-02-22 11:40:10 · 392 阅读 · 0 评论