0
点赞
收藏
分享

微信扫一扫

目前主流的几个Web前端框架

芷兮离离 2023-07-26 阅读 72
算法

解析

#include <bits/stdc++.h>
using namespace std;
struct node{
int h,s;
}tmp;
set<node> st;
bool operator < (node a,node b){
if(a.s!=b.s){
return a.s>b.s;
}else{
return a.h<b.h;
}
}
int main(){
int n;
cin>>n;
while(n--){
cin>>tmp.h>>tmp.s;
st.insert(tmp);
}
for(auto it:st){
cout<<it.h<<" "<<it.s<<'\n';
}
return 0;
}

 

举报

相关推荐

0 条评论