果敢野老
果敢野老
全部文章
分类
归档
标签
去牛客网
登录
/
注册
果敢野老的博客
全部文章
(共9篇)
迪杰斯特拉算法+邻接举证解决单源最短路径问题
#include <climits> #include <cstdio> #include <iostream> using namespace std; #define maxs 5001 int main() { // 定义 顶点数 边数 邻接矩阵 ...
2023-04-15
1
309
库鲁斯卡尔算法+并查集解决最小生成树问题
#include<algorithm> typedef struct Line { int x, y, z; } Line; // 顶点并查集 #define maxs 5000+5 #define maxl 500000+5 int g[maxs...
2023-04-15
0
458
题解 用邻接表处理拓扑排序
#include <stdio.h> #include <stdlib.h> #define MAXS 2*100000+10 // 用邻接表是比较好的选择 typedef struct LinkTable{ int data; struct LinkTable...
2023-04-14
0
245
题解 | #岛屿数量#
#include <queue> #include <vector> struct point { int x; int y; }; class Solution { public: /** * 判断岛屿数量 * @param ...
2023-03-18
1
508
题解 | #N皇后问题#
#include <algorithm> #include <unordered_set> #include <vector> class Solution { public: /** * * @param n int整型 the ...
2023-03-18
0
289
题解 | #走迷宫#
#include <iostream> #include <queue> #include <utility> #include <vector> using namespace std; typedef pair<int,int> pn...
2023-03-15
0
291
题解 | #【模板】堆#
#include <iostream> #include <vector> #include <cstring> using namespace std; // 交换 void swap(vector<int> &arr,int a,int b){ ...
2023-03-14
0
248
题解 | #【模板】堆#
#include <iostream>#include <vector>#include <cstring>using namespace std;// 交换void swap(vector<int> &arr,int a,int b){ int...
2023-03-14
0
312
题解 | #【模板】拓扑排序#
#include <cstddef> #include <iostream> #include <queue> #include <vector> using namespace std; #define Max 200005 struct arcN...
2023-02-23
0
290