WA#3
what is wrong in my solution?
Program N1744;
Var
n,i,j,t,k:integer;
A:array[1..100,1..100] of integer;
R:array[1..50000,1..3] of integer;
begin
Readln(n);
for i:=1 to N do
for j:=1 to N do
if i<>j then A[i,j]:=0 else A[i,j]:=3;
k:=0;
for i:=1 to N do
for j:=1 to n do
for t:=1 to n do
if (A[i,j]<3)and(A[i,t]<3) and(A[j,t]<3) then
begin
inc(k);
R[k,1]:=i;
R[k,2]:=j;
R[k,3]:=t;
inc(A[i,j]);
inc(A[i,t]);
inc(A[j,t]);
inc(A[j,i]);
inc(A[t,i]);
inc(A[t,j]);
end;
writeln(k);
for i:=1 to k do
writeln(R[i,1],' ',R[i,2],' ',R[i,3]);
Readln;
end.
is there a difference in what order the output numbers of soldiers?
Edited by author 24.01.2010 16:02
Edited by author 24.01.2010 16:03