合集-图and二叉树
摘要:#include <iostream>#include <queue>using namespace std;typedef struct Bnode { int data; struct Bnode *lchild,*rchild;}Bnode,*Btree; void preorder(Btre
阅读全文
摘要: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++
阅读全文
摘要:1 #include <bits/stdc++.h>//创建无向图的连接矩阵 2 using namespace std; 3 const int maxn=10005;//节点数最大值 4 //const int inf=0x3f3f3f3f;//无穷大 (如果是网 ) 5 int E[maxn]
阅读全文
摘要: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;
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号