Se da un graf neorientat cu n varfuri si m muchii prin lista muchilor. Construiti matricea lanturilor folosind parcurgerea in adancime.
Exemplu: date.in 8 9 1 2 1 4 2 3 3 4 3 5 5 6 7 8 4 6 date.out 0 1 1 1 1 1 0 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 0 0 1 1 1 0 1 1 0 0 1 1 1 1 0 1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 |
|