class Solution {
public:
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
*
* @param ID int整型vector
* @param content string字符串vector
* @param word string字符串
* @return int整型vector
*/
vector<int> invertedIndex(vector<int>& ID, vector<string>& content, string word) {
vector<int> res{};
int n = ID.size();
for (int i = 0; i < n; i++) {
if (content[i].find(word) != string::npos) {
res.push_back(ID[i]);
}
}
return res;
}
};