摘要: 欧拉回路裸题了啦啦。2#include3#include4#include5#include6usingnamespacestd;7constintMAX=1e3+10;8intdeg[MAX];9structedge10{11intfrom,to;12};13vectorans[MAX];14intvis[MAX];15intG[MAX][MAX];16voiddfs(intu,intn)17{18vis[u]=1;19for(inti=1;i<=n;i++)if(!vis[i]&&G[u][i])20dfs(i,n);21}22intmain()23{24intn,m 阅读全文
posted @ 2014-04-03 22:54 acvc 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Ant TripProblem DescriptionAnt Country consist of N towns.There are M roads connecting the towns.Ant Tony,together with his friends,wants to go through every part of the country.They intend to visit every road , and every road must be visited for exact one time.However,it may be a mission impossible 阅读全文
posted @ 2014-04-03 21:23 acvc 阅读(203) 评论(0) 推荐(0) 编辑