struct node
{
int rp;
char s[25];
bool operator<(const node &a)const{ ///在这里rp s和过去写cmp的时候的b.rp b.s一样
if(rp==a.rp)
return strcmp(a.s,s)>0;
else return a.rp<rp;
}
};
priority_queue<node >q;
原文:http://www.cnblogs.com/rayrayrainrain/p/5300482.html