1004 Counting Leaves (30 point(s))

题解 求出每一层有多少个叶子结点,普通的dfs。 #include<iostream> #include<cstdio> #include<vector> #include<algorithm> using namespace std; const int MAXN = 110; int level[MAXN]; int maxdepth = -1; vector<vector<int>> t;
相关文章
相关标签/搜索