![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
gcd && lcm && exgcd && CRT
文章平均质量分 82
笑着走完自己的路
这个作者很懒,什么都没留下…
展开
-
poj 1061 青蛙的约会 【扩展欧几里得】
青蛙的约会Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 99341 Accepted: 18926Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面原创 2015-10-17 23:22:13 · 594 阅读 · 1 评论 -
hdoj 5446 Unknown Treasure 【lucas + CRT】
Unknown TreasureTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1820 Accepted Submission(s): 671Problem DescriptionOn the w原创 2015-10-27 21:55:28 · 485 阅读 · 0 评论 -
hdoj 2669 Romantic 【扩展欧几里得 求解最小非负解】
RomanticTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3974 Accepted Submission(s): 1645Problem DescriptionThe Sky is Sprite原创 2015-10-28 21:35:10 · 648 阅读 · 0 评论 -
hdoj 5505 GT and numbers 【判断一个数 能否通过累乘因子得到另一个数】【好题】
GT and numbersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 71 Accepted Submission(s): 18Problem DescriptionYou are given t原创 2015-10-17 23:33:50 · 714 阅读 · 0 评论 -
hdoj 5512 Pagodas 【gcd 思维】
PagodasTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 24 Accepted Submission(s): 22Problem Descriptionn pagodas were stand原创 2015-10-31 18:27:44 · 522 阅读 · 0 评论 -
hdoj 5607 graph 【矩阵快速幂】
graphTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 103 Accepted Submission(s): 53Problem DescriptionIn a directed graph whi原创 2016-01-02 22:08:47 · 625 阅读 · 0 评论 -
bzoj 2705: [SDOI2012]Longge的问题 【欧拉函数求GCD】
题目链接:bzoj 2705: [SDOI2012]Longge的问题原创 2016-03-15 19:37:04 · 470 阅读 · 0 评论 -
zzuoj 10402: C.机器人 【数论 exgcd】
10402: C.机器人Time Limit: 2 Sec Memory Limit: 128 MBSubmit: 56 Solved: 21[Submit][Status][Web Board]DescriptionDr. Kong 设计的机器人卡尔非常活泼,既能原地蹦,又能跳远。由于受软硬件设计所限,机器人卡尔只能定点跳远。若机器人站在(X,Y)位置,它可以原地原创 2016-03-04 17:21:41 · 614 阅读 · 0 评论 -
Codeforces 583C GCD Table 【gcd + 构造】
题目链接:Codeforces 583C GCD TableC. GCD Table time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output The GCD table G of size n × n for an array原创 2016-04-27 13:58:12 · 591 阅读 · 0 评论 -
hdoj 1576 A/B 【扩展欧几里得 求乘法逆元】
A/BTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3346 Accepted Submission(s): 2540Problem Description要求(A/B)%9973,但由于A很大,我们原创 2015-10-26 18:24:46 · 657 阅读 · 0 评论 -
poj 2115 C Looooops 【扩展欧几里得】
C LooooopsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20702 Accepted: 5596DescriptionA Compiler Mystery: We are given a C-language style for loop原创 2015-10-25 15:46:23 · 1538 阅读 · 0 评论 -
lightoj 1319 - Monkey Tradition 【CRT】
1319 - Monkey TraditionPDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBIn 'MonkeyLand', there is a traditional game called "Bamboo原创 2015-11-08 12:36:45 · 736 阅读 · 0 评论 -
扩展欧几里得 【记录】
原始的欧几里得算法只能求解gcd(a, b),有两种写法迭代写法:LL gcd(LL a, LL b){ LL t; while(b) { t = b; b = a%b; a = t; } return a;}递归写法:LL gcd(LL a, LL b){ return b ==原创 2015-10-17 18:42:37 · 498 阅读 · 0 评论 -
poj 2891 Strange Way to Express Integers 【CRT】
Strange Way to Express IntegersTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 11750 Accepted: 3661DescriptionElina is reading a book written by Ru原创 2015-10-18 14:40:06 · 684 阅读 · 0 评论 -
hdoj 1573 X问题 【CRT】【求解方程组在 N内正整数解的个数】
X问题Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4405 Accepted Submission(s): 1420Problem Description求在小于等于N的正整数中有多少个X满足:X原创 2015-10-18 15:42:12 · 550 阅读 · 0 评论 -
poj 1006 && hdoj 1370 Biorhythms 【CRT】
BiorhythmsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 122912 Accepted: 38772DescriptionSome people believe that there are three cycles in a person's原创 2015-10-18 14:49:48 · 468 阅读 · 0 评论 -
hdoj 4767 Bell 【矩阵快速幂 + CRT】
BellTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 666 Accepted Submission(s): 286Problem DescriptionWhat? MMM is learning C原创 2015-10-18 22:40:14 · 493 阅读 · 0 评论 -
中国剩余定理 【CRT】 【记录】
问题一:给你n个方程组:x%m[0] = a[0]x%m[1] = a[1]···x%m[n-1] = a[n-1]求变量x 的值,其中m[]必须两两互质。直接exgcd可以KOLL gcd(LL a, LL b){ return b == 0 ? a : gcd(b, a%b);}void exgcd(LL a, LL b, LL &d, LL原创 2015-10-18 14:34:32 · 1069 阅读 · 0 评论 -
hdoj 3579 Hello Kiki 【CRT】
Hello KikiTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2706 Accepted Submission(s): 1000Problem DescriptionOne day I was s原创 2015-10-18 22:39:56 · 541 阅读 · 0 评论 -
Codeforces 592C The Big Race 【GCD && LCM】
C. The Big Racetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVector Willman and Array Bolt are the two mo原创 2015-11-01 21:12:46 · 1104 阅读 · 0 评论