{"raw_statement":[{"iden":"statement","content":"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.\n\nThe 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.\n\nA single statement of \"True\" or \"False\" that indicated whether or not the array is symmetrical.\n\n"},{"iden":"input","content":"The 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."},{"iden":"output","content":"A single statement of \"True\" or \"False\" that indicated whether or not the array is symmetrical."},{"iden":"examples","content":"Input5 5\n1 0 1 0 1\n0 1 0 1 0\n1 1 1 0 1\n0 1 1 1 0\n1 0 1 0 1\nOutputTrue\nInput3 3\n1 1 1\n0 1 0\n1 0 1\nOutputTrue\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ R, C \\in \\mathbb{Z}^+ $ denote the number of rows and columns of the array.  \nLet $ A = (a_{i,j}) \\in \\mathbb{Z}^{R \\times C} $ be the input array, with $ i \\in \\{1, \\dots, R\\} $, $ j \\in \\{1, \\dots, C\\} $.\n\n**Constraints**  \n1. $ R \\geq 1 $, $ C \\geq 1 $\n\n**Objective**  \nThe array $ A $ is symmetrical on **both** horizontal and vertical axes if:\n\n- **Vertical symmetry**: For all $ i \\in \\{1, \\dots, R\\} $, and for all $ j \\in \\{1, \\dots, \\lfloor \\frac{C-1}{2} \\rfloor \\} $,  \n  $$\n  a_{i,j} = a_{i, C+1-j}\n  $$\n\n- **Horizontal symmetry**: For all $ j \\in \\{1, \\dots, C\\} $, and for all $ i \\in \\{1, \\dots, \\lfloor \\frac{R-1}{2} \\rfloor \\} $,  \n  $$\n  a_{i,j} = a_{R+1-i,j}\n  $$\n\nOutput \"True\" if both conditions hold; otherwise, output \"False\".","simple_statement":"Check if a 2D array is symmetric both horizontally and vertically. Ignore the middle row and column if their count is odd. Output \"True\" if symmetric on both axes, otherwise \"False\".","has_page_source":false}