Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <set>
- #include <string>
- #include <numeric>
- using namespace std;
- string FoldWithMinus(string left, string right) {
- return left + " -"s + right;
- }
- string AddStopWords(const string& query, const set<string>& stop_words) {
- return query + std::accumulate(stop_words.begin(), stop_words.end(), ""s, FoldWithMinus);
- }
Advertisement
Add Comment
Please, Sign In to add comment