Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- size = 0
- output = ([], [])
- m = 0
- i = 0
- while i < len(matrix):
- j = 0
- while j < len(matrix[i]):
- if matrix[i][j] == 1:
- k = i
- p = j
- while k < len(matrix) and p < len(matrix) and matrix[k][j] == 1 and matrix[i][p] == 1:
- h = k + 1
- g = p + 1
- while h < len(matrix) and g < len(matrix) and matrix[h][p] == 1 and matrix[k][g] == 1:
- h += 1
- g += 1
- k += 1
- p += 1
- print(i, j)
- print(k - 1, p - 1)
- j += 1
- i += 1
- #print(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement