看病要排队 |
---|
题意: 中文题面应该不必赘述。
题解: 最多只有三个医生,也就是说只要定义三个优先队列即可,内部按照病情以及先来后到等条件排序,模拟即可。
#include<bits/stdc++.h>
using namespace std;
const int N = 2e3 + 10;
struct node{
int rank, id;
bool operator<(const node &A)const{
if(A
看病要排队 |
---|
题意: 中文题面应该不必赘述。
题解: 最多只有三个医生,也就是说只要定义三个优先队列即可,内部按照病情以及先来后到等条件排序,模拟即可。
#include<bits/stdc++.h>
using namespace std;
const int N = 2e3 + 10;
struct node{
int rank, id;
bool operator<(const node &A)const{
if(A