Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<string>
- #include<iostream>
- #include<map>
- #include<cctype>
- #include<cstdio>
- using namespace std;
- int main() {
- int n, i;
- scanf("%d\n", &n);
- char cuv[31], def[1025];
- map<string, string>dex;
- for(int i = 0; i < n; i ++) {
- scanf("%[^, ], %[^\n]\n", cuv, def);
- dex[cuv]=def;
- }
- while(EOF!=scanf("%s", cuv)) {
- if(dex.find(cuv)!=dex.end()) {
- printf("%s: %s\n", cuv, dex[cuv].c_str());
- }else{
- printf("%s: -\n", cuv);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement