# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
934906 |
2024-02-28T07:10:34 Z |
Halym2007 |
Roads (CEOI20_roads) |
C++11 |
|
29 ms |
1876 KB |
#include <bits/stdc++.h>
using namespace std;
#define sz size()
#define pb push_back
#define ff first
#define ss second
int n, x_1, x_2, y_1, y_2;
vector <pair <int, pair<int,int>>> v;
int main () {
cin >> n;
for (int i = 1; i <= n; ++i) {
cin >> x_1 >> y_1 >> x_2 >> y_2;
v.pb({x_1,{min(y_1,y_2),max(y_1,y_2)}});
}
sort (v.begin(), v.end());
for(int i = 0; i < int(v.sz-1); ++i){
cout << v[i].ff << ' ' << v[i].ss.ss << ' ' << v[i+1].ff << ' ' << v[i+1].ss.ff << '\n';
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Failed |
0 ms |
348 KB |
Condition failed: "iA != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
2 ms |
348 KB |
Output is correct |
4 |
Correct |
15 ms |
1052 KB |
Output is correct |
5 |
Correct |
28 ms |
1776 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
2 ms |
444 KB |
Output is correct |
4 |
Correct |
14 ms |
1048 KB |
Output is correct |
5 |
Correct |
28 ms |
1872 KB |
Output is correct |
6 |
Failed |
0 ms |
344 KB |
Condition failed: "iA != P2I.end()" |
7 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
2 ms |
348 KB |
Output is correct |
4 |
Correct |
15 ms |
1176 KB |
Output is correct |
5 |
Correct |
29 ms |
1876 KB |
Output is correct |
6 |
Correct |
0 ms |
344 KB |
Output is correct |
7 |
Failed |
1 ms |
348 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 |
348 KB |
Condition failed: "iA != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Failed |
0 ms |
344 KB |
Condition failed: "iA != P2I.end()" |
2 |
Halted |
0 ms |
0 KB |
- |