1 条题解
-
0YBQYBQ LV 8 @ 2014-10-09 14:42:42
var
a:array['A'..'Z']of char;
s1,s2,s3:ansistring;
i:longint;c,d:char;
begin
fillchar(a,sizeof(a),'0');
readln(s2);readln(s1);
for i:=1 to length(s1)do
if (a[s2[i]]<>'0')and(a[s2[i]]<>s1[i])then begin writeln('Failed');halt;end
else a[s2[i]]:=s1[i];
readln(s3);
for c:='A'to 'Y'do for d:=chr(ord(c)+1)to 'Z'do if a[c]=a[d] then
begin writeln('Failed');halt;end;
for c:='A' to 'Z' do if a[c]='0'then begin writeln('Failed');halt;end;
for i:=1 to length(S3)do write(a[s3[i]]);
end.
- 1
信息
- ID
- 1885
- 难度
- 8
- 分类
- (无)
- 标签
- 递交数
- 74
- 已通过
- 9
- 通过率
- 12%
- 被复制
- 2
- 上传者