怎么样做好网站运营,阿里云域名查询,小程序制作的公司,西安做百度网站公司题意#xff1a;找一条四边的路径#xff0c;保住中间两个节点编号只能出现一次#xff08;起点#xff08;首#xff09;和终点#xff08;未#xff09;可以一样#xff09;
else{if(k3toBegin){//首未一样的情况#xff08;前提是未已经是四边的最后一点…题意找一条四边的路径保住中间两个节点编号只能出现一次起点首和终点未可以一样
else{if(k3toBegin){//首未一样的情况前提是未已经是四边的最后一点了 dfs(to,k1);}
ACcode
#includebits/stdc.h
using namespace std;
#define int long long
const int N1e410;
vectorintv[N];
bool vis[N];
int n,m,cnt,Begin;
void dfs(int u,int k){if(k4){//结束找到 cnt;return;}for(auto to:v[u]){if(!vis[to]){vis[to]true;dfs(to,k1);vis[to]false;}else{if(k3toBegin){//首未一样的情况前提是未已经是四边的最后一点了 dfs(to,k1);}}}
}
void solve(){cinnm;for(int i1;im;i){int u,vv;cinuvv;v[u].push_back(vv);v[vv].push_back(u);}for(int i1;in;i){vis[i]true;Begini;dfs(i,1);vis[i]false;}coutcnt\n;
}
signed main(){ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);int tt1;//cintt;while(tt--)solve(); return 0;
}
over~