合集-图and二叉树

摘要:#include <iostream>#include <queue>using namespace std;typedef struct Bnode { int data; struct Bnode *lchild,*rchild;}Bnode,*Btree; void preorder(Btre 阅读全文
posted @ 2023-01-31 16:42 一纸书歌 阅读(19) 评论(0) 推荐(0)
摘要:1 #include <vector>//动态数组 2 #include <iostream> 3 using namespace std; 4 vector <int> vec;//定义 5 int main(){ 6 int n; 7 cin>>n; 8 for(int i=1;i<=n;i++ 阅读全文
posted @ 2023-02-01 15:20 一纸书歌 阅读(26) 评论(0) 推荐(0)
摘要:1 #include <bits/stdc++.h>//创建无向图的连接矩阵 2 using namespace std; 3 const int maxn=10005;//节点数最大值 4 //const int inf=0x3f3f3f3f;//无穷大 (如果是网 ) 5 int E[maxn] 阅读全文
posted @ 2023-02-01 16:08 一纸书歌 阅读(41) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <queue> 3 using namespace std; 4 typedef struct Bnode { 5 int data; 6 struct Bnode *lchild,*rchild; 7 }Bnode,*Btree; 阅读全文
posted @ 2023-02-01 15:26 一纸书歌 阅读(32) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/qq_41687938/article/details/119257046 1 #include <bits/stdc++.h> 2 #include <queue> 3 using namespace std; 4 int n; 5 int x; 6 i 阅读全文
posted @ 2023-07-08 11:22 一纸书歌 阅读(15) 评论(0) 推荐(0)