时间:2021-07-01 10:21:17 帮助过:14人阅读
#include#include #include using namespace std; int vis[5000]; vector map[5000]; int ans; void dfs(int k,int num) { vis[k]=num; //相当于给每个结点编号 for(int i=0;i
http://www.bkjia.com/PHPjc/477210.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/477210.htmlTechArticle#includecstdio#includecstring#includevectorusing namespace std;int vis[5000];vectorint map[5000];int ans;void dfs(int k,int num){ vis[k]=num; //相当于给每个结点编号 for(i...