上一页 1 ··· 8 9 10 11 12
摘要: 题目链接:区间更新 代码 #include<iostream> using namespace std; const int N = 1e5 + 5; int a[N], b[N]; int main() { int n, m; while (cin >> n >> m) { for (int i 阅读全文
posted @ 2024-05-31 23:35 韩熙隐ario 阅读(24) 评论(0) 推荐(0)
摘要: 题目链接:统计子矩阵 代码 #include<iostream> using namespace std; const int N = 505; int num[N][N]; int main() { int n, m, k; cin >> n >> m >> k; int count = 0; f 阅读全文
posted @ 2024-05-31 21:09 韩熙隐ario 阅读(26) 评论(0) 推荐(0)
摘要: 今天学到一个求质数简单易懂的算法,效率也很高的求职质数算法,开一个数组,从前往后遍历,如果没有被标记证明是质数,没错找到一个质数就被该质数的倍数标记排除,最后得到的数组就是质数了,代码如下 #include <iostream> #include <cmath> #include <vector> 阅读全文
posted @ 2024-05-05 00:00 韩熙隐ario 阅读(27) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12