LearnPy Hub
← Arena
EasyRating 1000

Flip and Invert

For a 0/1 image, reverse each row and then invert every bit. Print the result.

Input

r c, then r lines.

Output

r lines.

Sample 1

Input
3 3
1 1 0
1 0 1
0 0 0
Output
1 0 0
0 1 0
1 1 1

Sample 2

Input
1 1
1
Output
0
solution.py
Output appears here
Flip and Invert · Python Arena problem · LearnPy Hub