C++with O[B] constructor and Q[1] pick
\'\'\'class Solution {\n    private:\n     int n;\n    map  m ;\npublic:\n    Solution(int N, vector blacklist) {\n        n=N-blacklist.size();\n        vector
\'\'\'class Solution {\n    private:\n     int n;\n    map<int,int>  m ;\npublic:\n    Solution(int N, vector<int> blacklist) {\n        n=N-blacklist.size();\n        vector<int> t;//=blacklist;\n        int   j=0; \n        for(int  i=0;i < blacklist.size() ;i++)\n#         {\n            m[blacklist[i]]=blacklist[i];\n        }\n\n        \n         for(int  i=n;i < N;i++)\n         {\n             if(m.count(i)==0)\n                 t.push_back(i);   \n         }\n          for(int  i=0;i < blacklist.size() ;i++)\n        {\n            if(blacklist[i]<n)\n            {\n                m[blacklist[i]]=t[j];\n                j++;\n            }   \n        }   \n    }\n    int pick() {\n     int  t=rand()%n;\n        if(m.count(t)==1)\n            return m[t];\n     return  t;\n    }\n};\'\'\'
[]