[C++] Simple Solution
Code
# Code
```cpp []
class Solution {
public:
    bool areSimilar(vector<vector<int>>& mat, int k) {
        int m = mat.size();
        int n = mat[0].size();

        k %= n;
        if(k==0) return true;

        vector<vector<int>> tmp(m, vector<int>(n, 0));

        int oddIdx = k;
        int evenIdx = 0;
        while(k-->0) {
            evenIdx--;
            if(evenIdx == -1) {
                evenIdx = n-1;
            }
        }

        for(int i=0; i<m; i++) {
            int mj = (i%2==0) ? evenIdx : oddIdx;
            for(int j=0; j<n; j++) {
                tmp[i][j] = mat[i][mj];
                mj++;
                if(mj == n) mj = 0;
            }
        }

        for(int i=0; i<m; i++) {
            for(int j=0; j<n; j++) {
                if(mat[i][j] != tmp[i][j]) return false;
            }
        }

        return true;
    }
};
```
['C++']