#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";
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Failed |
0 ms |
212 KB |
Condition failed: "!Cross(S[*pi], S[*pa])" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
9 ms |
1356 KB |
Output is correct |
5 |
Correct |
12 ms |
2276 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
320 KB |
Output is correct |
3 |
Correct |
1 ms |
332 KB |
Output is correct |
4 |
Correct |
6 ms |
1352 KB |
Output is correct |
5 |
Correct |
13 ms |
2252 KB |
Output is correct |
6 |
Correct |
1 ms |
324 KB |
Output is correct |
7 |
Failed |
1 ms |
340 KB |
Condition failed: "!Cross(S[*pi], S[*pa])" |
8 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
6 ms |
1272 KB |
Output is correct |
5 |
Correct |
14 ms |
2288 KB |
Output is correct |
6 |
Failed |
0 ms |
212 KB |
Condition failed: "pf == Sline.end() || !Cross(S[*pa], S[*pf])" |
7 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Failed |
0 ms |
212 KB |
Condition failed: "!Cross(S[*pi], S[*pa])" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Failed |
0 ms |
212 KB |
Condition failed: "!Cross(S[*pi], S[*pa])" |
2 |
Halted |
0 ms |
0 KB |
- |