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;
typedef long long ll;
const int N=1e5+5;
int n;
vector<tuple<ll,ll,ll,ll>> vec;
int main(){
cin.tie(nullptr)->sync_with_stdio(false);
cin >> n;
for(int i=1;i<=n;i++){
ll a,b,c,d;
cin >> a >> b >> c >> d;
if(b>d)swap(a,c),swap(b,d);
vec.emplace_back(a,b,c,d);
}
sort(vec.begin(),vec.end());
for(int i=1;i<n;i++){
cout << get<2>(vec[i-1]) << " " << get<3>(vec[i-1]) << " " << get<0>(vec[i]) << " " << get<1>(vec[i]) << "\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... |