C++ :Short Unordered_map solution
\nclass Solution {\npublic:\n    \n    int n;\n    int m;\n        \n    unordered_map<int,unordered_map<int,int>> temp;\n    \n    Solution(int n_rows, int n_c
```\nclass Solution {\npublic:\n    \n    int n;\n    int m;\n        \n    unordered_map<int,unordered_map<int,int>> temp;\n    \n    Solution(int n_rows, int n_cols) {\n        n = n_rows;\n        m = n_cols;\n    }\n    \n    vector<int> flip() {  \n        int a = rand()%n;\n        int b = rand()%m;\n        while(temp[a][b]){\n            a = rand()%n;\n            b = rand()%m;\n        }\n        temp[a][b]=1;\n        vector<int> out{a,b};\n        return out;\n    }\n    \n    void reset() {\n        temp.clear();\n    }\n};\n```
[]