- 潜伏者
- 2016-08-29 11:32:25 @
program p1752;
var
a,b,c:string;
x:array['A'..'Z']of char;
i,n:longint;
k:char;
begin
fillchar(x,sizeof(x),' ');
readln(a);
readln(b);
readln(c);
n:=length(a);
for i:=1 to n do
begin
if x[a[i]]=' ' then x[a[i]]:=b[i]
else if x[a[i]]<>b[i] then begin writeln('Failed'); exit; end;
end;
for k:='A' to 'Z' do
if x[k]=' ' then begin writeln('Failed'); exit; end;
for i:=1 to length(c) do c[i]:=x[c[i]];
writeln(c);
end.
第三个测试点过不去!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
0 条评论
目前还没有评论...