Statistics

Problem Statement for "TwoLLogo"

Problem Statement

Please note that this problem has a non-standard time limit: 3 seconds.

A yet unknown "LL Company" wants to design a logo. After a long discussion, company designers decided that the logo should consist of two letters L drawn in some way.

To start with something, designers drew N rows of M points each, one under another, so that these points form a rectangular grid. They also painted each point either white or black. Here is an example of what they could get for N = 4 and M = 5:



Designers agreed to draw each letter L as a union of a horizontal and a vertical line segment intersecting at their left and bottom ends, respectively. The segments must have positive lengths, and their endpoints must be white grid points. All grid points that lie on the segments must be white as well. For example, here are two valid placements of a letter:

 

Note that neither the letters nor the grid can be rotated.

The final requirement is that the two letters should be disjoint. That is, no white point should lie on two segments belonging to different letters.

You are given the grid with N rows and M columns, encoded as a String[] grid with N elements, each containing M characters. Each character is either '.' or '#', meaning that the corresponding point is either white or black, respectively.

Return the number of different possible logos with two L's drawn on them according to the requirements. Two logos are considered different if there is a pair of points that is connected by a line segment in exactly one of the logos.

Definition

Class:
TwoLLogo
Method:
countWays
Parameters:
String[]
Returns:
long
Method signature:
long countWays(String[] grid)
(be sure your method is public)

Constraints

  • grid will contain between 2 and 30 elements, inclusive.
  • All elements of grid will contain the same number of characters.
  • Each element of grid will contain between 2 and 30 characters, inclusive.
  • Each character of grid will be either '.' or '#'.

