原题链接https://ac.nowcoder.com/acm/contest/30532#question
#include <string>
#include <iostream>
#include<map>
using namespace std;
map<string, int> mp;
int main()
{
char c;
string s, h;
int s2 = 0;
while (cin >> s) {
int x;
cin >> x;
mp[s] += x;
if (cin.get() == '\n') break;
}
int t;
cin >> t;
while (t--)
{
string ss;
cin >> ss;
int ssss = mp[ss];
cout << ssss << endl;
}
return 0;
}