Pagini recente » Cod sursa (job #716195) | Cod sursa (job #2294105) | Cod sursa (job #771601) | Cod sursa (job #1727993) | Cod sursa (job #136995)
Cod sursa(job #136995)
Const fin='grozavesti.in';
fout='grozavesti.out';
nmax=300;
Var
f:text;
A:Array[1..nmax,1..nmax] of LongInt;
i,j,n:integer;
x,min:longint;
Begin
assign(f,fin); reset(f);
readln(f,n);
For i:=1 to n do
For j:=1 to n Do
Read(f,a[i,j]);
close(f);
assign(f,fout);rewrite(f);
for i:=1 to n-1 do
begin
min:=a[i,i];
for j:=i+1 to n do
if a[j,j]<a[i,i] then begin
writeln(f,'C',i,' ',j);
writeln(f,'L',i,' ',j);
x:=a[j,j];
a[j,j]:=a[i,i];
a[i,i]:=x;
end;
end;
close(f);
End.