Examples

  1. {"....", "...."}

    Returns: 1

  2. {".##..", "...#.", ".#.#.", "#...#"}

    Returns: 3

    This is the example from the problem statement. The three possible logos look as follows:    

  3. {"..#.", "#.#.", "....", "..#."}

    Returns: 4

         

  4. {"..", ".."}

    Returns: 0

    Too small for a logo.

  5. {".#.#", "....", ".#.#", "...."}

    Returns: 34

  6. {"##############", "##############", "#.############", "#.############", "#.############", "#.############", "#.############", "#.############", "#.#####.######", "#.#####.######", "#.#####.######", "#....##.######", "#######.######", "#######.######", "#######.######", "#######.######", "#######.######", "#######.######", "#######......#", "##############"}

    Returns: 1350

    Corners of L's are identified uniquely in this case, but line segment lengths can vary.

  7. {"#......", ".#....#", ".#.#...", "#....#.", ".##..#.", ".#.....", ".....#.", ".#.#...", ".#...#.", "..##..."}

    Returns: 2386

  8. {"...#..........................", "..............................", "..............................", "..................#...#.......", "..................#...........", "..............................", "...........#..................", "..............................", ".....#..#.....................", ".......................#......", "..................#.....#.....", "..............................", "..............................", "..............................", "..............................", "..#...........................", "..............................", "..............................", "..............................", "#............................#", "..............................", ".....#.........#............#.", "..............................", ".........................#....", ".#............................", ".............#................", "..............................", "..............................", ".......................#......", ".............#................"}

    Returns: 5020791386

  9. {"..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".............................."}

    Returns: 12829539100

  10. {"..............................", "..............................", "............#.................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".............................."}

    Returns: 12570541186

  11. {"..............................", "..............................", "..............................", "..............................", "..............................", "......#.......................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "...........#..................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".............................."}

    Returns: 11459855221

  12. {".#............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".........................#....", "......#.......................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".............................."}

    Returns: 11396125202

  13. {"..............................", "......................#.......", "..............................", "..............................", "..............................", "..............................", "..............................", "...........#..................", "..............................", "..............................", "..............................", "......#.......................", "..............................", "..............................", ".......................#......", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".............................."}

    Returns: 10872681893

  14. {"......................#.......", "..............................", "#.............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".............#................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".......#.........#............", "..............................", "..............................", "..............................", ".............................."}

    Returns: 10545124390

  15. {"..............................", "..............................", "..............................", "..............................", "............................#.", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "......................#.......", "..............................", "..............................", ".............#................", "........#.....................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..........#..........#........", "..............................", "..............................", ".............................."}

    Returns: 9381992709

  16. {"..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".#............................", ".................#.........#..", "..............................", "..............................", "..............................", "..............................", ".......#......................", "..............................", "..............................", "..............................", "..............................", "........#.....................", "......................#.......", "..............................", ".#............................", ".............................."}

    Returns: 8800087395

  17. {"..............................", "......................#.......", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".......#......................", ".........#....................", "..............................", "..............................", "..............................", "............#.................", "..............................", "............#.................", "..............................", "...............#..............", "..............................", "..............................", "..............................", "...#..........................", "..............................", "..............................", "..............................", "..............................", ".....#........................", "..............................", ".............................."}

    Returns: 8183283808

  18. {"..............................", "...................#..........", "..............................", ".............#................", "..............#...............", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "......................#.......", ".............................#", ".#............................", "..............................", "..........................#...", "..............................", "......................#.......", "..............................", "..............................", "..............................", "..............................", "..............................", "......#......................."}

    Returns: 9188643895

  19. {"..............................", "................#.............", "..............................", "..............................", "..............................", "..........................#...", "..................#...........", "..............................", "..............................", "............................#.", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "............#.................", "..............................", "..............................", "..............................", "..............................", "..............................", "............#.................", "....#.........................", "..............................", "..........#...................", "..............................", ".........#.......#............", ".............................."}

    Returns: 8074313434

  20. {"..............................", ".............................."}

    Returns: 27405

  21. {"..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "..", ".."}

    Returns: 27405

  22. {"..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".............................."}

    Returns: 11159014545

  23. {".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", ".............................", "............................."}

    Returns: 11159014545

  24. {".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", ".........................", "........................."}

    Returns: 2407598600

  25. {"....................", "....................", "....................", "....................", "....................", "....................", "....................", "....................", "....................", "....................", "....................", "....................", "....................", "...................."}

    Returns: 99235955

  26. {".#.#......#.#...#..#...#", "...###........#...#..#.#", ".....#..###........#....", ".#..#....#...#.....#....", "..................#.....", ".#.....##.....#..#......", ".....#.#.......#.......#", "..###........#.#....#...", ".............##...#.#...", ".............#..#.....#.", ".#.........###..........", "..###..###........#.#..#", "##........#............#", "..#..#....##..##...#.#..", "...#.#.....#...#.#....#.", "#.##...#.#.#........#..#", ".....#.#...#..#.##...#.#", "...#..#..#..#.#.#......#", "#........#.....#..##..##", "..#.##......#......##..."}

    Returns: 2558202

  27. {"#################.####", "######################", "######################", "######################", "######################", "######################", "######################", "######################", "######################", "######################", "######################", "######################", "######################", "######################", "######################", "######################", "######################", "######################", "####################.#", "######################", "######################", "######################", "######################", "######################"}

    Returns: 0

  28. {"................", "...#............", "......#.#....#..", "......#........#", "....##...#..#.##", "..#....##.....#.", "......#........#", "##.......#...#..", "..#.......#.....", "...#....##......", "...#....#......#", ".#.#.....#......", "....#..#...#....", "#..#........#.#.", "........#....#..", ".#....#.........", ".....##..###...#", "..........####..", "##..#.....#....#", "..............#.", "...#......##....", "..#.......#.#..#", "...#...........#"}

    Returns: 1821957

  29. {"#########.", "#.#######.", "######...#", "#.########", "#.####.###", "#.###..###", "#########.", "##########", "#....##.##", "###..####.", "##.#.####.", "..##.....#", "..#####.##", "##.##.####", "###.###.##", "##.#.#.##.", "#######..#"}

    Returns: 17

  30. {".####.#####..#############", "#########.################", "###########.#.##.##.#####.", "#######.###.##########.###", ".########.########.#####.#", "########################.#", "#.#.######################"}

    Returns: 0

  31. {"#...#.#.#..#", "##.##..###..", ".#.#..######", "##.###.#.##.", "..#.###.####", "#######.##.#", "##.##.#.#..#", "##.#..#..#..", "#.####..###.", "#...#.####..", "#..#..#...#.", "####..####.#", "#.#....#####", "##.#...#.###", ".#..##...#.#", "...###....#.", "#.###...#.#.", "...#....#.##", ".##.#.#..##.", "..#..#.#...#", "#.##........", ".#.#.#.#.##.", ".##..##....#", "#.#..##.#...", ".#.##.#####.", "#.###...#.#."}

    Returns: 4592

  32. {"###.#.##...#", "##.##.###..#", "#..##.####..", "###.###..###", "###...#...##", ".##..#...#.#", ".......#.###", "##....#...##", "#...##....#.", "#..###...#..", "#.##..#.###.", "..##..#..#.#", ".#......#.#.", "..##.######.", "##.#..##.###", ".....##.#.#.", "#.#...#.#.##", ".##...#####.", ".#.#....###.", "..........#.", "..#.##..#...", "####......#.", ".#..####....", "#...#.#...##", "..###.###.#.", "#.#.###...#.", "####.##..##."}

    Returns: 23562

  33. {"#.###.", "....##", "###.#.", "#.##..", ".#.##.", "#.##.#", "##....", "##.#.#", "...#.#", ".#.###", "#....#", "#.####", "..#...", "#.##.#", "#..#.#", "..###.", "##.##.", "....##", ".##..."}

    Returns: 115

  34. {".#.#.####..#####..###.", "..#####..#############", "######.######.####.###", ".#.##.###..#.##.###.#.", "#....#.#####.#####.###", ".##.####..########.#.#", "#.########.#####.####.", "..#..############..###"}

    Returns: 2

  35. {"......#...........#...........", ".....................#........"}

    Returns: 10629

  36. {".#############################", "..############################", "#..###########################", "##..##########################", "###..#########################", "####..########################", "#####..#######################", "######..######################", "#######..#####################", "########..####################", "#########..###################", "##########..##################", "###########..#################", "############..################", "#############..###############", "##############..##############", "###############..#############", "################..############", "#################..###########", "##################..##########", "###################..#########", "####################..########", "#####################..#######", "######################..######", "#######################..#####", "########################..####", "#########################..###", "##########################..##", "###########################..#", "############################.."}

    Returns: 378

  37. {"..############################", "...###########################", "#...##########################", "##...#########################", "###...########################", "####...#######################", "#####...######################", "######...#####################", "#######...####################", "########...###################", "#########...##################", "##########...#################", "###########...################", "############...###############", "#############...##############", "##############...#############", "###############...############", "################...###########", "#################...##########", "##################...#########", "###################...########", "####################...#######", "#####################...######", "######################...#####", "#######################...####", "########################...###", "#########################...##", "##########################...#", "###########################...", "############################.."}

    Returns: 8677

  38. {"############################..", "###########################...", "##########################...#", "#########################...##", "########################...###", "#######################...####", "######################...#####", "#####################...######", "####################...#######", "###################...########", "##################...#########", "#################...##########", "################...###########", "###############...############", "##############...#############", "#############...##############", "############...###############", "###########...################", "##########...#################", "#########...##################", "########...###################", "#######...####################", "######...#####################", "#####...######################", "####...#######################", "###...########################", "##...#########################", "#...##########################", "...###########################", "..############################"}

    Returns: 406

  39. {".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#."}

    Returns: 0

  40. {"##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################", "##############################"}

    Returns: 0

  41. {"..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#"}

    Returns: 768106850

  42. {"..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#."}

    Returns: 667002700

  43. {".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", "..............................", ".#.#.#.#.#.#.#.#.#.#.#.#.#.#.#", ".............................."}

    Returns: 884517200

  44. {"#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", "..............................", "#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.", ".............................."}

    Returns: 768106850

  45. {"##", "##"}

    Returns: 0

  46. {"...", "...", "..."}

    Returns: 4

  47. {".##", "..#", "#.."}

    Returns: 0

  48. {".#########", "..########", "#..#######", "##..######", "###..#####", "####..####", "#####..###", "######..##", "#######..#", "########.."}

    Returns: 28

  49. {".########", ".########", ".########", ".########", ".....####", "####.####", "####.####", "####.####", "####....."}

    Returns: 240

  50. {".#.#", "...."}

    Returns: 1

  51. {".#", "..", ".#", ".."}

    Returns: 1

  52. {"...", ".#.", "..."}

    Returns: 0

  53. {"..##..", "......", "..##.."}

    Returns: 29

  54. {"....", ".##.", ".##.", "....", ".##.", ".##.", "...."}

    Returns: 54

  55. {"#.##..#...##..#.###..##.#.##.#", "####..#.....#...#.#..#..#.###.", "#..##.###..###.####.###...###.", ".#.....###.......#..###...#..#", "..#.##.#######.##..##.##..###.", "#..#...##.#....###.####.##...#", "#.#....#......##..##.#..##.###", "#.....###......#.###.#..######", "##########..##.#####.#.#...##.", "##.#..#.....##........###....#", "....#....######...#...##..#...", "##..###..####....###....###.##", "##.####..###.#..#..##.#..#..##", "#...###...#..##...####.####.#.", "#.###..#.##.####.#..#....##..#", "#..###.##.#...##.##..#..#.#..#", ".###...#..###..#..#####...#.#.", "##...###.##..#.....##...######", "...####.#...####..##.#..#....#", "..####....#..#..####..##..#.#.", "#..#.#.##.####.##..##.##.#.#.#", ".##.###.##.###..#.#....#.#.#.#", "...#...#.##.#####.##.#.##.####", ".#.#...#...#.###...#..#.###...", "####.....###...#..#..#..#..#.#", "..##....##.#.###.#..#.##.#.##.", "#..#...#..###...#.##.....###.#", ".#..###...#.#.#.###.#.#.##.###", "#.#.#.###..#.###.####.....###.", "#...#.#...#######.....#...##.#" }

    Returns: 61669

  56. {"...#..........................", "..............................", "..............................", "..................#...#.......", "..................#...........", "..............................", "...........#..................", "..............................", ".....#..#.....................", ".......................#......", "..................#.....#.....", "..............................", "..............................", "..............................", "..............................", "..#...........................", "..............................", "..............................", "..............................", "#............................#", "..............................", ".....#.........#............#.", "..............................", ".........................#....", ".#............................", ".............#................", "..............................", "..............................", ".......................#......", ".............#................" }

    Returns: 5020791386

  57. {"..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", "..............................", ".............................." }

    Returns: 12829539100

  58. {"#......", ".#....#", ".#.#...", "#....#.", ".##..#.", ".#.....", ".....#.", ".#.#...", ".#...#.", "..##..." }

    Returns: 2386


This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2024, TopCoder, Inc. All rights reserved.
This problem was used for: