ctrlcv战神
ctrlcv战神
全部文章
分类
归档
标签
去牛客网
登录
/
注册
ctrlcv战神的博客
TA的专栏
5篇文章
0人订阅
数据结构与算法学习分享
5篇文章
46人学习
全部文章
(共12篇)
题解 | 走迷宫
#include <iostream> #include<cstring> #include <vector> #include <queue> using namespace std; const int N=1e3+10; int a[N][N];...
2026-03-22
0
38
题解 | 全排列
来自专栏
#include<iostream> #include<cstring> #include<vector> using namespace std; int a[10]; bool f[10]; int n; void dfs(int x) { if(x&...
2026-03-21
1
46
题解 | 迷宫寻路 DFS
来自专栏
#include<iostream> #include<cstring> using namespace std; int n,m; char a[1005][1005]; bool flag=false; // 标记是否找到从(1,1)到(n,m)的...
2026-03-21
0
33
题解 | 【模板】二维前缀和
来自专栏
#include<iostream> using namespace std; const int N = 1e3 + 10; int a[N][N]; long long sum[N][N]; // 存储二维前缀和数组(用long long防止数值溢出) int ...
2026-03-20
1
37
题解 | 舞萌时间到!前缀和模板
来自专栏
#include<iostream> #include<unordered_map> using namespace std; const int N=1e6+10; long long f[N]; int main(void) { // 建立字符到数值的映射表 ...
2026-03-20
0
35
题解 | 【模板】静态区间和(前缀和)
来自专栏
#include<iostream> using namespace std; // 定义数组最大长度:1e6+10(100万+10),满足题目中n的范围需求 // 1e6是常见的大数据范围,+10是为了避免数组越界 const int N=1e6+10; // 定义全局数组a,类型为l...
2026-03-20
1
26
题解 | 【模板】完全背包
#include<iostream> #include<cstring> using namespace std; const int N=1010; int n,m; int v[N]; int w[N]; int dp[N]; int main(void) { cin&...
2026-02-24
0
52
题解 | 【模板】01背包
#include<iostream> #include<cstring> using namespace std; const int N=1e3+5; int n,m; int v[N],w[N]; int dp[N]; int main(void) { cin&g...
2026-02-24
0
60
题解 | 矩阵的最小路径和
#include<iostream> #include<cstring> using namespace std; const int N=5005; int dp[N][N]; int main(void) { memset(dp,0x3f3f3f,sizeof(d...
2026-02-20
0
40
题解 | 【模板】差分
#include <iostream> using namespace std; typedef long long LL; const LL N=1e5+10; LL s[N]; int main() { LL n; LL m; ...
2026-02-06
0
45
首页
上一页
1
2
下一页
末页