摘要:P8597 [蓝桥杯 2013 省 B] 翻硬币 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 #define ios_base \ 5 ios::s
阅读全文
摘要:已知有原数组a,现欲建立差分数组b 建立差分数组的两种方式: (i)根据原数组建立。b[i] = a[i] - a[i-1] (ii)在空数组上白手起家: 1 #include<iostream> 2 using namespace std; 3 #define ios_base \ 4 ios::
阅读全文
摘要:k倍区间 - 蓝桥云课 (lanqiao.cn) 1 #include<iostream> 2 using namespace std; 3 #define ios_base \ 4 ios::sync_with_stdio(false);\ 5 cin.tie(nullptr);\ 6 cout.
阅读全文
摘要:99. 激光炸弹 - AcWing题库 1 // 二维前缀和 2 #include <iostream> 3 #include <cmath> 4 using namespace std; 5 const int N = 5e3 + 10; 6 int n, a[N][N], r, SUM = 0;
阅读全文
摘要:

796. 子矩阵的和 - AcWing题库 //二维前缀和 #include <iostream> using namespace std; int n,m,q,tmp; int a[1010][1010]; int main() { cin>>n>>m>>q; for (int i = 1; i
阅读全文
摘要:#include<iostream> #include<queue> #include<utility>//pair容器的头文件 #include<cstring>//memset using namespace std; const int N = 1e2+7; int n,m; int g[N]
阅读全文
摘要:https://pintia.cn/problem-sets/994805046380707840/exam/problems/994805117167976448 #include<iostream> using namespace std; const int MAX = 1e6+5; int
阅读全文