bitmap of zeros and ones. Apply two operations and return the result:
1. mirror the picture horizontally, so each row is reversed;
2. negate it, so every 0 becomes 1 and every 1 becomes 0.bitmap=[[1, 0, 0], [0, 1, 1], [1, 1, 1]] → [[1, 1, 0], [0, 0, 1], [0, 0, 0]]
Mirrored rows: [0,0,1], [1,1,0], [1,1,1]. After negating: [1,1,0], [0,0,1], [0,0,0].
bitmap=[[0, 1], [0, 0]] → [[0, 1], [1, 1]]
[0,1] → [1,0] → [0,1]; [0,0] → [0,0] → [1,1].
bitmap=[[1]] → [[0]]
len(bitmap) == len(bitmap[i]) == nbitmap[i][j] is 0 or 1bitmap=[[1, 0, 0], [0, 1, 1], [1, 1, 1]]
[[1, 1, 0], [0, 0, 1], [0, 0, 0]]
Run checks the first 3 tests in your browser. Submit checks all 56 tests on the server, hidden ones included.