Tile Squares with Dominoes

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Draw tilings of squares with dominoes, in particular the maximal height tilings as defined by William P. Thurston in his paper "Conway's Tiling Groups".

-- mitchs

Options

exec is denied

no deadline, the server will not save your submission

Sample input:_

8
4
10
16

Sample output:

 _______________________________
|       |       |       |       |
|_______|_______|_______|_______|
|   |       |       |       |   |
|   |_______|_______|_______|   |
|   |   |       |       |   |   |
|___|   |_______|_______|   |___|
|   |   |   |       |   |   |   |
|   |___|   |_______|   |___|   |
|   |   |   |       |   |   |   |
|___|   |___|_______|___|   |___|
|   |   |       |       |   |   |
|   |___|_______|_______|___|   |
|   |       |       |       |   |
|___|_______|_______|_______|___|
|       |       |       |       |
|_______|_______|_______|_______|

 _______________
|       |       |
|_______|_______|
|   |       |   |
|   |_______|   |
|   |       |   |
|___|_______|___|
|       |       |
|_______|_______|

 _______________________________________
|       |       |       |       |       |
|_______|_______|_______|_______|_______|
|   |       |       |       |       |   |
|   |_______|_______|_______|_______|   |
|   |   |       |       |       |   |   |
|___|   |_______|_______|_______|   |___|
|   |   |   |       |       |   |   |   |
|   |___|   |_______|_______|   |___|   |
|   |   |   |   |       |   |   |   |   |
|___|   |___|   |_______|   |___|   |___|
|   |   |   |   |       |   |   |   |   |
|   |___|   |___|_______|___|   |___|   |
|   |   |   |       |       |   |   |   |
|___|   |___|_______|_______|___|   |___|
|   |   |       |       |       |   |   |
|   |___|_______|_______|_______|___|   |
|   |       |       |       |       |   |
|___|_______|_______|_______|_______|___|
|       |       |       |       |       |
|_______|_______|_______|_______|_______|

 _______________________________________________________________
|       |       |       |       |       |       |       |       |
|_______|_______|_______|_______|_______|_______|_______|_______|
|   |       |       |       |       |       |       |       |   |
|   |_______|_______|_______|_______|_______|_______|_______|   |
|   |   |       |       |       |       |       |       |   |   |
|___|   |_______|_______|_______|_______|_______|_______|   |___|
|   |   |   |       |       |       |       |       |   |   |   |
|   |___|   |_______|_______|_______|_______|_______|   |___|   |
|   |   |   |   |       |       |       |       |   |   |   |   |
|___|   |___|   |_______|_______|_______|_______|   |___|   |___|
|   |   |   |   |   |       |       |       |   |   |   |   |   |
|   |___|   |___|   |_______|_______|_______|   |___|   |___|   |
|   |   |   |   |   |   |       |       |   |   |   |   |   |   |
|___|   |___|   |___|   |_______|_______|   |___|   |___|   |___|
|   |   |   |   |   |   |   |       |   |   |   |   |   |   |   |
|   |___|   |___|   |___|   |_______|   |___|   |___|   |___|   |
|   |   |   |   |   |   |   |       |   |   |   |   |   |   |   |
|___|   |___|   |___|   |___|_______|___|   |___|   |___|   |___|
|   |   |   |   |   |   |       |       |   |   |   |   |   |   |
|   |___|   |___|   |___|_______|_______|___|   |___|   |___|   |
|   |   |   |   |   |       |       |       |   |   |   |   |   |
|___|   |___|   |___|_______|_______|_______|___|   |___|   |___|
|   |   |   |   |       |       |       |       |   |   |   |   |
|   |___|   |___|_______|_______|_______|_______|___|   |___|   |
|   |   |   |       |       |       |       |       |   |   |   |
|___|   |___|_______|_______|_______|_______|_______|___|   |___|
|   |   |       |       |       |       |       |       |   |   |
|   |___|_______|_______|_______|_______|_______|_______|___|   |
|   |       |       |       |       |       |       |       |   |
|___|_______|_______|_______|_______|_______|_______|_______|___|
|       |       |       |       |       |       |       |       |
|_______|_______|_______|_______|_______|_______|_______|_______|

Sample input:_

2
6
14
12

Sample output:

 _______
|       |
|_______|
|       |
|_______|

 _______________________
|       |       |       |
|_______|_______|_______|
|   |       |       |   |
|   |_______|_______|   |
|   |   |       |   |   |
|___|   |_______|   |___|
|   |   |       |   |   |
|   |___|_______|___|   |
|   |       |       |   |
|___|_______|_______|___|
|       |       |       |
|_______|_______|_______|

 _______________________________________________________
|       |       |       |       |       |       |       |
|_______|_______|_______|_______|_______|_______|_______|
|   |       |       |       |       |       |       |   |
|   |_______|_______|_______|_______|_______|_______|   |
|   |   |       |       |       |       |       |   |   |
|___|   |_______|_______|_______|_______|_______|   |___|
|   |   |   |       |       |       |       |   |   |   |
|   |___|   |_______|_______|_______|_______|   |___|   |
|   |   |   |   |       |       |       |   |   |   |   |
|___|   |___|   |_______|_______|_______|   |___|   |___|
|   |   |   |   |   |       |       |   |   |   |   |   |
|   |___|   |___|   |_______|_______|   |___|   |___|   |
|   |   |   |   |   |   |       |   |   |   |   |   |   |
|___|   |___|   |___|   |_______|   |___|   |___|   |___|
|   |   |   |   |   |   |       |   |   |   |   |   |   |
|   |___|   |___|   |___|_______|___|   |___|   |___|   |
|   |   |   |   |   |       |       |   |   |   |   |   |
|___|   |___|   |___|_______|_______|___|   |___|   |___|
|   |   |   |   |       |       |       |   |   |   |   |
|   |___|   |___|_______|_______|_______|___|   |___|   |
|   |   |   |       |       |       |       |   |   |   |
|___|   |___|_______|_______|_______|_______|___|   |___|
|   |   |       |       |       |       |       |   |   |
|   |___|_______|_______|_______|_______|_______|___|   |
|   |       |       |       |       |       |       |   |
|___|_______|_______|_______|_______|_______|_______|___|
|       |       |       |       |       |       |       |
|_______|_______|_______|_______|_______|_______|_______|

 _______________________________________________
|       |       |       |       |       |       |
|_______|_______|_______|_______|_______|_______|
|   |       |       |       |       |       |   |
|   |_______|_______|_______|_______|_______|   |
|   |   |       |       |       |       |   |   |
|___|   |_______|_______|_______|_______|   |___|
|   |   |   |       |       |       |   |   |   |
|   |___|   |_______|_______|_______|   |___|   |
|   |   |   |   |       |       |   |   |   |   |
|___|   |___|   |_______|_______|   |___|   |___|
|   |   |   |   |   |       |   |   |   |   |   |
|   |___|   |___|   |_______|   |___|   |___|   |
|   |   |   |   |   |       |   |   |   |   |   |
|___|   |___|   |___|_______|___|   |___|   |___|
|   |   |   |   |       |       |   |   |   |   |
|   |___|   |___|_______|_______|___|   |___|   |
|   |   |   |       |       |       |   |   |   |
|___|   |___|_______|_______|_______|___|   |___|
|   |   |       |       |       |       |   |   |
|   |___|_______|_______|_______|_______|___|   |
|   |       |       |       |       |       |   |
|___|_______|_______|_______|_______|_______|___|
|       |       |       |       |       |       |
|_______|_______|_______|_______|_______|_______|

Ranking

Perl _

RankUserSizeTimeDateStatistics
1tails1540.04052015/05/21 23:34:501B / 54B / 96B
2Hem1720.02522016/05/27 14:53:500B / 49B / 120B
3BioFALSE3020.02392015/05/29 23:08:570B / 78B / 193B

Python _

RankUserSizeTimeDateStatistics
1recursive1650.06352015/07/09 04:36:080B / 69B / 85B
2mitchs1700.07582015/06/07 11:36:250B / 81B / 84B
3xsot1710.08152015/05/24 23:51:240B / 77B / 90B
4twobit1780.20012015/05/31 06:43:320B / ?B / ?B
5rolf1990.11512015/05/22 06:36:500B / 87B / 95B

Python3 _

RankUserSizeTimeDateStatistics
1mitchs1800.22602015/06/07 11:43:490B / 78B / 97B

Language Ranking_

RankLangUserSizeScore
1Perltails15410000
2Pythonrecursive1659333
3Python3mitchs1808555

return top