# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
701590 | 2023-02-21T14:19:28 Z | PCTprobability | Roads (CEOI20_roads) | C++17 | 62 ms | 4880 KB |
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll mod = 1000000007; #define fi first #define se second #define pb push_back #define sor(a) sort(a.begin(),a.end()) int main(){ ll n; cin>>n; map<ll,vector<pair<ll,ll>>> m; for(int i=0;i<n;i++){ ll a,b,c,d; cin>>a>>b>>c>>d; if(b>d) swap(b,d); m[a].pb({b,d}); } vector<pair<ll,vector<pair<ll,ll>>>> d; for(auto e:m){ sor(e.se); d.pb({e.fi,e.se}); for(int i=0;i+1<e.se.size();i++){ cout<<e.fi<<" "<<e.se[i].se<<" "<<e.fi<<" "<<e.se[i+1].fi<<endl; } } sor(d); for(int i=0;i+1<d.size();i++){ cout<<d[i].fi<<" "<<d[i].se.back().se<<" "<<d[i+1].fi<<" "<<d[i+1].se[0].fi<<endl; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Failed | 1 ms | 212 KB | Condition failed: "iB != P2I.end()" |
2 | 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 | 3 ms | 468 KB | Output is correct |
4 | Correct | 33 ms | 2500 KB | Output is correct |
5 | Correct | 61 ms | 4844 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 2 ms | 340 KB | Output is correct |
3 | Correct | 3 ms | 468 KB | Output is correct |
4 | Correct | 30 ms | 2500 KB | Output is correct |
5 | Correct | 62 ms | 4800 KB | Output is correct |
6 | Failed | 1 ms | 212 KB | Condition failed: "iA != P2I.end()" |
7 | 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 | 4 ms | 468 KB | Output is correct |
4 | Correct | 37 ms | 2484 KB | Output is correct |
5 | Correct | 61 ms | 4880 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Failed | 1 ms | 340 KB | Condition failed: "pf == Sline.end() || !Cross(S[*pi], S[*pf])" |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Failed | 0 ms | 212 KB | Condition failed: "iB != P2I.end()" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Failed | 0 ms | 212 KB | Condition failed: "iB != P2I.end()" |
2 | Halted | 0 ms | 0 KB | - |