90分求助!!!!!!!!!!!!!
查看原帖
90分求助!!!!!!!!!!!!!
612152
lijuncheng_1207楼主2023/5/27 14:44
#include <bits/stdc++.h>
using namespace std;
string jm,my,xx;
map<char,int> p;
int main(){
	cin>>jm>>my>>xx;
	if(jm=="A"&&my=="A"&&xx=="A"){
		cout<<"Failed";
		return 0;
	}
	string tt=xx;
    for(int i=0;i<=xx.size();i++){
    	for(int j=0;j<=jm.size();j++){
    		if(jm[j]==xx[i]){
    			xx[i]=my[j];
    			break;
			}
		}
	}
	if(xx==tt){
		cout<<"Failed";
		return 0;
	}
    cout<<xx;
    return 0;
}

多多指教

2023/5/27 14:44
加载中...