#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
using namespace std;
#define x first
#define y second
typedef pair<int, string> PII;
const int N = 25 + 10;
int n;
vector<PII> alls;
int main()
{
cin>>n;
string line;
for(int i = 0; i < n; i++)
{
int k;
string name;
cin>>k;
getchar();
cin>>name;
alls.push_back({k, name});
}
for(int i = 0; i < n; i++)
{
if(alls[i].x == 0)
{
for(int j = n - 1; j >= 0; j--)
{
if(alls[j].x == 1)
{
alls[i].x = 2, alls[j].x = 2; //抹杀
cout<<alls[i].y<<" "<<alls[j].y<<endl;
break;
}
}
}
if(alls[i].x =
L1-030 一帮一 (15 分)
最新推荐文章于 2023-02-03 10:23:41 发布
#include <iostream>#include <cstring>#include <algorithm>#include <vector>using namespace std;#define x first#define y secondtypedef pair<int, string> PII;const int N = 25 + 10;int n;vector<PII> alls;int main(
摘要由CSDN通过智能技术生成