C++ short and simple in-place solution
\nclass Solution {\npublic:\n    vector<vector<int>> flipAndInvertImage(vector<vector<int>>& A) {\n        for (int i=0; i<A.size(); i++) {\n            reverse
```\nclass Solution {\npublic:\n    vector<vector<int>> flipAndInvertImage(vector<vector<int>>& A) {\n        for (int i=0; i<A.size(); i++) {\n            reverse(A[i].begin(), A[i].end());\n            for (int j=0; j<A[i].size(); j++) {\n                A[i][j] ^= 0x1;\n            }\n        }\n        return A;\n    }\n};\n```
['C', 'C++']