|  | 
|  | 
| back to board | Help. I cant understand my mistake for WA2. I tried it on my PC. Its work.
 Edited by author 19.10.2013 14:34
Re: Help. can you post your code? I cant understand my mistake for WA2. I tried it on my PC. Its work.
 Edited by author 19.10.2013 14:34
Re: Help.  
 Edited by author 19.10.2013 16:29
Re: Help.  
 Edited by author 19.10.2013 16:28
Re: Help. vars,s1,s2: string;
 i,f,n,m,k,l,p,j,code: longint;
 ch:char;
 begin
 readln(s);
 readln(n);
 for i:=1 to n do
 begin
 readln(s2);
 if s2[1]='p' then
 begin
 Val(s2[13],j,code);
 Val(s2[15],k,code);
 s1:=copy(s,j,k-j+1);
 f := 0;
 for  p:= 1 to length(s1) div 2 do
 if s1[p] <> s1[length(s1)-p+1] then
 begin
 writeln('No');
 f := 1;
 end;
 if f = 0 then
 writeln('Yes');
 end else
 begin
 Val(s2[8],m,code);
 ch:=s2[10];
 delete(s,m,1);
 insert(ch, s,m);
 end;
 end;
 end.
Re: Help. Maybe multiple No's? But you will take TLE.Re: Help. Try this test:
 aacdeabcdeabcdeabcde
 1
 palindrome? 1 20
 | 
 | 
|