标准库集锦

#include<bits/stdc++.h>
using namespace std;
#define MAX 200005
#define lson (p<<1)
#define rson (p<<1|1)
#define mid ((l + r) >> 1);
typedef pair<int,int> P;
map<string,double> mp;
int main(void){
    string s;double d;
    while(true){
        cin >> s;
        if(s == "noname") break;
        cin >> d;
        mp[s] = d * 0.21;
    }
    while(cin >> s){
        auto it = mp.find(s);
        if(it == mp.end()) cout << "Not found." << endl;
        else cout << mp[s] << endl;
    }
    return 0;
}
原文地址:https://www.cnblogs.com/ewitt/p/14768202.html