题意:英语老师留了 N 篇阅读理解作业,但是每篇英文短文都有很多生词需要查字典,为了节约时间,现在要做个统计,算一算某些生词都在哪几篇短文中出现过。
思路:建立一个string映射到set的映射
#include <bits/stdc++.h>
using namespace std;
map<string,set<int> > mp;
set<int>::iterator it;
题意:英语老师留了 N 篇阅读理解作业,但是每篇英文短文都有很多生词需要查字典,为了节约时间,现在要做个统计,算一算某些生词都在哪几篇短文中出现过。
思路:建立一个string映射到set的映射
#include <bits/stdc++.h>
using namespace std;
map<string,set<int> > mp;
set<int>::iterator it;