//in the name of god//
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define _ ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define all(x) x.begin(),x.end()
#define F first
#define S second
#define MP make_pair
const int maxn = 1e3 + 10;
const int mod = 1e9 + 7;
int main(){_
int n;
cin >> n;
vector<pair<int, pair<int, int> > > v(n);
for(int i = 0 ; i < n ; i ++){
int x, y, yy;
cin >> x >> y >> x >> yy;
if(y > yy)
swap(y, yy);
v[i].F = x;
v[i].S = MP(y, yy);
}
sort(all(v));
vector<pair<pair<int, int>, pair<int, int> > > ans;
for(int i = 1 ; i < n ; i ++)
ans.push_back(MP(MP(v[i].F, v[i].S.F), MP(v[i - 1].F, v[i - 1].S.S)));
for(auto i : ans)
cout << i.F.F << ' ' << i.F.S << ' ' << i.S.F << ' ' << i.S.S << '\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Failed |
1 ms |
208 KB |
Condition failed: "iA != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
208 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
9 ms |
1228 KB |
Output is correct |
5 |
Correct |
19 ms |
2104 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
2 ms |
336 KB |
Output is correct |
4 |
Correct |
9 ms |
1232 KB |
Output is correct |
5 |
Correct |
18 ms |
2156 KB |
Output is correct |
6 |
Failed |
0 ms |
208 KB |
Condition failed: "iA != P2I.end()" |
7 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
208 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
9 ms |
1228 KB |
Output is correct |
5 |
Correct |
18 ms |
2128 KB |
Output is correct |
6 |
Correct |
0 ms |
208 KB |
Output is correct |
7 |
Failed |
1 ms |
320 KB |
Condition failed: "pf == Sline.end() || !Cross(S[*pi], S[*pf])" |
8 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Failed |
0 ms |
208 KB |
Condition failed: "iA != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Failed |
1 ms |
208 KB |
Condition failed: "iA != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |