![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法笔记
王小树[去重]
这个作者很懒,什么都没留下…
展开
-
问题 A: 通信系统
问题 A: 通信系统 #include<cstdio> #include<algorithm> const int maxn = 10010; int father[maxn]; bool isRoot[maxn]; void Init(int n) { for (int i = 1; i <= n; i++) { father[i] = i; isRoot[i] = false; } } int getfather(int x) { int a = x; w原创 2021-04-10 16:18:03 · 96 阅读 · 0 评论 -
算法笔记》9.5小节——数据结构专题(2)->平衡二叉树(AVL)
《算法笔记》9.5小节——数据结构专题(2)->平衡二叉树(AVL) #include<cstdio> #include<math.h> #include<algorithm> using namespace std; struct node { int data,height; node* lchild; node* rchild; }; node* newNode(int v) { node* Node = new node; Node->da原创 2021-04-10 15:55:00 · 57 阅读 · 0 评论 -
[未解决]算法笔记 问题 E: 【宽搜入门】巧妙取量
自己测试都是对的,提交答案错误,目前还未解决 #include #include #include #include using namespace std; int cap3; map<int, bool> mp; int endnum; int src[6] = { 0,0,1,1,2,2 }; int tar[6] = { 1,2,0,2,0,1 }; struct node { int a; int b; int c; int step; }; void pour(int target,原创 2021-04-06 17:38:41 · 66 阅读 · 0 评论