제출 #1289447

#제출 시각아이디문제언어결과실행 시간메모리
1289447LIARoads (CEOI20_roads)C++17
0 / 100
2 ms14988 KiB
// // Created by liasa on 11/11/2025. // #include <bits/stdc++.h> using namespace std; #define ll long long #define vll vector<ll> const ll mod = 1e9 + 7; #define tpl tuple<ll, ll, ll, ll, ll> int main() { ll n; cin >> n; vector<tpl> v(n); for (ll i = 0; i < n; ++i) { ll x, y, x1, y1; cin >> x >> y >> x1 >> y1; if (y > y1) swap(y, y1); v[i] = {x, x1, y, y1, i}; } sort(v.begin(), v.end()); vector<tpl> ans; for (ll i = 1; i < n; ++i) { auto [x, x1, y, y1, j] = v[i - 1]; auto [x2, x3, y2, y3, j1] = v[i]; ans.push_back({x, y1, x2, y3, 0}); } for (auto [a, b, c, d, t] : ans) { cout << a << " " << b << " " << c << " " << d << "\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...