#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define pb push_back
#define mp make_pair
typedef pair<ll,ll> pii;
typedef tree<pii ,null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
const ll MAXN = 301;
const ll MOD = 1e9+7;
const ll INF = 1e6+10;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n,i,x1,x2,y1,y2;
cin>>n;
vector< pair<pii, pii> >v(n);
for(i=0;i<n;i++){
cin>>x1>>y1>>x2>>y2;
if(y2<y1)swap(y2,y1);
v[i]={ {x1,y1}, {x2,y2} };
}//x1=x2 e y2>y1
sort(v.begin(),v.end());
for(i=0;i<n-1;i++){
cout<<v[i].second.first<<" "<<v[i].second.second<<" ";
cout<<v[i+1].first.first<<" "<<v[i+1].first.second<<'\n';
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Failed |
1 ms |
204 KB |
Condition failed: "iA != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
332 KB |
Output is correct |
3 |
Correct |
2 ms |
332 KB |
Output is correct |
4 |
Correct |
10 ms |
1144 KB |
Output is correct |
5 |
Correct |
23 ms |
2056 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
332 KB |
Output is correct |
3 |
Correct |
2 ms |
324 KB |
Output is correct |
4 |
Correct |
10 ms |
1228 KB |
Output is correct |
5 |
Correct |
20 ms |
2116 KB |
Output is correct |
6 |
Failed |
1 ms |
204 KB |
Condition failed: "iA != P2I.end()" |
7 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
316 KB |
Output is correct |
2 |
Correct |
1 ms |
316 KB |
Output is correct |
3 |
Correct |
2 ms |
332 KB |
Output is correct |
4 |
Correct |
10 ms |
1228 KB |
Output is correct |
5 |
Correct |
19 ms |
2024 KB |
Output is correct |
6 |
Failed |
1 ms |
204 KB |
Condition failed: "pf == Sline.end() || !Cross(S[*pa], S[*pf])" |
7 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Failed |
1 ms |
204 KB |
Condition failed: "iA != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Failed |
1 ms |
204 KB |
Condition failed: "iA != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |