
数论——中国剩余定理
Alex_McAvoy
想要成为渔夫的猎手
展开
-
数论 —— 线性同余方程组与中国剩余定理
【线性同余方程组】由若干个线性同余方程构成的线性方程组。例如:其解法最早由我国《孙子算经》给出,因此解法称为“孙子定理”,又叫“中国剩余定理”,实质即为求多个数的最小公倍数。【中国剩余定理】1.内容设自然数两两互质,并记,则同余方程组:在模 N 同余的意义下,有唯一解:。2.证明考虑方程组:,由于两两互质,对方程组作变量替换,即令故方程组等...原创 2019-09-07 15:36:28 · 1372 阅读 · 0 评论 -
Biorhythms(POJ-1006)
Problem Description人生来就有三个生理周期,分别为体力、感情和智力周期,它们的周期长度为23天、28天和33天。每一个周期中有一天是高峰。在高峰这天,人会在相应的方面表现出色。例如,智力周期的高峰,人会思维敏捷,精力容易高度集中。因为三个周期的周长不同,所以通常三个周期的高峰不会落在同一天。对于每个人,我们想知道何时三个高峰落在同一天。对于每个周期,我们会给出从当前年份的第...原创 2018-07-31 20:09:12 · 482 阅读 · 0 评论 -
Monkey Tradition(LightOJ-1319)
Problem DescriptionIn 'MonkeyLand', there is a traditional game called "Bamboo Climbing". The rules of the game are as follows:1) There are N monkeys who play this game and there are N bamb...原创 2019-03-23 15:32:42 · 330 阅读 · 0 评论 -
Strange Way to Express Integers(POJ-2891)
Problem DescriptionElina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is described as following:Choose k different positive int...原创 2018-08-09 14:45:09 · 436 阅读 · 0 评论