90pts,QAQ
查看原帖
90pts,QAQ
1329354
Johnson31楼主2024/12/20 22:48

Why???

#include<bits/stdc++.h>
using namespace std;
string a,b,c;
int main(){
	cin>>a>>b>>c;
	for(int i=0;i<b.size();i++){
		for(int j=i+1;j<b.size();j++){
			if(a[i]==a[j]&&(b[i]-'A')!=(b[j]-'A')){
				cout<<"Failed";
				return 0;
			}
		}
	}
	if(a.size()<26){
		cout<<"Failed";
		return 0;
	}
	for(int i=0;i<c.size();i++){
		for(int j=0;j<a.size();j++){
			if(c[i]==a[j]){
				cout<<b[j];
				break;
			}
		}
	}
	return 0;
}
2024/12/20 22:48
加载中...