program douazecisitrei; var i,n,m,j,x,y:integer; a:array[1..30,1..30] of integer; f:text; begin assign(f,'graf.txt'); reset(f); readln(f,n,m); for i:=1 to n do for j:=1 to n do a[i,j]:=0; for i:= 1 to m do begin readln(f,x,y); a[x,y]:=1; a[y,x]:=1; end; close(f); writeln('matricea de adiacenta este '); writeln; for i:= 1 to n do begin for j:=1 to n do write(a[i,j],' '); writeln; end; writeln; write('x='); readln(x); write('y='); readln(y); for i:=1 to n do begin a[x,i]:=0; a[i,x]:=0; a[y,i]:=0; a[i,y]:=0; end; writeln('matricea obtinuta prin eliminarea nodurilor ',x,' si ',y,' este'); writeln; for i:= 1 to n do begin for j:=1 to n do write(a[i,j],' '); writeln; end; readln; end.