| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Why wa?program all_in_all;
var m,n,t:string;i,j:integer;k,l:integer;flag:string[3];
begin
readln(t);
l:=pos(' ',t);k:=length(t);
m:=copy(t,1,l-1);
delete(t,1,l);
n:=t;
k:=length(m);
l:=length(n);j:=1;i:=1;
while i<k do
begin
while (m[i]<>n[j]) do
begin
inc(j);
if j>l then
begin flag:='No';break;write(i,j)
end;
end;
inc(i);inc(j);
if j>l then
begin flag:='No';break;write(i,j)
end;
if (i=k) and (flag<>'No') then flag:='Yes';
end;{while}
writeln(flag);
end.
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator