优先队列水题,真心不懂那个<号到底要怎么重载
code:
#include <queue>
#include <cstdio>
#include <cstring>
using namespace std;
struct Win
{
char name[50];
int id,val,parameter;
friend bool operator < (Win a,Win b)
{
if(a.val==b.val)
{
return b.id<a.id;
}
return b.val<a.val;
}
}tmp;
priority_queue<Win> q;
int main()
{
char str[5];
int k=0;
while(~scanf("%s",str))
{
i......
阅读全文