摘要:
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)
摘要:
Problem Description Given a prime P, 2 #include#include#include#include#include#include#include#include#include#include#include... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(25)
评论(0)
推荐(0)
摘要:
这两天主要把之前的数论模版整理了一下,把没看的 BSGS 与扩展 BSGS 补上了,并且看了看之前没接触过的不定方程组,主要看了看毕达哥拉斯三元组与佩尔方程原理,明后天把这些模版整理一下 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(10)
评论(0)
推荐(0)
摘要:
【概述】 BSGS(Baby Step Giant Step)算法,又称大小步算法,其主要用于解形如 的高次同余方程中的 x,其核心思想是分块。 当 A 与 C 互质时,通过费马小定理: 可知,当 时,会出现一个循环节,于是就能保证答案 x 若存在,必然有... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(73)
评论(0)
推荐(0)
摘要:
Problem Description Computer generated and assisted proofs and verification occupy a small niche in the realm of Computer Scien... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(32)
评论(0)
推荐(0)

浙公网安备 33010602011771号