离散数学中双射的概念(映射+单射+满射) C++中的stringstream C++中的正则表达式也可以用来提取单词 class Solution { public: bool wordPattern(string pattern, string s) { vector<string> words; stringstream ss(s); string word; while(ss >> word) words.push_back(word); if(words.size() ...