不是VIP会员,不能显示答案

题目解答

题目:
var
j:longint;
use:array[0..10] of boolean;
a:array[0..10] of longint;
procedure dfs( i: longint);
var j:longint;
begin
if i>2 then begin
for j:= 1 to 2 do
write(a[j],' ');
writeln;
exit
end;
for j:=a[i-1]+1 to 3 do
If not use[j] then begin
use[j]:=true;
a[i]:=j;
dfs(i+1);
use[j]:=false;
end;
end;
begin
dfs(1);
end.
输出:1 2
1 3
2 3
考点:
分析:
解答:
评论:
老师: