懒得写爬虫(不会),花一分钟写个匹配答案。然后又不能好好背单词了。。。,存一下以后说不定其他作业用得到

 1 #include <bits/stdc++.h>
 2 
 3 using namespace std;
 4 
 5 map<string, string> map1, map2;
 6 
 7 char s1[105], s2[105], s3[105], str[105];
 8 
 9 int main()
10 {
11     freopen("Answer.txt", "r", stdin);
12     while(gets(s1)) {
13         gets(s2);
14         gets(s3);
15         map1[s1] = s2;
16         map2[s2] = s1;
17     }
18     freopen("CON", "r", stdin);
19     while(gets(str)) {
20         puts("============");
21         if(map1.count(str)) {
22             cout << map1[str] << endl;
23         }
24         if(map2.count(str)) {
25             cout << map2[str] << endl;
26         }
27         puts("============");
28     }
29 
30     return 0;
31 }