bitset as table||24 ms Beats 99.41%
Intuition\n Describe your first thoughts on how to solve this problem. \nUse bitset to record the alphabets appearing in allowd. Then transverse all strings in 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nUse bitset to record the alphabets appearing in allowd. Then transverse all strings in words.\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. Use bitset ASet to record the letters in `allowed`.\n2. Transverse all strings w in `words `\n3. To see whether w is `consistent` or not, add `cnt+=consisited`\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n$O(|allowed|+\\sum_{w:Words}|w|)$\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$O(26)$\n# Code\n```cpp []\nclass Solution {\npublic:\n    int countConsistentStrings(string& allowed, vector<string>& words) {\n        bitset<26> ASet=0;\n        for(char c: allowed)\n            ASet[c-\'a\']=1;\n        int cnt=0;\n        for(string& w: words){\n            bool consistent=1;\n            for(char c: w){\n                if (ASet[c-\'a\']==0){\n                    consistent=0;\n                    break;\n                }\n            }\n            cnt+=consistent;\n        }\n        return cnt;\n    }\n};\n\n\n\nauto init = []() {\n    ios::sync_with_stdio(false);\n    cin.tie(nullptr);\n    cout.tie(nullptr);\n    return \'c\';\n}();\n```
['Array', 'Bit Manipulation', 'C++']