Dominosa Small
Submit
Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.
Problem
How to play
15 dominoes (the 0 to 4 set) are placed to form a rectangle, but their bounds are not shown to the player. Your goal is to find these bounds and restore the whole domino set.
Input is rectangular board of digits.
Example:
000102
030411
121314
222334
234344
Output is the coordinates from top|right to the bottom|left of each domino. The points (coordinates) on the board are number from 0 to 29.
Example Output:
0,1 2,3 4,5 6,7 8,9 10,11 12,13 14,15 16,17 18,24 19,25 20,26 21,27 22,28 23,29
Visual of the solution:
0|0 0|1 0|2
0|3 0|4 1|1
1|2 1|3 1|4
2 2 2 3 3 4
- - - - - -
2 3 4 3 4 4
Get a feel for Dominosa at http://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/dominosa.html
Options
exec is denied
now post-mortem time, all source codes will be revealed
Sample input:_
201004
112243
442310
431401
220333
Sample output:
0,1 2,8 3,4 5,11 6,7 9,15 10,16 12,18 13,14 17,23 19,20 21,22 24,25 26,27 28,29
Sample input:_
022214
210022
301340
101433
441433
Sample output:
0,1 2,3 4,10 5,11 6,12 7,13 8,9 14,15 16,22 17,23 18,24 19,25 20,26 21,27 28,29
Sample input:_
210033
234241
434342
413001
011022
Sample output:
0,6 1,7 2,3 4,5 8,14 9,15 10,11 12,13 16,17 18,24 19,25 20,21 22,28 23,29 26,27
Ranking
Rank | User | Size | Time | Date | Statistics |
---|
1 | mitchs | 105 | 0.0860 | 2014/11/30 09:29:55 | 0B / 54B / 42B |
2 | rolf | 468 | 0.0895 | 2014/11/26 04:22:06 | 0B / 214B / 162B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | whio | 57 | 0.0541 | 2014/12/11 05:11:42 | 7B / 17B / 31B |
Language Ranking_
Rank | Lang | User | Size | Score |
1 | GolfScript | whio | 57 | 10000 |
2 | dc | tails (int-e) | 59 | 9661 |
3 | Burlesque | fizzie(supercheat) | 78 | 7307 |
4 | Ruby | mitchs | 81 | 7037 |
5 | Python | mitchs | 105 | 5428 |
6 | Haskell | int-e | 131 | 4351 |
7 | Bash | fizzie(zlib) | 161 | 3540 |
return to the top page