problem
solution1:
class Solution { public: vector<vector<int>> flipAndInvertImage(vector<vector<int>>& A) { int m = A.size(), n = A[0].size(); vector<vector<int>> res(m); for(int i=0; i<m; ++i) { for(int j=0; j<n; ++j) { res[i].push_back(!A[i][n-1-j]);//errr... } } return res; } };
参考
1. Leetcode_easy_832. Flipping an Image;
2. grandyang;
完