@[Sinner](/space/show?uid=70786)
千古神犇lhc 扑通扑通跪下来
```cpp
#include<iostream>
#include<string>
#include<map>
#include<cstdio>
using namespace std;
map <string,int> md;
int n,m;
string s;
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
cin >> s;
md[s]=1;
}
scanf("%d",&m);
for(int i=1;i<=m;i++)
{
cin >> s;
if(md[s]==0) printf("WRONG\n");
else if(md[s]==1) md[s]++,printf("OK\n");
else if(md[s]>1) printf("REPEAT\n");
}
return 0;
}
```
by VenusM1nT @ 2018-12-17 09:21:10
。。。
by _louhc @ 2018-12-17 09:21:23
@[Venus](/space/show?uid=23243) 我要字典树。。。
by _louhc @ 2018-12-17 09:21:38
扑通~膝盖碎了!
by hovny @ 2018-12-17 09:21:46
@[Sinner](/space/show?uid=70786) 有`map`不用为啥一定要`trie`
您tql
by VenusM1nT @ 2018-12-17 09:22:32
$^{\text{奆佬}}_{\text{奆佬}}\ ^{\text{奆佬}}_{\text{奆佬}}\ ^{\text{奆佬}}_{\text{奆佬}}\ ^{\text{奆佬}}_{\text{奆佬}}\ ^{\text{奆佬}}_{\text{奆佬}}$
by _louhc @ 2018-12-17 09:22:51
算了我也用map
by _louhc @ 2018-12-17 09:23:15