Battleship
"Battleship" game. Danabek plays in "Battleship" game. Field of the game is always a square with 10x10 cells. Cells that have been already fired are marked. However, Danabek did not fired any enemy ship yet. Your task is to determine the maximum length of a ship that can fit into unfired cells. The ship is a rectangle size with 1 cell width and can be placed horizontally or vertically. (It is guaranteed that the game field has at least one unfired cell). Input Inputed 10 rows that consist ouf of 10 values each, the numbers are separated by one white space. Number 1 means that the cell is fired, number 0 - that the cell is not fired yet. Output Output number between 1 and 10 - the maximum length of the ship that can be placed into unfired cells. Samples: Input 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 Output: 9 https://code.sololearn.com/cv8xGX0Xuk2P/?r