Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. for y in range(len(lines)):
  2. for x in range(len(lines[0])):
  3. pa=[x,y]
  4. if lines[x][y]!='#':
  5. continue
  6.  
  7. for y2 in range(len(lines)):
  8. for x2 in range(len(lines[0])):
  9. pb=[x2,y2]
  10. if lines[x2][y2]!='#':
  11. continue
  12.  
  13. if pb!=pa:
  14. count=0
  15.  
  16. for y3 in range(len(lines)):
  17. for x3 in range(len(lines[0])):
  18. pp=[x3,y3]
  19. if lines[x3][y3]!='#':
  20. continue
  21.  
  22. if pp!=pb and pp!=pa:
  23. if not check(pa,pb,pp):
  24. count+=1
  25. if count>score:
  26. score=count
  27. print(score,(x,y))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement