/ SB域 /

记录详情

Accepted

/usr/bin/ld.bfd: warning: /out/link.res contains output sections; did you forget -T?
# 状态 耗时 内存占用
#1 Accepted 1ms 256.0 KiB
#2 Accepted 1ms 256.0 KiB
#3 Accepted 1ms 256.0 KiB
#4 Accepted 1ms 256.0 KiB
#5 Accepted 1ms 256.0 KiB
#6 Accepted 1ms 256.0 KiB
#7 Accepted 1ms 256.0 KiB
#8 Accepted 0ms 256.0 KiB
#9 Accepted 1ms 256.0 KiB
#10 Accepted 0ms 256.0 KiB

代码

var t,n,i,cnt:longint;
    s1,s2:string;
begin
 readln(n);
 for t:=1 to n do begin
  readln(s1);
  readln(s2);
  if length(s1)<>length(s2) then
  begin writeln('No'); continue; end;
  cnt:=0;
  for i:=1 to length(s1) do begin
   if s1[i]<>s2[i] then inc(cnt);
 end;
   if cnt>1 then begin writeln('No'); continue; end ELSE writeln('Yes');
 end;
 close(input);close(output);
end.

信息

递交者
类型
递交
题目
StrangeComparator奇怪的比较器
题目数据
下载
语言
Pascal
递交时间
2017-08-22 14:10:05
评测时间
2017-08-22 14:10:05
评测机
分数
100
总耗时
12ms
峰值内存
256.0 KiB