90分求调
查看原帖
90分求调
757101
junee楼主2023/9/16 11:14
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	string a,b,c;
	cin>>a>>b>>c;
	int res=0;
	for(int i=0;i<=a.length();i++){
		for(int j=i+1;j<=a.length();j++){
			if(a[i]==a[j]&&b[i]!=b[j]){
				cout<<"Failed";
				return 0;
			}
		}
	}
	for(int i=0;i<=c.length();i++){
		for(int j=0;j<=a.length();j++){
			if(c[i]==a[j]){
				cout<<b[j];
				break;
			}
		}
	}
	return 0;
}



2023/9/16 11:14
加载中...