[C++] DP 32ms DP solution. Easy to implement
Idea: Use DP to store the minimal number of workers needed to cover the binary mask state.  Loop through the states from 0 to 2^n-1. For each state, try to add 
Idea: Use DP to store the minimal number of workers needed to cover the binary mask state.  Loop through the states from 0 to 2^n-1. For each state, try to add each worker. Update dp if it is smaller than current value.\ntime complexity O(m*n^2)\nspace complexity O(n^2)\n```\nclass Solution {\npublic:\n    vector<int> smallestSufficientTeam(vector<string>& req_skills, vector<vector<string>>& people) {\n        unordered_map<string,int> skills;\n        int n = req_skills.size();\n        for (int i = 0; i < req_skills.size(); ++i)\n            skills[req_skills[i]] = i;\n        int m = people.size();\n        vector<int> people_skill(m);\n        for (int i = 0; i < m; ++i)\n            for (int j = 0; j < people[i].size(); ++j){\n                int temp = skills[people[i][j]];\n                people_skill[i]|=(1<<temp);\n        }\n         int s = 1<<n; \n        vector<int> dp(s, INT_MAX);\n        vector<int> parent(s,-1);\n        vector<int> parent_state(s);\n        dp[0] = 0;\n        for (int i=0; i <(1<<n); ++i)\n            for (int j = 0; j < m; ++j){\n                if (dp[i]==INT_MAX) continue;\n               int temp = i | people_skill[j];\n               if (dp[temp]>dp[i]+1) {parent[temp]=j; parent_state[temp]=i; dp[temp]=dp[i]+1;}         \n        }\n       \n        int temp = (1<<n) -1;\n        vector<int> ret;\n        while (parent[temp]!=-1){\n            ret.push_back(parent[temp]);\n            temp = parent_state[temp];\n        }\n        \n        return ret;\n    }\n};\n```
[]