Problem Statement
"4Blocks" is a two player cooperative game played on a special board. The board is a grid composed of 1x1 square cells. The grid is two cells high. There are two different kinds of blocks: '1' blocks and '4' blocks. '1' blocks are 1x1, and '4' blocks are 2x2:

You must place blocks on the board so that their sides are aligned to the grid lines and no two blocks overlap. The final score is the sum of the values in each cell. '1' blocks are worth 1 point, and '4' blocks are worth 16 points because they cover 4 cells and each cell is worth 4 points.
Your friend has taken his turn and placed a number of '1' blocks on the board. The current configuration is given in the

The final score would be 4*16 + 6*1 = 70.
Definition
- Class:
- FourBlocksEasy
- Method:
- maxScore
- Parameters:
- String[]
- Returns:
- int
- Method signature:
- int maxScore(String[] grid)
- (be sure your method is public)
Constraints
- grid will contain exactly 2 elements.
- Each element of grid will contain between 1 and 50 characters, inclusive.
- All elements of grid will contain the same number of characters.
- Each element of grid will contain only '.' or '1' (one).
Examples
{".....1..1..", "..1.....1.."}
Returns: 70
This is the example from the statement.
{"....................", "...................."}
Returns: 160
We can fit ten '4' blocks in this setup.
{".1.........11.........", "..1.1......11........."}
Returns: 128
{".", "."}
Returns: 2
{"......1.....1...1.", ".................."}
Returns: 108
{"..", ".."}
Returns: 16
{"........................1....", "...............1..........1.."}
Returns: 202
{".........................................", "....................1...................."}
Returns: 322
{"..............................1...........", "....................1....................."}
Returns: 312
{".........1.1................", "...1........................"}
Returns: 188
{"......1...........1.............1.....1......", ".................1.....1....................."}
Returns: 318
{"...11..1....................", "..............1............."}
Returns: 188
{"......................1..........1.", ".1........1......1....1............"}
Returns: 238
{".1.1.............1.......1..............", "........1........................1......"}
Returns: 260
{".....1.........................................", "....1.....1.1.......1..1......................."}
Returns: 322
{"...............................1...............1", ".........................1..........11.........1"}
Returns: 336
{"...1..11.......1....1....", ".1.11.....1.1.........1.."}
Returns: 110
{"1....1......1...1..........1.......", ".......1...1............1111.1....."}
Returns: 178
{".........1..1...1..111............1.....1..", ".1......1.......1..1...................1..."}
Returns: 266
{"........11..1.....1.1.1................", "..1.......1...1......1...1.1...11....1."}
Returns: 174
{"..1.....1.....1.....1........1...1.1....1...", "1........1....1..1.....1......1..11..11....."}
Returns: 220
{"..11..1..1..1...1...1.1..1.11.....1...1...", "1..1.11.....1.1..11..1..1111.....1..1...1."}
Returns: 132
{"....11...1..1...1.1111.1..1..11.1.11..", "..1.11.....1..1...11....1111..1.1..11."}
Returns: 100
{"111......11..1.1.1.1.1..1.1.1.1....11.", "....11.111..1.111..111...1.1...1111.11"}
Returns: 88
{"..1..11..1......11.1....1......1..1.1.1.1", "...1.1.1....11..1.1.111.11..111..1.1...1."}
Returns: 130
{".1.1..1....1.11..1.1..1....1...1", "1..1..11.11....1...1.....1.1..1."}
Returns: 112
{".1.111.1.111..11.111.1.11..1...1.1..1.1...1...", "1....11.1111....1........1.111.1.....111.11.11"}
Returns: 116
{"1..1.111.111....11.11...11.", "1.1111...111...1..1.1111.11"}
Returns: 66
{"11111..1..1.1111..1.11.11111..111...1..", "1.1..1.1.11..11111.11.1.1..1.1111..1.1."}
Returns: 90
{"..11.11111.1.111....11..1.111", "......1.11...1.1.11.1.1111.11"}
Returns: 70
{"1111111...1.1111...11...11.111.1.11..11", ".1...111..11..1.1.111...111.1.1.1.1..1."}
Returns: 114
{"111.111.1111111111111111.111.1.", "....111111111111.1111.1111.1..1"}
Returns: 62
{"11.1.11.11111.1.11111111.11.111.1.1111", "111..11111111111.1..111111111111111111"}
Returns: 76
{"1111.1.1111.11.11.11.1111111..111.111.1111111", "11111.11111111111111111111.111111111111.11111"}
Returns: 90
{"111111.1111.111.1111111...111", "11111111..11111.11..11111.1.1"}
Returns: 58
{"11111111111111111.11111111111111.11.111111", ".11111111111111.1.111.11.11111.111.11.1111"}
Returns: 84
{"11111111111111111111111111111111111111111", "11111111111111111111111111111111111111111"}
Returns: 82
{"1111111111111111111111111", "1111111111111111111111111"}
Returns: 50
{"11111111111111111111111111111111111111111111111111", "11111111111111111111111111111111111111111111111111"}
Returns: 100
{"11111111111111111111111111111111111111", "11111111111111111111111111111111111111"}
Returns: 76
{"111111111111111111111111111111111", "111111111111111111111111111111111"}
Returns: 66
{".1.1.1.1.1.1.1.1.1", ".1.1.1.1.1.1.1.1.1" }
Returns: 36
{".1.........11.........", "..1.1......11........." }
Returns: 128
{".1.....1.1.1.1...........1........................", ".1.......1.1.1.1................................1." }
Returns: 304
{"......1.....1...1.", ".................." }
Returns: 108
{"11", "11" }
Returns: 4
{"..1", ".1." }
Returns: 6
{"1.", "1." }
Returns: 4
{".", "." }
Returns: 2
{".....", "....." }
Returns: 34
{"11111", "....." }
Returns: 10
{"..................................................", ".................................................." }
Returns: 400
{"1", "1" }
Returns: 2
{"1", "." }
Returns: 2