# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
667582 | 2022-12-01T18:12:51 Z | berr | Roads (CEOI20_roads) | C++17 | 1 ms | 340 KB |
#include <bits/stdc++.h> using namespace std; const int N=1e5+37; //1.st subtask all are vertical signed main() { ios_base::sync_with_stdio(false); cin.tie(0); int n; cin>>n; vector<array<int, 2>> node(2*n+1); vector<array<int, 2>> q; for(int i=1; i<=n*2; i+=2) { cin>>node[i][0]>>node[i][1]; cin>>node[i+1][0]>>node[i+1][1]; if(node[i+1][1]>node[i][1]) { q.push_back({node[i+1][0], i+1}); } else { q.push_back({node[i][0], i}); } } sort(q.begin(), q.end()); for(int i=0; i<q.size()-1; i++) { cout<<node[q[i][1]][0]<<" "<<node[q[i][1]][1]<<" "<<node[q[i+1][1]][0]<<" "<<node[q[i+1][1]][1]<<"\n"; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Failed | 0 ms | 212 KB | Condition failed: "pf == Sline.end() || !Cross(S[*pa], S[*pf])" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Failed | 1 ms | 288 KB | Condition failed: "!Cross(S[*pi], S[*pa])" |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Failed | 1 ms | 340 KB | Condition failed: "!Cross(S[*pi], S[*pa])" |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Failed | 1 ms | 340 KB | Condition failed: "!Cross(S[*pi], S[*pa])" |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Failed | 0 ms | 212 KB | Condition failed: "pf == Sline.end() || !Cross(S[*pa], S[*pf])" |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Failed | 0 ms | 212 KB | Condition failed: "pf == Sline.end() || !Cross(S[*pa], S[*pf])" |
2 | Halted | 0 ms | 0 KB | - |