Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for The Square Chest by Chernish
def checkio(lines_list):
possible_squares=[[[1,2],[1,5],[2,6],[5,6]],
[[2,3],[2,6],[3,7],[6,7]],
[[3,4],[3,7],[4,8],[7,8]],
[[5,6],[5,9],[6,10],[9,10]],
[[6,7],[6,10],[7,11],[10,11]],
[[7,8],[7,11],[8,12],[11,12]],
[[9,10],[9,13],[10,14],[13,14]],
[[10,11],[10,14],[11,15],[14,15]],
[[11,12],[11,15],[12,16],[15,16]],
[[1,2],[2,3],[1,5],[5,9],[3,7],[7,11],[9,10],[10,11]],
[[2,3],[3,4],[2,6],[6,10],[4,8],[8,12],[10,11],[11,12]],
[[5,6],[6,7],[5,9],[9,13],[7,11],[11,15],[13,14],[14,15]],
[[6,7],[7,8],[6,10],[10,14],[8,12],[12,16],[14,15],[15,16]],
[[1,2],[2,3],[3,4],[1,5],[5,9],[9,13],[4,8],[8,12],[12,16],[13,14],[14,15],[15,16]]]
result=0
# puts all segments in order from small to big
for line in lines_list:
if line[1]
Nov. 9, 2012
Comments: