王帅炜 2013-07-10 08:26:00
点我顶贴
收藏
删除
为什么只有三十分!!!!!
var
i,j,k,n,m,t,l,l2:longint;
s2:ansistring;
s:array[0..10000] of string;
s1,s3:string;
ch,ch1,ch2:char;
begin
readln(s1);
readln(s2);
for i:=1 to length(s1) do
s1[i]:=lowercase(s1[i]);
for i:=1 to length(s2) do
s2[i]:=lowercase(s2[i]);
s2:=s2+' ';
for i:=1 to length(s2) do
begin
if s2[i]=' ' then
begin
n:=n+1;
s[n]:=s3;
s3:='';
end else
begin
s3:=s3+s2[i];
end;
end;
t:=-1;
for i:=1 to n do
if s[i]=s1 then begin
if t=-1 then t:=i-1;
m:=m+1;
end;
if m=0 then
begin
writeln('-1');
halt;
end;
writeln(m,' ',t);
end.
为什么只有三十分!!!!!