这题没什么 就考一下map的用法吧
#include <iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<map>
using namespace std;
map<string,int>q;
int f[];
char s1[][],ss[];
int o[],p[];
int main()
{
int i,j,n,k,t;
scanf("%d",&n);
for(i = ; i <= n ;i++)
{
scanf("%s",s1[i]);
q[s1[i]] = i;
}
scanf("%d",&k);
scanf("%d",&p[k+]);
for(i = ; i <= p[k+] ; i++)
{
scanf("%s",ss);
f[q[ss]] = ;
}
for(i = ; i <= k ; i++)
{
scanf("%d",&p[i]);
for(j = ; j <= p[i] ; j++)
{
scanf("%s",ss);
if(f[q[ss]])
o[i]++;
}
}
scanf("%d",&t);
for(i = ; i <= k ; i++)
{
if(o[i]==p[i])
printf("YES\n");
else if(p[i]-o[i]>(n-p[k+]-t))
printf("NO\n");
else
printf("MAYBE\n");
}
return ;
}