class Solution {
public:
vector<vector<int>> flipAndInvertImage(vector<vector<int>>& A) {
vector<vector<int>>B;
vector<int>s,t;
for(int i = 0;i<A.size();i++)
{
s = A[i];
t.clear();
for(int j = s.size()-1;j>=0;j--)
{
t.push_back(s[j]^1);
}
B.push_back(t);
}
return B;
}
};