随笔分类 - 2020全国天梯赛准备
摘要:数据结构实验之排序四:寻找大富翁 Code: 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn = 1010; 4 const int minn = -10001; 5 6 int a[25]; 7 int n,m;
阅读全文
摘要:堆中的路径 AC_Code: 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn = 1010; 4 const int minn = -10001; 5 6 int Heap[maxn]; 7 int _size;
阅读全文
摘要:二叉搜索树的操作集 总代码: 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 5 typedef int ElementType; 6 typedef struct TNode *Position; 7 typedef Position B
阅读全文
摘要:树的遍历 AC_Code: 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn = 1010+10; 5 6 int hou[maxn],zhong[maxn]; 7 i
阅读全文
摘要:这是二叉搜索树吗?(二叉搜索树性质) AC_Code: 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn = 1e3+10; 5 6 //如果是二叉搜索树(左小右大)剩
阅读全文
摘要:计算图(dfs+高数) 解题思路:反向建图,拓扑dfs AC_Code: 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn = 5e4+10; 5 6 int s[ma
阅读全文