This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define sz size()
#define pb push_back
#define ff first
#define ss second
int n, x_1, x_2, y_1, y_2;
vector <pair <int, pair<int,int>>> v;
int main () {
cin >> n;
for (int i = 1; i <= n; ++i) {
cin >> x_1 >> y_1 >> x_2 >> y_2;
v.pb({x_1,{min(y_1,y_2),max(y_1,y_2)}});
}
sort (v.begin(), v.end());
for(int i = 0; i < int(v.sz-1); ++i){
cout << v[i].ff << ' ' << v[i].ss.ss << ' ' << v[i+1].ff << ' ' << v[i+1].ss.ff << '\n';
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |