我只想说,对于了解并且会树状数组的人来说,别以为换了个图我们就认不出来你是个树状数组=。=
对于不太了解的,请见【转】搞懂树状数组
var
t,n,x :longint;
begin
read(t);
while (t>0) do
begin
dec(t);
read(n);
x:=n-(n and (-n))+1;
write(x,' ');
x:=n+(n and (-n))-1;
writeln(x);
end;
end.
——by Eirlys