摘要: 题目连接 https://www.luogu.com.cn/problem/P3156 方法一: 数组写法 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n, m, q; 4 int a[2000005]; 5 int main() 6 阅读全文
posted @ 2020-08-12 22:38 TFLSNOI 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 题目链接https://www.luogu.com.cn/problem/P4715 根据满二叉树的性质: 1.满二叉树外观上是一个三角形2.一个层数为k 的满二叉树总结点数为:2^k-1 (因此满二叉树的结点树一定是奇数个)3.第i层上的结点数为:2^(k-1)4.一个层数为k的满二叉树的叶子结点 阅读全文
posted @ 2020-08-12 21:07 TFLSNOI 阅读(318) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P4913 #include<bits/stdc++.h> using namespace std; struct node{ int l, r; }; node a[1000005]; int n, ans=-1; void dfs 阅读全文
posted @ 2020-08-12 17:31 TFLSNOI 阅读(207) 评论(0) 推荐(0) 编辑