procedure dfs ( now,color: integer);
begin
for i:=1 to n do
if a[now,i] and c[i]=0 then begin {对结点I染色}
c[i]:=color;
dfs(I,color);
end;