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)
相關文章
相關標籤/搜索