#include <iostream>
#include <queue>
#include <functional>
#include <stdio.h>
#include <string.h>
using namespace std;
struct node
{
char color;
char data;
int i;
node( char a= '0', char b= '0',int c=0 ):
color(a), data(b),i(c) {};
friend bool operator <(const node &a,const node &b)
{
return a.i>b.i;
}
};
char s[2];
char ans [105][3];
priority_queue<node> q[13];
int main()
{
int n;
cin >> n;
for(int i=0;i<n;i++)
{
scanf("%s",s);
char a=s[0];char b=s[1];
q[b-'0'-1].push(node(a,b,i));
}
int j=0;
for(int i=0;i<9;i++)
优先级队列的应用 之对扑克牌排序
最新推荐文章于 2023-06-16 15:27:20 发布