cf1006 E. Military Problem

像这种要求节点有序化,把邻接表的vector换成set就好啦。虽然这道题按照默认顺序造邻接表就能够有序了html #include<bits/stdc++.h> using namespace std; int size[200010]; int a[200010]; int vis[200010]; int tot; set<int> G[200010]; void dfs(int node)
相关文章
相关标签/搜索