give n x n binary matrix image flip image horizontally invert return result imageto flip image horizontally mean row image reversedFor example flip 110 horizontally result 011to invert image mean 0 replace 1 1 replace 0for example invert 011 result 100 example 1input image 110101000output 100010111explanation first reverse row 011101000then invert image 100010111example 2input image 1100100101111010output 1100011000011010explanation first reverse row 0011100111100101then invert image 1100011000011010 Constraintsn imagelengthn imageilength1 n 20imagesij 0 1