多学习。

摘要: AcWing204.表达整数的奇怪方式 题解 模板 根据题目变形 #include <iostream> using namespace std; typedef long long LL; LL exgcd(LL a, LL b, LL &x, LL &y) { if(!b) { x = 1, y 阅读全文
posted @ 2022-06-12 12:42 czyaaa 阅读(36) 评论(0) 推荐(0)
摘要: AcWing878.线性同余方程 题解 #include <iostream> using namespace std; int exgcd(int a, int b, int &x, int &y) { if(b == 0) { x = 1, y = 0; return a; } int d = 阅读全文
posted @ 2022-06-12 10:04 czyaaa 阅读(39) 评论(0) 推荐(0)
摘要: AcWing877.扩展欧几里得算法 题解与证明 #include <iostream> using namespace std; int exgcd(int a, int b, int &x, int &y) { if(b == 0) { x = 1, y = 0; return a; } int 阅读全文
posted @ 2022-06-12 09:29 czyaaa 阅读(41) 评论(0) 推荐(0)