Sub Rec(ByVal Z As Integer, ByVal arr1 As Array)
TR(Z) = True
For i = 0 To N
If Arr1(i, Z) = 1 And Not TR(i) Then
Rec(i, Arr1)
ZZ += 1
End If
Next
End Sub
Sub DeleteR(ByVal Arr1 As Array, ByVal JJ As Integer)
For i = 1 To N
For j = i - 1 To N - 1
If Arr1(i, j) = 1 And JJ < 3 Then
Arr1(i, j) = 0
DeleteR(Arr1, JJ + 1)
Arr1(i, j) = 1
End If
Next
Next
If JJ < DD Then
For i = 0 To N
TR(i) = 0
Next
ZZ = 0
Rec(0, Arr1)
If ZZ <> N Then
DD = JJ
End If
End If
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 87