vector> flipAndInvertImage(vector >& A) { for (auto & row : A) reverse(row.begin(), row.end()); for (auto & row : A) for (int & i: row) i^=1; return A;}
本文共 294 字,大约阅读时间需要 1 分钟。
vector> flipAndInvertImage(vector >& A) { for (auto & row : A) reverse(row.begin(), row.end()); for (auto & row : A) for (int & i: row) i^=1; return A;}
转载于:https://www.cnblogs.com/lvcoding/p/9043836.html