题意:
给你一堆牌,再给你5种操作牌,两个人轮流抓操作牌,并且按照操作来执行,最后谁手里的牌多谁就赢。
明明是左偏树的题目,但是我用priority_queue水过去了。。。
代码:
#include <queue>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#define N 200 + 5
using namespace std;
typedef struct
{
int num ,v;
double x ,y ,z;
}NODE;
typedef struct
{
double dis;
int v ,id;
}ZT;
NODE node1[N] ,node2[N];
ZT zt[N];
int map[N][N] ,G_b[N][N];
int nowb[N] ,nowg[N];
int mark[N][N];
bool camp(ZT a ,ZT b)
{
return a.dis < b.dis || a.dis == b.dis && a.v > b.v;
}
void Marr(