Untitled

mail@pastecode.io avatar
unknown
plain_text
23 days ago
449 B
2
Indexable
Never
#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;

}
Leave a Comment