Statistics

Problem Statement for "ThreeLLogo"

Problem Statement

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

A yet unknown "LLL Company" wants to design a logo. After a long discussion, company designers decided that the logo should consist of three 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 three 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 three 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:
ThreeLLogo
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: 12

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

    Returns: 37800

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

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

    Returns: 27750

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

    Returns: 2178497179123

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

    Returns: 441651982378068

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

    Returns: 427874762760002

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

    Returns: 377561621299687

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

    Returns: 373661609013076

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

    Returns: 347880742350076

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

    Returns: 333865253226548

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

    Returns: 285096957115757

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

    Returns: 257190637445330

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

    Returns: 235039876717286

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

    Returns: 267228624510031

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

    Returns: 226022905803559

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

    Returns: 593775

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

    Returns: 593775

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

    Returns: 357484775736816

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

    Returns: 357484775736816

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

    Returns: 34878584048000

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

    Returns: 268796751132

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

    Returns: 1589840849

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

    Returns: 0

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

    Returns: 938340538

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

    Returns: 4

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

    Returns: 0

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

    Returns: 109708

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

    Returns: 1160778

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

    Returns: 330

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

    Returns: 0

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

    Returns: 198296

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

    Returns: 2925

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

    Returns: 313961

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

    Returns: 3654

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

    Returns: 0

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

    Returns: 0

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

    Returns: 6116303625978

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

    Returns: 4926158771716

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

    Returns: 7593366441920

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

    Returns: 6116303625978

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

    Returns: 0

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

    Returns: 28

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

    Returns: 0

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

    Returns: 35

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

    Returns: 576

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

    Returns: 1

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

    Returns: 1

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

    Returns: 0

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

    Returns: 12

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

    Returns: 324

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

    Returns: 281188935704201

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

    Returns: 42171807691266

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

    Returns: 441651982378068


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: