Square Ice

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

Convert a 6x6 alternating sign matrix (https://en.wikipedia.org/wiki/Alternating_sign_matrix) to a square ice lattice. 1 corresponds to horizontal molecules, -1 corresponds to vertical molecules and 0 corresponds to bent molecules.

-- Sp

Options

exec is denied

rejudge feature is enabled

now post-mortem time, all source codes will be revealed

Sample input:_

1  0  0  0  0  0
0  1  0  0  0  0
0  0  1  0  0  0
0  0  0  1  0  0
0  0  0  0  1  0
0  0  0  0  0  1

Sample output:

H-O-H O-H O-H O-H O-H O-H
      |   |   |   |   |  
  H   H   H   H   H   H  
  |                      
H-O H-O-H O-H O-H O-H O-H
          |   |   |   |  
  H   H   H   H   H   H  
  |   |                  
H-O H-O H-O-H O-H O-H O-H
              |   |   |  
  H   H   H   H   H   H  
  |   |   |              
H-O H-O H-O H-O-H O-H O-H
                  |   |  
  H   H   H   H   H   H  
  |   |   |   |          
H-O H-O H-O H-O H-O-H O-H
                      |  
  H   H   H   H   H   H  
  |   |   |   |   |      
H-O H-O H-O H-O H-O H-O-H

Sample input:_

0  1  0  0  0  0
1 -1  0  1  0  0
0  1  0 -1  1  0
0  0  1  0  0  0
0  0  0  1  0  0
0  0  0  0  0  1

Sample output:

H-O H-O-H O-H O-H O-H O-H
  |       |   |   |   |  
  H   H   H   H   H   H  
      |                  
H-O-H O H-O H-O-H O-H O-H
      |   |       |   |  
  H   H   H   H   H   H  
  |           |          
H-O H-O-H O-H O H-O-H O-H
          |   |       |  
  H   H   H   H   H   H  
  |   |           |      
H-O H-O H-O-H O-H O-H O-H
              |       |  
  H   H   H   H   H   H  
  |   |   |       |      
H-O H-O H-O H-O-H O-H O-H
                      |  
  H   H   H   H   H   H  
  |   |   |   |   |      
H-O H-O H-O H-O H-O H-O-H

Sample input:_

0  0  1  0  0  0
0  1 -1  1  0  0
0  0  1 -1  1  0
1 -1  0  1 -1  1
0  1  0  0  0  0
0  0  0  0  1  0

Sample output:

H-O H-O H-O-H O-H O-H O-H
  |   |       |   |   |  
  H   H   H   H   H   H  
          |              
H-O H-O-H O H-O-H O-H O-H
  |       |       |   |  
  H   H   H   H   H   H  
      |       |          
H-O H-O H-O-H O H-O-H O-H
  |           |       |  
  H   H   H   H   H   H  
      |   |       |      
H-O-H O H-O H-O-H O H-O-H
      |           |      
  H   H   H   H   H   H  
  |       |   |       |  
H-O H-O-H O-H O-H O-H O-H
                  |      
  H   H   H   H   H   H  
  |   |   |   |       |  
H-O H-O H-O H-O H-O-H O-H

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1tails (gs)1230.10592016/09/09 15:44:591B / 50B / 67B
2mitchs_1910.03502016/09/11 19:59:340B / 91B / 81B

Ruby2 _

RankUserSizeTimeDateStatistics
1rotary-o1700.18642016/09/06 01:27:090B / 75B / 84B
2mitchs (rotary-o)1660.25602016/09/12 01:07:070B / 65B / 89B

Perl _

RankUserSizeTimeDateStatistics
1tails1370.04242016/08/29 01:41:326B / 39B / 83B

Python _

RankUserSizeTimeDateStatistics
1mitchs2370.10452016/09/11 19:57:390B / 118B / 95B

C _

RankUserSizeTimeDateStatistics
1nu1460.03182016/09/11 19:14:560B / 71B / 74B
2tails1540.03202016/08/30 19:45:160B / 75B / 78B
3test2100.04062016/08/30 14:44:510B / ?B / ?B

sed _

RankUserSizeTimeDateStatistics
1tails1930.03742016/09/06 17:01:240B / 56B / 98B

GolfScript _

RankUserSizeTimeDateStatistics
1tails810.08482016/09/08 01:41:490B / 27B / 50B

FerNANDo _

RankUserSizeTimeDateStatistics
1tails4970.16022016/08/30 16:38:500B / 249B / 0B

Language Ranking_

RankLangUserSizeScore
1GolfScripttails8110000
2Rubytails (gs)1236585
3Perltails1375912
4Cnu1465547
5Ruby2mitchs (rotary-o)1664879
6sedtails1934196
7Pythonmitchs2373417
8FerNANDotails4971629

return top