C++ map method
\nmap<pair<int,int>,bool> points;\n    int m;\n    int n;\n    Solution(int n_rows, int n_cols) {\n        m=n_rows;\n        n=n_cols;\n    }\n    \n    vector
```\nmap<pair<int,int>,bool> points;\n    int m;\n    int n;\n    Solution(int n_rows, int n_cols) {\n        m=n_rows;\n        n=n_cols;\n    }\n    \n    vector<int> flip() {\n        int total=rand()%(m*n);\n        int x=total/n;\n        int y=total%n;\n        pair<int,int> temp=make_pair(x,y);\n        while(points[temp]==true)\n        {\n            total=rand()%(m*n);\n            x=total/n;\n            y=total%n;\n            temp=make_pair(x,y);\n        }\n        points[temp]=true;\n        vector<int> result{x,y};\n        return result;\n    }\n    \n    void reset() {\n       points.clear();\n    }\n```
[]