讨论 / 很弱智的程序
hfl 2008-10-30 19:46:00
点我顶贴 收藏 删除
核心:

readln(x,y);

fillchar(f,sizeof(f),false);

t:=x;

while t<>a[t] do

begin

f[t]:=true;

t:=a[t];

end;

f[t]:=true;

t:=y;

while t<>a[t] do

begin

if f[t]=true then begin writeln(t);halt;end;

t:=a[t];

end;

if f[t]=true then begin writeln(t);halt;end;

end.

#1 DarkMaster@2008-10-25 05:20:00
回复 删除
怎么乱贴程序代码的又多起来了?
#2 wangqingbaidu@2008-10-30 19:45:00
回复 删除
是的

#3 wangqingbaidu@2008-10-30 19:46:00
回复 删除
是的

查看更多回复
提交回复