Advertisement

AcWing 1185:单词游戏(欧拉回路)

阅读量:

AcWing 1185. 单词游戏

请添加图片描述

大佬题解原地址

复制代码
    #include<bits/stdc++.h>
    
    using namespace std;
    
    const int N = 30;
    
    int n, m;
    int fa[N];
    char str[1010];
    int din[N], dout[N];
    bool st[N];  //判断这个字符有没有用过 
    
    int find(int x){
    	if(x != fa[x]) fa[x] = find(fa[x]);
    	return fa[x];
    }
    
    int main()
    {
    	int T;
    	cin>>T;
    	while(T -- ){
    		s

全部评论 (0)

还没有任何评论哟~