Untitled
unknown
plain_text
a year ago
449 B
12
Indexable
#include <iostream>
using namespace std;
struct toado{
int a;
int b;
bool operator (const a.b &other){
if(toado.a > other.a) return toado.a;
if(toado.a == other.a){
if(toado.b < other.b) return toado.b;
}
}
};
int main()
{
int n;
cin >> n;
sort(toado + 1, toado+n+1, operator);
for(int i; i < n; i++){
cin >> a[i] >> b[i];
}
cout << toado.a << toado.b;
}
Editor is loading...
Leave a Comment