Untitled
unknown
plain_text
5 years ago
382 B
8
Indexable
#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);
}Editor is loading...