返回目录
注意点
- 由于输入量大,不能用cin输入,否则最后一个测试点会超时
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,tmp;
int map[110]={0};
cin>>n;
while(n--){
scanf("%d",&tmp);
map[tmp]++;
}
cin>>n;
while(n--){
scanf("%d",&tmp);
cout<<map[tmp];
if(n!=0)cout<<" ";
}
return 0;
}