摘要:
一般ACM或者笔试题的时间限制是1秒或2秒。 在这种情况下,C++代码中的操作次数控制在 为最佳。 下面给出在不同数据范围下,代码的时间复杂度和算法该如何选择: , 指数级别, +剪枝,状态压缩 => ,$floy 阅读全文
摘要:
贝祖数 公式: 求x,y 贝祖定理 例: 有整数解 因为 2 和 1 的最大公约数是 1 而3是1的整数倍 无整数解 因为 4 和 2 的最大公约数是 2 而5不是2的整数倍 贝祖数 例:$104x+4 阅读全文
摘要:
最大公约数 1.图解:求40与104的最大公约数 2.例: $ 104 \div 40 = 2 \cdot\cdot\cdot\cdot\cdot\cdot 24 \ 40 \div 24 = 1 \cdot\cdot\cdot\cdot\cdot\cdot 1 阅读全文
摘要:
唯一分解定理 莫比乌斯函数的定义 $$ \mu (n) = \left{ \begin{aligned} & 1 & & n = 1\ & 0 阅读全文
摘要:
1.希腊字母 | 字母 | 实现 | | | | | | \alpha | | | \beta | | | \gamma | | | \delta | | | \epsilon | | $\varepsilo 阅读全文
摘要:
如果n能被i整除i就是约数 #include <bits/stdc++.h> using namespace std; vector<int> get_divisors(int n) { vector<int> res; for (int i = 1; i <= n / i; i ++ ) { if 阅读全文
摘要:
是求(a^b) mod p 如果用暴力解法 O(b) 点击查看TLE代码c++ #include<iostream> using namespace std; int main() { int a,b,p; long long res=1; cin>>a>>b>>p; while(b--) res 阅读全文
摘要:
这就是我-->这就是我-->这就是我-->这就是我--> AC:Accemble,粗劣的答案。 PC:Personal Correct 个人的答案。 WA:Wonderful Answer 优秀的答案。 RE:Compile Exactness 运行正确。 TLE:Time Limit Enrich 阅读全文