var a:array[1..1024]of integer ;
b:array[1..1024]of char;
q,w,n,i,e,r,t,y,u:integer;
ll,rr:char;
procedure houxu(i:integer);
begin
if b[2*i]<>rr then houxu(2*i);
if b[2*i+1]<>rr then houxu(2*i+1);
write(b[i]);
end;
function f (l,r,i:integer):char;
var q,w,e:integer; qq,ww,ee:char;
begin
if r=l+1 then begin qq:=f(l,l,2*i); ww:=f(r,r,2*i+1); if qq=ww then b[i]:=ww else b[i]:='F'; end else
if r=l then if a[r]=0 then begin b[i]:='B'; exit('B'); end else begin b[i]:='I'; exit('I'); end
else begin
qq:=f(l,(l+r)div 2,2*i);
ww:=f((l+r)div 2+1,r,2*i+1);
if (qq='B') and (ww='B') then b[i]:='B' else if (qq='I')and(ww='I') then b[i]:='I' else b[i]:='F';
end;
393662
测试结果7:
测试结果错误.错误结果为:IBFIBFFBIFBBBFFIIIIBFFIBFBBBFFFBBBBBBFBBBIBFFFIIIBBBFIIIBBBFFFF
正确结果应为:IBFIBFFBIFBBBFFIIIIBFFIBFBBBFFFBBBBBBBBBBIBFFFIIIBBBFIIIBBBFFFF
测试结果8:
测试结果错误.错误结果为:BIFIBFFIBFIIIFFBIFBIFFIBFBIFFFFBIFIIIFIBFBBBFFBIFBBBFIBFBIFFFFFBIFBIFFIBFIIIFFIBFBIFFIIIIIIFFFIBFIBFFBBBIBFFFBBBIBFFBIFBBBFFFFF
正确结果应为:BIFIBFFIBFIIIFFBIFBIFFIBFBIFFFFBIFIIIFIBFBBBFFBIFBBBFIBFBIFFFFFBIFBIFFIBFIIIFFIBFBIFFIIIIIIIFFIBFIBFFBBBIBFFFBBBIBFFBIFBBBFFFFF
测试结果9: 运行错误|普通保护错误
测试结果10:运行错误|普通保护错误