PAT1022. Digital Library

#include 
#include
#include
#include
#include
using namespace std;
int n;
map >mptitle,mpauthor,keyword,publisher,year;


void cal(map >&mp,string&str){
if(mp.find(str)==mp.end())cout<<"Not Found"<::iterator it=mp[str].begin();
for(;it!=mp[str].end();it++){
printf("%07d\n",*it);
}

}

}

int main(){
    //freopen("d://jin.txt","r",stdin);
string title,author,key,publish,y;
char c;
cin>>n;
int d;
for(int i=0;i>d;
c=getchar();
getline(cin,title);
mptitle[title].insert(d);
getline(cin,author);
mpauthor[author].insert(d);
while(cin>>key){
keyword[key].insert(d);
c=getchar();
if(c=='\n')break;}
getline(cin,publish);
publisher[publish].insert(d);
getline(cin,y);
year[y].insert(d);
}
string temp;
int m;
cin>>m;
int t;
for(int i=0;i

你可能感兴趣的:(PAT1022. Digital Library)