# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
900653 | 3laa | Roads (CEOI20_roads) | C++14 | 25 ms | 2052 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#define fast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#include <bits/stdc++.h>
#include <unordered_map>
#define endl '\n'
#define mid ((l+r)/2)
#define F first
#define S second
#define pb push_back
#define yes void (cout<<"YES"<<endl)
#define no void (cout<<"NO"<<endl)
#define ump unordered_map <ll,ll>
#define sp " "
#define vll vector<ll>
#define vint vector<int>
#define pll pair<ll,ll>
typedef long long ll;
using namespace std;
const ll inf=1e18+9;
const ll M=1e9+7;
ll n;
int main(){
cin>>n;
vector< pair <ll,pair<ll,ll> > > v;
for(ll i=0 ; i<n ; i++){
pll x,y;
cin>>x.F>>x.S>>y.F>>y.S;
v.pb({x.F,{max(x.S,y.S),min(x.S,y.S)}});
}
sort(v.begin(),v.end());
for(ll i=0 ; i<v.size()-1 ; i++){
if(v[i].F!=v[i+1].F){
cout<<v[i].F<<sp<<(v[i].S).F<<sp;
cout<<v[i+1].F<<sp<<(v[i+1].S).F<<endl;
}
else{
if((v[i].S).F<(v[i+1].S).S){
cout<<v[i].F<<sp<<(v[i].S).F<<sp;
cout<<v[i+1].F<<sp<<(v[i+1].S).S<<endl;;
}
else{
cout<<v[i].F<<sp<<(v[i].S).S<<sp;
cout<<v[i+1].F<<sp<<(v[i+1].S).F<<endl;
}
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |