#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define F first
#define S second
using namespace std;
int N;
pii p[200005];
vector<int> v;
signed main()
{
cin >> N;
for (int i = 1; i <= N; i++)
{
cin >> p[2 * i - 1].F >> p[2 * i - 1].S >> p[2 * i].F >> p[2 * i].S;
assert(p[2 * i - 1].F == p[2 * i].F);
}
for (int i = 1; i <= N; i++)
v.emplace_back(i);
sort(v.begin(), v.end(), [&](int i1, int i2)
{ return max(p[2 * i1 - 1], p[2 * i1]) < max(p[2 * i2 - 1], p[2 * i2]); });
for (int i = 1; i < N; i++)
cout << max(p[2 * v[i - 1] - 1], p[2 * v[i - 1]]).F << " " << max(p[2 * v[i - 1] - 1], p[2 * v[i - 1]]).S << " " << min(p[2 * v[i] - 1], p[2 * v[i]]).F << " " << min(p[2 * v[i] - 1], p[2 * v[i]]).S << '\n';
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
2 ms |
332 KB |
Output is correct |
4 |
Correct |
17 ms |
860 KB |
Output is correct |
5 |
Correct |
40 ms |
1968 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
2 ms |
332 KB |
Output is correct |
4 |
Correct |
16 ms |
816 KB |
Output is correct |
5 |
Correct |
34 ms |
1968 KB |
Output is correct |
6 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |
7 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
3 ms |
332 KB |
Output is correct |
4 |
Correct |
17 ms |
752 KB |
Output is correct |
5 |
Correct |
34 ms |
1904 KB |
Output is correct |
6 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |
7 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
332 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |