procedure acceptcolor(var e:ege;var v:ary;var cx:coloring); const n=10; type ary=array[1..n] of integer; ege=array[1..n,1..n] of integer; coloring=array[1..n] of integer; var k,j,i,c:integer; function colored(var v,c:integer): boolean; var i:integer; begin colored:=false; for i:=1 to n do if e[v,i]=1 then if cv[i]=c then colored:=true; end; begin for k:=1 to n do cv[k]:=0; for i:=1 to n do begin c:=1; while colored(v[i],c) do c:=c+1; cv[v[i]]:=c end; end;