uva10410专题

用bfs和dfs建树--uva10410 Tree reconstruction

将bfs作为点的顺序。 #include <iostream> #include <vector> #include <cstdio> using namespace std; const int maxn = 1000 + 5; int pos[maxn],dfs[maxn]; vector<int> mp[maxn];