Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- author: MrS4g0
- created: 10.11.2021 12:47:29
- */
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- set<char> vowels = { 'A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o','u' };
- int n;
- cin >> n;
- vector<string> str_in(n);
- for (auto& it : str_in) {
- cin >> it;
- }
- cout << "\nWords without vowels:\n";
- for (auto& it : str_in) {
- set<char> tmp(it.begin(), it.end());
- set<char> intersect;
- set_intersection(tmp.begin(), tmp.end(),
- vowels.begin(), vowels.end(),
- inserter(intersect, intersect.begin()));
- if (intersect.empty()) {
- cout << it << '\n';
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment