上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 97 下一页
摘要: 【卢卡斯定理】 1.要求:p 是质数,m、n 很大但 p 很小 或者 n、m 不大但大于 p 2.定理内容 其中, 3.推论 当将 n 写成 p 进制:,将 m 写成 p 进制: 时,有: 4.实现 代码实现可简单理解为: LL fac[N];void ge... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(52) 评论(0) 推荐(0)
摘要: Problem Description Given n different objects, you want to take k of them. How many ways to can do it? For example, say there ... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(13) 评论(0) 推荐(0)
摘要: Problem Description In 'MonkeyLand', there is a traditional game called "Bamboo Climbing". The rules of the game are as follows... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(33) 评论(0) 推荐(0)
摘要: Problem Description Mob was hijacked by the mayor of the Town "TruthTown". Mayor wants Mob to count the total population of the... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(31) 评论(0) 推荐(0)
摘要: Problem Description Given an m x n chessboard where you want to place chess knights. You have to find the number of maximum kni... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(57) 评论(0) 推荐(0)
摘要: Problem Description Find the biggest integer n (1 #include#include#include#include#include#include#include#include#include#incl... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(11) 评论(0) 推荐(0)
摘要: Problem Description A computer programmer lives in a street with houses numbered consecutively (from 1) down one side of the st... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(11) 评论(0) 推荐(0)
摘要: 【概述】 连分数是一种特殊的繁分数,其形式为: ,通常记为:,其中 和 称为连分数多项式,对于任意的 a 均为一次式,它们的比值称为第 n 个渐进值渐进分数。 佩尔(Pell)方程是一种不定二次方程,其与连分数,二次型,代数论等有着重要的联系。 其形式为... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(227) 评论(0) 推荐(0)
摘要: Problem Description Little Y finds there is a very interesting formula in mathematics: X^Y mod Z = K Given X, Y, Z, we all kn... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(43) 评论(0) 推荐(0)
摘要: 【概述】 数论的研究对象是整数,例如求两个整数的最大公约数、最小公约数,求一个正整数的素数分解,求一个方程的整数解等等,在算法中,快速幂、欧几里得算法、素性判断、大整数取模等内容是经常遇到的。 【理论相关】 斐波那契数列(Fibonacci):点击这里快速幂:... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(50) 评论(0) 推荐(0)
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 97 下一页