#include#include #include #include #include using namespace std;string s,t;int p=-1,x=0,b;int main(){ getline(cin,s); for(int i=0;i
var s:ansistring; r,ss:string; lr,ls,i,num,p:longint;begin assign(input,'stat.in'); reset(input); assign(output,'stat.out'); rewrite(output); readln(r); readln(s); r:=' '+r+' '; s:=' '+s+' '; lr:=length(r); ls:=length(s); for i:=1 to lr do if r[i]>='a' then r[i]:=chr(ord(r[i])-32); for i:=1 to ls do if s[i]>='a' then s[i]:=chr(ord(s[i])-32); for i:=ls-lr+1 downto 1 do if r=copy(s,i,lr) then begin inc(num); p:=i; end; if num=0 then writeln(-1) else writeln(num,' ',p-1); close(input); close(output);end.
本题若用upcase()函数,则显示“编译失败”