摘要:
题目链接 1.智力测试 算法(暴力枚举) \(O(n)\) 枚举即可,直到大于所给值就退出,并且减一即为答案。 C++ 代码 #include<iostream> #include<vector> #include<queue> #include<stack> #include<algorithm> 阅读全文
题目链接 1.智力测试 算法(暴力枚举) \(O(n)\) 枚举即可,直到大于所给值就退出,并且减一即为答案。 C++ 代码 #include<iostream> #include<vector> #include<queue> #include<stack> #include<algorithm> 阅读全文
posted @ 2022-05-21 23:58
knowei
阅读(31)
评论(0)
推荐(0)
摘要:
a.位运算 1.快速幂 ll qmi(int m, int k, int p) { ll res = 1 % p, t = m; while (k) { if (k&1) res = res * t % p; t = t * t % p; k >>= 1; } return res; } b.前缀和 阅读全文
a.位运算 1.快速幂 ll qmi(int m, int k, int p) { ll res = 1 % p, t = m; while (k) { if (k&1) res = res * t % p; t = t * t % p; k >>= 1; } return res; } b.前缀和 阅读全文
posted @ 2022-05-21 14:57
knowei
阅读(45)
评论(0)
推荐(0)

浙公网安备 33010602011771号