90,求调
查看原帖
90,求调
1034945
cheyifeng楼主2024/12/21 15:20
#include<bits/stdc++.h>
using namespace std;
char c[114];
int main(){
	string s,t,r;
	cin>>s>>t>>r;
	for(int i=0;i<=s.size()-1;i++){
		if(c[s[i]]=='\0')c[s[i]]=t[i];
		else if(c[s[i]]!=t[i]){
			cout<<"Failed";
			return 0;
		}
	}
	for(int i=(int)'A';i<=(int)'Z';i++){
		if(c[i]=='\0'){
			cout<<"Failed";
			return 0;
		}
	}
	for(int i=0;i<=r.size()-1;i++){
		if(c[r[i]]=='\0'){
			cout<<"Failed";
			return 0;
		}
		cout<<c[r[i]];
	}
	return 0;
}
2024/12/21 15:20
加载中...