网址:https://leetcode.com/problems/camelcase-matching/
依题意可得逻辑
class Solution { public: vector<bool> camelMatch(vector<string>& queries, string pattern) { vector<bool> ans; int i = 0; int flag = 0; // didn't pushed for(string s : queries) { i = 0; flag = 0; for(char ch : s) { if(ch == pattern[i]) i++; else { if((ch-'a')>=0 && (ch-'a')<=26) continue; else { ans.push_back(false); flag = 1; break; } } } if(!flag) { if(i == pattern.size()) ans.push_back(true); else ans.push_back(false); } } return ans; } };