#include <bits/stdc++.h>
#define T ll tt ; cin>>tt ; while(tt--)
#define fast ios::sync_with_stdio(NULL); cin.tie(0); cout.tie(0);
#define endl '\n'
#define yes void (cout << "YES" << endl)
#define no void (cout << "NO" << endl)
#define pb push_back
#define F first
#define S second
#define ld long double
#define fixed(g) fixed<<setprecision(g)
#define ll long long
using namespace std;
const ll N = 2e6 + 9 ;
const ll oo = 1e9 + 7 ;
ll n , m , k , x , y , z , g , ans , sum , sum2 , cnt , dis[N] , sz , mn , a[N] , b[N] , e1 , e2 , e3 , e4;
bool ff , vis[N] ;
pair< pair<ll , ll> , pair<ll , ll> > p[N];
vector<ll>v;
int main(){
fast
cin >> n ;
for(ll i=0 ; i<n ; i++){
cin >> e1 >> e2 >> e3 >> e4 ;
p[i] = { {e1 , e2} , {e3 , e4} } ;
}
sort(p , p+n) ;
for(ll i=0 ; i<n-1 ; i++){
if(p[i].F.F==p[i+1].F.F){
v.pb (p[i].F.S) ;
v.pb (p[i].S.S) ;
v.pb (p[i+1].F.S) ;
v.pb (p[i+1].S.S) ;
sort(v.begin() , v.end()) ;
cout<<p[i].F.F<<' '<<v[1]<<' '<<p[i].F.F<<' '<<v[2]<<endl;
v.clear();
}
else
cout<<p[i].S.F<<' '<<p[i].S.S<<' '<<p[i+1].F.F<<' '<<p[i+1].F.S<<endl;
}
return 0 ;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Failed |
0 ms |
2392 KB |
Condition failed: "iB != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
6 ms |
4956 KB |
Output is correct |
5 |
Correct |
12 ms |
5212 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
2 ms |
2396 KB |
Output is correct |
4 |
Correct |
6 ms |
4952 KB |
Output is correct |
5 |
Correct |
12 ms |
5212 KB |
Output is correct |
6 |
Failed |
1 ms |
2396 KB |
Condition failed: "!Cross(S[*pi], S[*pa])" |
7 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
2 ms |
2396 KB |
Output is correct |
4 |
Correct |
6 ms |
4952 KB |
Output is correct |
5 |
Correct |
12 ms |
5208 KB |
Output is correct |
6 |
Failed |
1 ms |
2392 KB |
Condition failed: "pf == Sline.end() || !Cross(S[*pa], S[*pf])" |
7 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Failed |
1 ms |
2392 KB |
Condition failed: "iB != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Failed |
1 ms |
2396 KB |
Condition failed: "iB != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |