seastar
Member
Bài dễ thì phải làm cho nó khó lên, để người khác đọc vào thấy khó hiểu, nguy hiểm,
C++:
class Solution {
public:
int countConsistentStrings(string allowed, vector<string>& words) {
return accumulate(words.begin(), words.end(), 0, [s = set(allowed.begin(), allowed.end())] (int acc, const string& word) {
return acc + all_of(word.begin(), word.end(), [&s] (int c) { return s.count(c); });
});
}
};

hay 1k5 là đáy xã hội rồi
.



