PAT - L2 - 011 玩转二叉树(分治)

  思路:将整棵树划分成 n 个子树 坑点:maxn 最小取 49 (我也不知道为啥,题目明明是 n<30)   代码如下: #include<bits/stdc++.h> using namespace std; const int maxn = 50; // 试了几次,发现最小取 49,可以过 int a[maxn],b[maxn]; struct node{ int l,r; }tree
相关文章
相关标签/搜索