#include<bits/stdc++.h>
using namespace std;
struct node
{
char name[105];
char mes[505][105];
int x, y;
} a[505];
bool cmp(node a, node b)
{
int i = 0;
if(a.x == b.x)
{
if(a.y == b.y)
{
if(strcmp(a.name, b.name) == 0)
{
while(strcmp(a.mes[i], b.mes[i]) == 0)
i++;
return strcmp(a.mes[i], b.mes[i]) < 0;
}
return strcmp(a.name, b.name) < 0;
}
return a.y > b.y;
}
return a.x > b.x;
}
int main()
{
int n, m, k;
while(cin >> n >> m >> k)
{
for(int i = 0; i < n; i++)
{
cin >> a[i].name;
for(int j = 0; j < m - 1; j++)
cin >> a[i].mes[j];
cin >> a[i].x >> a[i].y;
}
sort(a, a + n, cmp);
for(int i = 0; i < k; i++)
cout << a[i].name << endl;
}
return 0;
}
今天的文章火影忍者鸣人的全部形态_鸣人的特别训练分享到此就结束了,感谢您的阅读。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/81460.html