Problem Statement
Lucyanna loves puzzles and she is always eager to invent new ones. She has recently invented a puzzle on a rectangular board.The board is divided into a grid of unit square cells. Each cell is painted either black or white. The rows are numbered starting from 0, from top to bottom. The columns are numbered starting from 0, from left to right.
The puzzle is played in a sequence of steps. In each step Lucyanna must choose exactly two distinct cells. Additionally, those two cells must lie either in the same row or in the same column. Let cell A be the chosen cell that is closer to the top left corner and let cell B be the other one. If both cells currently share the same color, paint cell B white. Otherwise, paint cell B black. After painting cell B using the previous rules, paint cell A white.
You are given the
- The
int[] answer encodes one possible sequence of steps that solves the puzzle. - The length of answer must be the same as the number of steps in your solution.
- The length of answer must be between 0 and 947, inclusive.
- If in step i (numbered starting from 0) you chose the cells (r1, c1) and (r2, c2), answer[i] should be equal to (r1 * 1000000 + c1 * 10000 + r2 * 100 + c2).
Definition
- Class:
- TransformBoardDiv1
- Method:
- getOperations
- Parameters:
- String[], String[]
- Returns:
- int[]
- Method signature:
- int[] getOperations(String[] start, String[] target)
- (be sure your method is public)
Notes
- Whenever there is a solution, there is a solution that has 947 or fewer steps.
- Any valid solution will be accepted. It is not necessary to minimize the number of steps.
Constraints
- N will be between 1 and 9, inclusive.
- M will be between 1 and 47, inclusive.
- start will contain exactly N elements.
- Each element of start will contain exactly M characters.
- target will contain exactly N elements.
- Each element of target will contain exactly M characters.
- No element of start and target will contain characters other than '#' and '.'.
Examples
{"#.",".."}
{"..",".#"}
Returns: {1, 10101 }
The example output describes a solution that consists of two steps. This is it: In the beginning: #. .. Step 0: we choose the cells (0,0) and (0,1). .# .. Step 1: we choose the cells (0,1) and (1,1). .. .#
{"..",".#"}
{"#.",".."}
Returns: {-1 }
{"#..#","#..."}
{"....","...#"}
Returns: {3, 1000103 }
{"#"}
{"#"}
Returns: { }
{"####","####","####","####"}
{"####","####","####","####"}
Returns: { }
{"##.####.#.##.#.##.#.######.#..#.####..#########","#.##.##.#...###.#####.##.#.#####.#.###..####.##",".#.#..###.####...#####.#.#.###.######.##.######",".##.####..#.#..##..###.#.##.##...##.######.#..#","##..##.#...##.##.####.#.###..##.####..#.#.#..##","##...######.#.##.#..#.##.########.######.#####.","##.##.#.##.#####.##..#....#..#.#..#####.#..###.","###.##.##.######...####.#####.##..##.####.####.","####.###...#.#.#.#..##.#.#.####.###.##.#.#..##."}
{"............###.#.........####.#.#.#..#..#.....","..#..##....#..##.....#.#.#..#....#...#..##..#.#","...##..##.....##.##....#..#.##.####....#......#","#.###..#..........###...#.....#.#.####...#.#...",".........#.##...#..#.#..#.....#.........##...##","#..#.#...#....#.##.#...#.....#####.....#.#..##.","#....#...#.#....#...#..###.......###..#...#...#",".#.#.............#......###....#...............","#.#..#.#.#...#..###..##.....#..#.......#.##..#."}
Returns: {-1 }
{"###############################################","###############################################","###############################################","###############################################","###############################################","###############################################","###############################################","###############################################","##############################################."}
{".##############################################","###############################################","###############################################","###############################################","###############################################","###############################################","###############################################","###############################################","###############################################"}
Returns: {460846, 46 }
{"##############################################.","#############################################..","############################################...","###########################################....","##########################################.....","#########################################......","########################################.......","#######################################........","######################################........."}
{".........######################################","........#######################################",".......########################################","......#########################################",".....##########################################","....###########################################","...############################################","..#############################################",".##############################################"}
Returns: {46, 450145, 10045, 460146, 20046, 440244, 30044, 450245, 40045, 460246, 50046, 430343, 60043, 440344, 70044, 450345, 80045, 1460346, 1000146, 1420442, 1010142, 1430443, 1020143, 1440444, 1030144, 1450445, 1040145, 1460446, 1050146, 1410541, 1060141, 1420542, 1070142, 2430543, 2000243, 2440544, 2010244, 2450545, 2020245, 2460546, 2030246, 2400640, 2040240, 2410641, 2050241, 2420642, 2060242, 3430643, 3000343, 3440644, 3010344, 3450645, 3020345, 3460646, 3030346, 3390739, 3040339, 3400740, 3050340, 4410741, 4000441, 4420742, 4010442, 4430743, 4020443, 4440744, 4030444, 4450745, 4040445, 5460746, 5000546, 5380838, 5010538, 5390839, 5020539, 5400840, 5030540, 6410841, 6000641, 6420842, 6010642, 6430843, 6020643, 7440844, 7000744, 7450845, 7010745, 8000846 }
{"############################...................","###########################....................","##########################.....................","#########################......................","########################.......................","#######################........................","######################.........................","#####################..........................","####################..........................."}
{"...........................####################","..........................#####################",".........................######################","........................#######################",".......................########################","......................#########################",".....................##########################","....................###########################","...................############################"}
Returns: {28, 10029, 20030, 30031, 40032, 50033, 60034, 70035, 80036, 90037, 100038, 110039, 120040, 130041, 140042, 150043, 160044, 170045, 180046, 270127, 190027, 280128, 200028, 290129, 210029, 300130, 220030, 310131, 230031, 320132, 240032, 330133, 250033, 340134, 260034, 1000135, 1010136, 1020137, 1030138, 1040139, 1050140, 1060141, 1070142, 1080143, 1090144, 1100145, 1110146, 1260226, 1120126, 1270227, 1130127, 1280228, 1140128, 1290229, 1150129, 1300230, 1160130, 1310231, 1170131, 1320232, 1180132, 1330233, 1190133, 1340234, 1200134, 1350235, 1210135, 1360236, 1220136, 1370237, 1230137, 1380238, 1240138, 1390239, 1250139, 2000240, 2010241, 2020242, 2030243, 2040244, 2050245, 2060246, 2250325, 2070225, 2260326, 2080226, 2270327, 2090227, 2280328, 2100228, 2290329, 2110229, 2300330, 2120230, 2310331, 2130231, 2320332, 2140232, 2330333, 2150233, 2340334, 2160234, 2350335, 2170235, 2360336, 2180236, 2370337, 2190237, 2380338, 2200238, 2390339, 2210239, 2400340, 2220240, 2410341, 2230241, 2420342, 2240242, 3000343, 3010344, 3020345, 3030346, 3240424, 3040324, 3250425, 3050325, 3260426, 3060326, 3270427, 3070327, 3280428, 3080328, 3290429, 3090329, 3300430, 3100330, 3310431, 3110331, 3320432, 3120332, 3330433, 3130333, 3340434, 3140334, 3350435, 3150335, 3360436, 3160336, 3370437, 3170337, 3380438, 3180338, 3390439, 3190339, 3400440, 3200340, 3410441, 3210341, 3420442, 3220342, 3430443, 3230343, 4000444, 4010445, 4020446, 4230523, 4030423, 4240524, 4040424, 4250525, 4050425, 4260526, 4060426, 4270527, 4070427, 4280528, 4080428, 4290529, 4090429, 4300530, 4100430, 4310531, 4110431, 4320532, 4120432, 4330533, 4130433, 4340534, 4140434, 4350535, 4150435, 4360536, 4160436, 4370537, 4170437, 4380538, 4180438, 4390539, 4190439, 4400540, 4200440, 4410541, 4210441, 4420542, 4220442, 5000543, 5010544, 5020545, 5030546, 5220622, 5040522, 5230623, 5050523, 5240624, 5060524, 5250625, 5070525, 5260626, 5080526, 5270627, 5090527, 5280628, 5100528, 5290629, 5110529, 5300630, 5120530, 5310631, 5130531, 5320632, 5140532, 5330633, 5150533, 5340634, 5160534, 5350635, 5170535, 5360636, 5180536, 5370637, 5190537, 5380638, 5200538, 5390639, 5210539, 6000640, 6010641, 6020642, 6030643, 6040644, 6050645, 6060646, 6210721, 6070621, 6220722, 6080622, 6230723, 6090623, 6240724, 6100624, 6250725, 6110625, 6260726, 6120626, 6270727, 6130627, 6280728, 6140628, 6290729, 6150629, 6300730, 6160630, 6310731, 6170631, 6320732, 6180632, 6330733, 6190633, 6340734, 6200634, 7000735, 7010736, 7020737, 7030738, 7040739, 7050740, 7060741, 7070742, 7080743, 7090744, 7100745, 7110746, 7200820, 7120720, 7210821, 7130721, 7220822, 7140722, 7230823, 7150723, 7240824, 7160724, 7250825, 7170725, 7260826, 7180726, 7270827, 7190727, 8000828, 8010829, 8020830, 8030831, 8040832, 8050833, 8060834, 8070835, 8080836, 8090837, 8100838, 8110839, 8120840, 8130841, 8140842, 8150843, 8160844, 8170845, 8180846 }
{"##############################################","#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.",".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#","#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.",".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#","#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.",".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#","#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.",".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#"}
{"..............................................",".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#","#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.",".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#","#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.",".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#","#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.",".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#","#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#."}
Returns: {200, 10101, 20202, 30103, 40005, 60007, 80009, 100011, 120013, 140015, 160017, 180019, 200021, 220023, 240025, 260027, 280029, 300031, 320033, 340035, 360037, 380039, 400041, 420043, 440045, 1000400, 1020402, 1040105, 1060107, 1080109, 1100111, 1120113, 1140115, 1160117, 1180119, 1200121, 1220123, 1240125, 1260127, 1280129, 1300131, 1320133, 1340135, 1360137, 1380139, 1400141, 1420143, 1440145, 2010301, 2030204, 2050206, 2070208, 2090210, 2110212, 2130214, 2150216, 2170218, 2190220, 2210222, 2230224, 2250226, 2270228, 2290230, 2310232, 2330234, 2350236, 2370238, 2390240, 2410242, 2430244, 3000600, 3020303, 3040305, 3060307, 3080309, 3100311, 3120313, 3140315, 3160317, 3180319, 3200321, 3220323, 3240325, 3260327, 3280329, 3300331, 3320333, 3340335, 3360337, 3380339, 3400341, 3420343, 3440345, 4010501, 4030404, 4050406, 4070408, 4090410, 4110412, 4130414, 4150416, 4170418, 4190420, 4210422, 4230424, 4250426, 4270428, 4290430, 4310432, 4330434, 4350436, 4370438, 4390440, 4410442, 4430444, 2450445, 5000503, 5020602, 5040505, 5060507, 5080509, 5100511, 5120513, 5140515, 5160517, 5180519, 5200521, 5220523, 5240525, 5260527, 5280529, 5300531, 5320533, 5340535, 5360537, 5380539, 5400541, 5420543, 5440545, 6010701, 6030604, 6050606, 6070608, 6090610, 6110612, 6130614, 6150616, 6170618, 6190620, 6210622, 6230624, 6250626, 6270628, 6290630, 6310632, 6330634, 6350636, 6370638, 6390640, 6410642, 6430644, 7000800, 7020703, 7040705, 7060707, 7080709, 7100711, 7120713, 7140715, 7160717, 7180719, 7200721, 7220723, 7240725, 7260727, 7280729, 7300731, 7320733, 7340735, 7360737, 7380739, 7400741, 7420743, 7440745, 8010802, 8030804, 8050806, 8070808, 8090810, 8110812, 8130814, 8150816, 8170818, 8190820, 8210822, 8230824, 8250826, 8270828, 8290830, 8310832, 8330834, 8350836, 8370838, 8390840, 8410842, 8430844, 6450845 }
{"####","####","####",".###"}
{".###","##.#",".###","####"}
Returns: {20102, 2, 2000300 }
{"####","####","####",".###"}
{"####","####","###.",".##."}
Returns: {2030303 }
{"####","####","####",".###"}
{"###.","####","###.","####"}
Returns: {-1 }
{"####","####","####",".###"}
{"####","###.","#..#","####"}
Returns: {-1 }
{"####","####","####","##.#"}
{"####","###.",".##.","####"}
Returns: {2020302, 2000202, 1030203 }
{"###############################################","###############################################","##########.#...#.#.##.#..#####.#####.##.#######","##########.#.####.#####..#..####.##############","#.#######..#.##..##.#.######.#.#.######.#..#.##","..#.#####.######.####.#.#.####.#.##.#.#####..##","##.##############.##.###########.####.##..###..","###..###.##########.#...#.##.#############.####","###..##..#.#######.#..#..#########.####.#######"}
{".......#....#..#.#....#...#....#......#........","......##...##......##..#...#.#......##.......#.",".#..#.##.##..###.#...#.......#....#.#.###..#.#.","##.#....#.....#........##....#.#....#...#....#.",".#..........#..#.#..##.#.#...#..###....#....#..","###...#...#...#..##...#..#......#..##..........","#..##...#..#..#............##.##..##..#...#...#","..###.##...#...#........#.#..#.##...#..#....##.","##.......##..#........#.........#..###..#.....#"}
Returns: {1, 20003, 40005, 60008, 90010, 110013, 140016, 180019, 200021, 230024, 250027, 280029, 300032, 330034, 350036, 370039, 400041, 420043, 440045, 460146, 1000146, 1010401, 1020103, 1040105, 1080109, 1100113, 1140115, 1160117, 1180121, 1220124, 1250126, 1280130, 1310132, 1330134, 1350138, 1390140, 1410142, 1430144, 2000500, 1460246, 2020246, 2050210, 2080213, 2110214, 2030219, 2200221, 2220225, 2260227, 2280231, 2320233, 2350236, 2370239, 2410242, 2440246, 3020304, 3050306, 3070309, 3110313, 3150316, 3180319, 3210323, 3220324, 3200325, 3280330, 3330334, 3350337, 3380339, 3410342, 3430344, 4010501, 4000401, 3460446, 4020446, 4030404, 4050406, 4070408, 4110412, 4140415, 4180421, 4130422, 4240426, 4310432, 4270435, 4360437, 4380439, 4430444, 4400445, 4460546, 5040546, 5050507, 5080511, 5120513, 5150519, 5240525, 5200526, 5270528, 5310532, 5290533, 5340535, 5380539, 5400541, 5420545, 5460646, 6010646, 6050606, 6070609, 6100612, 6130615, 6160618, 6190621, 6220623, 6240625, 6260629, 6330636, 6390643, 6440646, 7000703, 7010704, 7050709, 7100712, 7130714, 7160717, 7180720, 7270730, 7330734, 7350737, 7380740, 7410743, 7460846, 8020846, 8060810, 8050811, 8120814, 8150816, 8170819, 8250826, 8270828, 8290830, 8310833, 8380841, 8420843, 8440845 }
{"###############################################","###############################################","#.#######.##.##################.########...##.#","######.#.#####..####.#####.##...####..##..#.###","###.####.#.###.##.####.#######.#####.######.###","...##.############...###.####.#####.#####.#####","#.##....##.#####..############.###..#.###.###.#","#...##.##.########..####.#....#.####.##.#####..","###.##..##########..#.#######.###.######.#####."}
{".#.#...##.#.......#.........##..#..##...#......",".##...#...###...#..#..#.#.##.###....#......#...","#..###..#..##..##.#......#....#..#...#..##..#..","##.#...........#.#...#.....#.##.##.#.##.#...#..","#.###.##......#.....###.#.#.....#...#..........","....#..#...###..#..#..#..#.##...#.......#...###","..##............#....#..................##.#...",".....#......#..#.##....##.#..##.........#.#....","#...........##.....#...#.......#.#.#...#......."}
Returns: {2, 40005, 60009, 110012, 130014, 150016, 170019, 200021, 220023, 240025, 260027, 300031, 330034, 370038, 390041, 420043, 440045, 460146, 1000146, 1030104, 1050107, 1080109, 1130114, 1150117, 1180120, 1210123, 1250128, 1320133, 1340135, 1370138, 1390140, 1410142, 1440145, 1460246, 2020246, 2060207, 2100212, 2130214, 2170219, 2200221, 2220223, 2240226, 2270228, 2290232, 2340235, 2380240, 2390241, 2360243, 2460346, 3020346, 3040305, 3070309, 3100311, 3130315, 3120316, 3180319, 3220323, 3250329, 3280330, 3340337, 3390340, 3240342, 3450346, 4010403, 4050409, 4110412, 4130414, 4150416, 4190422, 4180423, 4250427, 4280429, 4310433, 4350436, 4340437, 4380439, 4400441, 4420444, 4450446, 5030506, 5080509, 5100514, 5170519, 5150521, 5230526, 5300531, 5330534, 5360537, 5380539, 5420543, 6000608, 6090611, 6120613, 6150616, 6140618, 6190620, 6220623, 6240625, 6260627, 6280629, 6310632, 6330636, 6390641, 6380642, 6440646, 7000704, 7070708, 7100711, 7130714, 7160718, 7210724, 7220726, 7250729, 7200732, 7330734, 7350737, 7380741, 7430744, 8010802, 8040805, 8080809, 8100811, 8140815, 8170819, 8160820, 8220824, 8250826, 8270828, 8320833, 8300834, 8360837, 8380841, 8420843, 8440845 }
{"###############################################","###############################################","#...#######.##########.##.#########.#######.###","###.######.##....#.#...######..#####.######.###","..#####.######.#.##.###.##..###.#.######.###.##","#.####....###.###.#######.####..######.####.###","#.#########..#.##.#####################.#.#.##.","#.##.#############.###.###.####....##########.#","#######.#.#####.###.####.##.####.###.#.###..#.#"}
{"#......#............#.....##........#.......###","#..#............#...#.....#........#..#.#....#.","##.#...#.#..##.....##......#....##.#....###....","..#..#......#..#.####.#.....#..#.#......#.#..##","..#....#..#.....######..#......#.##..#....#....","#.#.............#....###..#.#.....####.#..#....",".#.###..#..##...#..###.......#.###.####.##..#..","........#..#..###...#........#.#.....#.....#...","..##..##.#.##.#..#.......#..###.......##...#..."}
Returns: {10002, 30004, 50006, 80009, 100011, 120013, 140015, 160017, 180019, 210022, 230024, 250028, 290030, 310032, 330034, 350037, 380039, 400041, 420043, 1010201, 1030203, 1020103, 1040105, 1060107, 1080109, 1100111, 1120113, 1140115, 1170118, 1190121, 1220123, 1240125, 1270128, 1290130, 1310132, 1330134, 1360137, 1390141, 1420143, 1440146, 2040205, 2060208, 2100214, 2150216, 2170218, 2210223, 2240226, 2280229, 2300231, 2340235, 2360237, 2380239, 2440245, 2460346, 3000346, 3010304, 3070315, 3080318, 3090320, 3110322, 3060323, 3240325, 3260327, 3320334, 3350337, 3380339, 3410344, 4030404, 4060407, 4050408, 4090411, 4130416, 4150419, 4120422, 4250428, 4300431, 4320433, 4290435, 4360438, 4390441, 4430445, 4460546, 5030546, 5040505, 5100511, 5120514, 5150518, 5190520, 5240527, 5290532, 5330540, 5410544, 5450546, 6000601, 6020606, 6090611, 6100612, 6070613, 6150618, 6220623, 6240625, 6260627, 6280630, 6340641, 6420645, 7000702, 7030705, 7060707, 7090710, 7120713, 7170719, 7210723, 7240725, 7270728, 7300731, 7350736, 7380739, 7400741, 7420744, 7460846, 8000846, 8010804, 8050807, 8080809, 8100813, 8160818, 8200821, 8220823, 8260831, 8330834, 8370838, 8350840, 8410843, 8440846 }
{"###############################################","###############################################","#####..###.###.#########.####.####..#..###.####","#.##############.###.####.##.#.#.##.####.#.####","##.##.##....#.#.############..#####.########.##","#.##.#####..##.##.###.#####.##.###.##.#####..#.","#.####.##.##.#####..####..#.####.#.#.#.##.##.##","##.###...#####.####.#######.#######.##.###.####",".###########.#####.########.#.##.#..#########.."}
{".#.#...#...#.#.#........#....#......#.#........","..###.........#....###.#..#..#...........#.#...","......#...#.#.....#....#.#.##.##...#..#...#..##",".##...#####.#.....#.....#.##.....#......#..##..","......#..##....#..#......#..#..#.##..#.#.#####.",".#.#.#.#...#..##...#...#.##..#.......##...#....",".................#.#.###....#...###.....#..##..","..#.......#.....#.........#........#..#...#...#",".#......#.#.#..#...#...###.....#...##.....#.###"}
Returns: {2, 40005, 60008, 90010, 120014, 160017, 180019, 200021, 220023, 250026, 270028, 300031, 320033, 340035, 370039, 400041, 420043, 440045, 460146, 1000146, 1010105, 1060107, 1080109, 1100111, 1120113, 1150116, 1170118, 1220124, 1250127, 1280130, 1310132, 1330134, 1350136, 1370138, 1390140, 1420144, 1450146, 2000201, 2020203, 2040206, 2070208, 2090210, 2110213, 2150216, 2170219, 2200221, 2220226, 2330235, 2360238, 2320239, 2410242, 2400243, 3000301, 2440344, 3030344, 3040305, 3110313, 3140315, 3170319, 3210322, 3230329, 3310334, 3360337, 3390340, 3380341, 3450346, 4000401, 4040409, 4070410, 4030412, 4140415, 4160417, 4190420, 4210422, 4230424, 4270428, 4260430, 4320436, 4400444, 4380446, 5000501, 5020506, 5090511, 5080512, 5130514, 5160518, 5200522, 5240528, 5310532, 5330535, 5360537, 5390540, 5410545, 6000602, 6030604, 6050607, 6080610, 6110613, 6140615, 6160619, 6200626, 6300632, 6310634, 6290635, 6370639, 6420644, 6450646, 7010702, 7000703, 7040705, 7090711, 7120713, 7150717, 7180720, 7210722, 7230724, 7250728, 7290730, 7310732, 7340735, 7330736, 7370738, 7390740, 7410742, 7430744, 7450845, 8020845, 8030804, 8050806, 8070809, 8110812, 8130814, 8160817, 8200821, 8220826, 8280830, 8330835, 8370838, 8390840, 8410845, 8430846 }
{"###############################################","###############################################","#######.######..#..###.###.####.###.#.#.#####.#","####.##########.#.###########.##.#######.####.#","####..#.###.###..#.###..###########.###.#.####.","...#.##..#.#..###.##.##..########.##..#.###.###","#.#####..#.############.##.#.###.#######...#..#",".#.#########.########..######.#.##.####.####.##","###.#########.####.####..#..#########..#.#####."}
{"..#..#....#.#.#....#..#.##...###......#.##..#..","..#...............#...##..#....##....####..#.#.","#...##......#..##...................#......##..",".#.####...#.##.....##.#...###....#.......##..##","..#..#..#....#..#...##.......#.#.....##...##...","....#.......###........#.#..#..#..#..#....###..","......#...##.#....#..#...#............#.#....#.","..#.#....#......####........##.....#......##...","..#....#.............#.......##...#..#...#....."}
Returns: {1, 30004, 60007, 80009, 110013, 150016, 170018, 200021, 230026, 270028, 320033, 340035, 360037, 390042, 430045, 460146, 1000146, 1010103, 1040105, 1060107, 1080109, 1100111, 1120113, 1140115, 1160117, 1190120, 1210124, 1250127, 1280129, 1300133, 1340135, 1360141, 1420144, 1460246, 2010246, 2020203, 2060208, 2090210, 2130215, 2110219, 2200221, 2230224, 2250227, 2280229, 2300232, 2330234, 2380240, 2410242, 2460346, 3000346, 3020304, 3070308, 3090311, 3140316, 3180321, 3230324, 3250330, 3310334, 3350336, 3370338, 3390343, 3440345, 4000401, 4030405, 4060409, 4100412, 4140416, 4170419, 4240425, 4260427, 4280430, 4320433, 4340436, 4400444, 5030504, 4450545, 5050545, 5090512, 5110513, 5060515, 5160518, 5190521, 5220523, 5260527, 5290530, 5350537, 5320538, 5410543, 5400545, 5460646, 6000646, 6020603, 6040605, 6090610, 6120614, 6150616, 6170619, 6200622, 6240627, 6290630, 6310633, 6340635, 6360637, 6390640, 6430645, 7010702, 6460746, 7030746, 7050706, 7070708, 7100711, 7130714, 7150720, 7230724, 7250726, 7270729, 7300732, 7330736, 7370738, 7400741, 7450746, 8000801, 8040805, 8060808, 8090810, 8110812, 8140815, 8160817, 8190820, 8220825, 8280831, 8320833, 8360837, 8350839, 8420843, 8440845 }
{"###############################################","###############################################",".##.##..#.#.###########.#.#####.##.#####.#.#..#","####..#.##.######..##.##############.##.#.#.#.#","#.###...#####.######.####..####.#.########.#.##","####..###########.###.###.####.###.####..######","########..#.#.#####.############.#.#..#.##..###",".####.##.##...######.#####..###############...#",".#######..#.###..#####....#.#########.#########"}
{".#.#..........##.....#...#.#..........#.....#..",".##..#.....#.###......#..#.##.........#......#.",".#...............#......##..........#..#...###.","#..##............#..##.###....#...#.##.........","......#.##.##...........#.....#..#..#..#....##.","#.#..........#.##.##..#..##..#.#.....#.#.......","........#.#....#..###...#.#....##..#....#...#.#",".##....#.#.#..#.#..#...............#..#..#.....","...#......#.#.#..#.##..##.##...#.####..#.###..#"}
Returns: {2, 40005, 60007, 80009, 100011, 120013, 160017, 180019, 200022, 230024, 260028, 290030, 310032, 330034, 350036, 370039, 400041, 420043, 450046, 1000103, 1040106, 1070108, 1090110, 1120116, 1170118, 1190120, 1210123, 1240126, 1290130, 1310132, 1330134, 1350136, 1370139, 1400141, 1420143, 1440146, 2020204, 2050208, 2100212, 2130214, 2150216, 2180219, 2200221, 2220225, 2260227, 2280229, 2300232, 2330235, 2380244, 2410245, 2370246, 3020304, 3010306, 3080309, 3110312, 3130314, 3160317, 3190321, 3150322, 3260327, 3280329, 3310332, 3350336, 3330338, 3400342, 3440346, 4000402, 4040406, 4030410, 4140415, 4160417, 4180419, 4210422, 4230427, 4280429, 4320433, 4340435, 4370438, 4400441, 4430444, 4460546, 5010546, 5030506, 5070508, 5090510, 5110512, 5140520, 5240525, 5230527, 5280532, 5330535, 5380539, 5360541, 5420543, 5440545, 5460646, 6000646, 6010602, 6030604, 6050606, 6070608, 6120614, 6170619, 6160621, 6220623, 6250627, 6280629, 6300632, 6330638, 6410645, 7030704, 7100711, 7060715, 7170718, 7210722, 7230724, 7250728, 7290730, 7310732, 7330734, 7360737, 7390740, 7420746, 8010802, 8040805, 8060807, 8130823, 8180824, 8210827, 8280829, 8300832, 8380840, 8440845 }
{"###############################################","###############################################","#####.#.#.########.#..####.##.#########.#..###.","..#.#.####..#.####..##...#######.#.#..#..#####.","####.##.####.##.##.####.#########.#####.#####..","###.#...#..####.#######.#.###.####.###..###.###","#########.#########.##########################.","#...#####..##.##########.###.##########.####.##","##.#.#.###.######.######.##...####.#####.######"}
{"#....##.......##.##..#.#.#...#.##..#...........","#....#............##.####..#.#.#...#..#.#.#.#..","#.##.#...#..##.....#............#.......#......","..##...#.###.....#..##...#...#.###.##..........","..#.....#..#..#.#.#...#..........#..##....#....","#.##....#...#...#...#.#..#.#....#..##....#.#.#.","#................##.##.#...#..#.##..#..........","#...#.....##.....#....#..#......#..#......##...","...#.#....#........#...#......##..#..#.#.#.#.#."}
Returns: {10002, 30004, 70008, 90010, 110012, 130016, 190020, 220024, 260027, 280030, 330034, 360037, 380039, 400041, 420043, 440045, 460146, 1010146, 1020103, 1040106, 1070108, 1090110, 1110112, 1130114, 1150116, 1170120, 1250126, 1280130, 1320133, 1340136, 1370139, 1410143, 1450146, 2030303, 2010203, 2040205, 2080209, 2060210, 2110214, 2150216, 2170222, 2230224, 2250227, 2280230, 2310233, 2340235, 2360237, 2380243, 2440245, 3060310, 3080311, 3040312, 3140315, 3160326, 3280332, 3300336, 3270338, 3410342, 3430344, 3450445, 4000445, 4010403, 4050406, 4090410, 4170418, 4130419, 4200421, 4240425, 4260427, 4280429, 4300431, 4320433, 4340435, 4380440, 4410443, 5010503, 4440544, 5040544, 5110513, 5140517, 5180519, 5240525, 5210526, 5280530, 5310533, 5370540, 5420543, 5440546, 6010602, 6030604, 6050606, 6070608, 6100611, 6120613, 6140615, 6160622, 6240625, 6260628, 6290631, 6340635, 6370638, 6390640, 6410642, 6430644, 6450745, 7050745, 7060707, 7080710, 7120714, 7150716, 7180719, 7200721, 7230726, 7270729, 7300731, 7330734, 7360737, 7380740, 7410745, 7460846, 8000846, 8010807, 8090810, 8080811, 8120813, 8140815, 8160818, 8200821, 8220825, 8260832, 8330834, 8350836, 8380842, 8440846 }
{"###############################################","###############################################","##########..##.##..#...###.########.###.#..####","...####.####.#.###.#.#.##.##.#..#####.#########","..#########..##.####.####.##.##.#.########.####","####.#########.##.#.###..##.#####.#######.#####",".####..#.######.#########.##.########.#####...#","##..####.#####.#######.##.#.##.#####.###.#.#.##","#######.#################.####...##.#.#####.###"}
{".#..##.##.#...#.............#.#.###..##.#.....#","......#..##....#...#..#.#.##......#....#.#..#.#","#......#....#....##.##....#.#..#.#.#.###...#...","...##..........#.#..#...#.....##.....##.......#","#....##...#.....#........#...#...#......#.###..","..#........##....#....###.###..##..###..#.#####","##...#....#.......##..........#.....##.........",".#.#..#...#.##..#......#.....#..##..#.#.#..#...","##.##.........#....#.#..#..#.##.....#.........#"}
Returns: {2, 30006, 90011, 120013, 150016, 170018, 190020, 210022, 230024, 250026, 270029, 310035, 360039, 410042, 430044, 1000400, 450145, 1010145, 1020103, 1040105, 1070108, 1110112, 1130114, 1160117, 1180120, 1210123, 1250128, 1290130, 1310132, 1330135, 1360137, 1380140, 1420143, 1450245, 2010245, 2020203, 2040205, 2060208, 2130217, 2150218, 2160220, 2190221, 2090223, 2250226, 2240227, 2290230, 2340235, 2360239, 2320240, 2440245, 2460346, 3050346, 3060308, 3090310, 3110313, 3190320, 3160321, 3230326, 3270330, 3290331, 3320333, 3340335, 3360337, 3390340, 3410342, 3430344, 3450445, 4020445, 4030404, 4070408, 4090413, 4140417, 4180419, 4210422, 4240425, 4230426, 4270430, 4320433, 4340435, 4360437, 4380439, 4410442, 4450446, 5000600, 5010503, 5050506, 5070508, 5090510, 5130515, 5160517, 5200523, 5210524, 5250527, 5180529, 5300534, 5380539, 6020603, 6040605, 6070609, 6110612, 6130614, 6160617, 6200621, 6220623, 6240626, 6270629, 6310632, 6330634, 6350637, 6380639, 6400641, 6420646, 7000703, 7040705, 7070709, 7110715, 7170718, 7190720, 7210724, 7260728, 7310734, 7350736, 7390740, 7370741, 7450746, 8020805, 8060808, 8090810, 8110812, 8130815, 8160817, 8180820, 8220823, 8280830, 8260833, 8340838, 8390840, 8410842, 8440845 }
{"###############################################","###############################################",".###..#########.#.#.###.##.######.#############","#.#####.###..#########.#####.#..###.#####.###.#","#########.#..#######..###.#..##.###.####.######","#######.#.#.########.#########..#######.#######","###..#.####.#.####.##.#####.#######.###.####.##","#####.#####.##..###.##..####....######...#.####","##..##..##...###...#####.##.##..###############"}
{"..#####.............#....##....##..###.#.##.#..","..##.##..#.##......#.....###......###..##......","......##...#..#.#.#..#...#.........#.....#.####","..##.........##...#.###..........#.....#..#....","......#..#.#.....#....##.##....#..###.....#....","..#...##..#........#..##......##..........#....","..........#......#.....##.#..#..#......##..#...","...#.....#.##.#........###.......##.........##.",".#.......#...#..#...#.#..#.#..#.....##..#...##."}
Returns: {1, 70008, 90010, 110012, 130014, 150016, 170018, 190021, 220023, 240027, 280029, 300033, 340038, 400043, 450046, 1000101, 1040107, 1080110, 1130114, 1150116, 1170118, 1200121, 1220123, 1240128, 1290130, 1310132, 1330137, 1380141, 1420143, 1440145, 1460246, 2010246, 2020203, 2080209, 2100212, 2130220, 2220224, 2270228, 2290230, 2310232, 2340236, 2370238, 2390240, 2420342, 3000342, 3040305, 3060308, 3090310, 3150316, 3190322, 3170323, 3240325, 3260327, 3290332, 3340336, 3370338, 3400343, 3440346, 4000401, 4020403, 4040405, 4080409, 4100411, 4070413, 4140415, 4160418, 4240425, 4190429, 4300431, 4330435, 4320437, 4380439, 4410443, 4440445, 4460546, 5000546, 5010503, 5050507, 5040508, 5120513, 5140515, 5160517, 5180521, 5240525, 5260527, 5280530, 5290531, 5320533, 5340535, 5360537, 5380540, 5410543, 5440545, 5460646, 6000646, 6010602, 6050607, 6080609, 6120614, 6150616, 6190620, 6220625, 6280630, 6310633, 6340636, 6380639, 6370641, 6420645, 6460746, 7000746, 7010702, 7040706, 7070708, 7100711, 7130714, 7160717, 7180720, 7210723, 7260727, 7320735, 7360737, 7410743, 7460846, 8000846, 8040805, 8080814, 8150816, 8190821, 8260827, 8230828, 8290830, 8320833, 8340835, 8380839, 8410842, 8430846 }
{"###############################################","###############################################","###.#####.#.###.###.#####.#####...#.###.######.",".##.#####.#####.##################.#####..####.","...##.##.#..#.#.#####.#.#.##.##..#####.#.####.#","..#############.##.###############.#######.#.#.","##.#.##..#.#.###...#######..######.#########.##","######.#...####.#.#.###.##.########.####.######","######.#################.#####.#..#.##.###...##"}
{"....#............#..#.........####....#.....#.#","###........#......###....##..#.#..#.#.......##.","......#....#..#......##......##.#...#...#.#...#","....##..###..##.#....#.#.#..#...#......##.###..","....##..###.#....#.#.#.......#...##...###.....#","...#..#.#...#...##..#..#..#.....#....##..##..##","...#......#.......#.##...#...#...#....#....##.#",".##...#...#..........#..###..#..#..#...#...#..#",".#.#.#.####.....................#.#........#..."}
Returns: {1, 20003, 50006, 70008, 90010, 110012, 130014, 150016, 180019, 210022, 230024, 250026, 270028, 290034, 350036, 370039, 400041, 420043, 450145, 1030145, 1040105, 1060107, 1080109, 1100112, 1130114, 1150116, 1170121, 1220123, 1240127, 1280130, 1320133, 1350137, 1380139, 1400141, 1420143, 1460246, 2000246, 2010202, 2040205, 2070208, 2100211, 2120213, 2160217, 2180220, 2230224, 2260227, 2280232, 2340237, 2380241, 2430244, 2450246, 3010302, 3070309, 3060311, 3120317, 3180319, 3200322, 3240326, 3270329, 3300331, 3330335, 3360337, 3380340, 4030405, 4060408, 4070410, 3450445, 4140445, 4160418, 4200421, 4220424, 4260427, 4300435, 4360438, 4370440, 4410442, 4430444, 5020504, 5050507, 5090510, 5110513, 5140519, 5210522, 5240525, 5270528, 5290530, 5310533, 5350536, 5400542, 5430546, 5390639, 6000639, 6010605, 6090610, 6060611, 6130614, 6150618, 6190622, 6230624, 6280630, 6310632, 6350636, 6370639, 6400641, 6420644, 6450745, 7000745, 7030704, 7050706, 7070710, 7110712, 7130714, 7160718, 7220726, 7200727, 7280730, 7310733, 7340735, 7360737, 7380741, 7420744, 7450845, 8000845, 8020804, 8110812, 8130814, 8150816, 8170818, 8190820, 8210822, 8230825, 8260827, 8280829, 8310832, 8360837, 8390840, 8410843, 8450846 }
{".#", "#." }
{"..", ".." }
Returns: {10101, 1000101 }
{"#.#", ".##" }
{"..#", "#.." }
Returns: {100, 1010102 }
{"#.", "#." }
{"..", "##" }
Returns: {1, 10101 }
{"#..", "#.." }
{"...", ".##" }
Returns: {1, 10101, 1000102 }
{"##", "#." }
{".#", "##" }
Returns: {10101, 1 }
{"##", "##" }
{"#.", ".#" }
Returns: {10101, 1000101 }