CPP Solution
\n\n# Code\n\nclass Solution {\npublic:\n    int totalRow,totalCol;\n    int row,col;\n    Solution(int m, int n) {\n        totalRow=m;\n        totalCol=n;\n 
\n\n# Code\n```\nclass Solution {\npublic:\n    int totalRow,totalCol;\n    int row,col;\n    Solution(int m, int n) {\n        totalRow=m;\n        totalCol=n;\n        row=0;\n        col=0;\n    }\n    \n    vector<int> flip() {\n        col++;\n        if (col==totalCol)\n        {\n            col=0;\n            row++;\n        }\n        if (row==totalRow)\n        {\n            row=0;\n            col=0;\n        }\n        return {row,col};\n    }\n    \n    void reset() {\n        \n    }\n};\n\n/**\n * Your Solution object will be instantiated and called as such:\n * Solution* obj = new Solution(m, n);\n * vector<int> param_1 = obj->flip();\n * obj->reset();\n */\n```
['C++']