C++ Easy BItmask DP Clean Implementation.
\nclass Solution {\npublic:\n    vector<int> smallestSufficientTeam(vector<string>& req_skills, vector<vector<string>>& people) {\n        map<string,int> m1;\n
```\nclass Solution {\npublic:\n    vector<int> smallestSufficientTeam(vector<string>& req_skills, vector<vector<string>>& people) {\n        map<string,int> m1;\n        int pos = 0;\n        for(string s : req_skills) m1[s] = pos++;\n        \n        int n = people.size();\n        int m = req_skills.size();\n        \n        vector<long long> peop(n);\n        for(int i =0;i<n;i++){\n            for(auto s :people[i] ){\n                peop[i] |= 1LL << (m1[s]);\n            }\n        }\n        vector<long long> dp(1 << m,1e18);\n        vector<long long> sol(1 << m,0);\n        dp[0] = 0;\n        for(int p = 0;p<n;p++){\n            vector<long long> ndp = dp;\n            for(int i = 0;i < 1LL << m ;i++){\n                int next = i | peop[p];\n                if(ndp[next] >  1 + dp[i] ){\n                    ndp[next] = 1 + dp[i];\n                    sol[next] = sol[i] | (1LL << p);\n                }\n            }\n            swap(ndp,dp);\n        }\n        vector<int> ans;\n        long long val = sol.back();\n        for(int i = 0; i < n; i++ ){\n            if (val>>i&1){\n                ans.push_back(i);\n            }\n        }\n        return ans;\n    }\n};\n```
[]