• + 0 comments

    USING UNORDERD MAPS:

    include

    using namespace std; int main(){ int n,i,num; cin>>n; string name;

    unordered_map<string,int>pbook;
    while(n--)
    {
        cin>>name;
        cin>>num;
        pbook[name]=num;
    } 
    string sname;
    while(cin>>sname){
         if(pbook.find(sname)==pbook.end())
           cout<<"Not found"<<endl;
        else 
          cout<<sname<<'='<<pbook[sname]<<endl;
    }
    

    }