407115: GYM102697 086 Symmetry
Description
Bob has an array of integers, and Bob is curious whether or not his array is symmetrical on two axis of symmetry. Write a program that takes in an array of integers and outputs whether or not the array is symmetrical. The two axis of symmetry are the horizontal and the vertical. It is important to note that if an odd number of columns or rows is present, the middle row and/or column(s) should be considered the axis and should be completely ignored in the symmetry analysis. Integers are considered symmetrical if they are the same value across an axis of symmetry. Your program should only output "True" if the array is symmetrical on both the horizontal and vertical axis of symmetry.
InputThe first line contains two space separated integers, $$$R$$$ and $$$C$$$, respectively. These represent the number of rows and columns that are in the array. The next $$$R$$$ lines will each contain $$$C$$$ space-separated integers that represent the individual elements of the array.
OutputA single statement of "True" or "False" that indicated whether or not the array is symmetrical.
ExamplesInput5 5 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1Output
TrueInput
3 3 1 1 1 0 1 0 1 0 1Output
True