# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
551072 | PiejanVDC | 분수 공원 (IOI21_parks) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
//#include "parks.h"
using namespace std;
int dx[4] = {2,0,-2,0};
int dy[4] = {0,2,0,-2};
struct S {
int x,y;
int dir;
}s_;
void build(vector<int> u, vector<int> v, vector<int> a, vector<int> b);
const int mxN = (int)2e5 + 5;
int construct_roads(std::vector<int> x, std::vector<int> y) {
const int n = (int)x.size();
map<pair<int,int>,int>mp;
for(int i = 0 ; i < n ; i++)
mp[{x[i],y[i]}] = i;
vector<int>u(n-1),v(n-1),a(n-1),b(n-1);
set<pair<int,int>>processed;
stack<S>s;
s_.x = x[0], s_.y = y[0], s_.dir = 0;
processed.insert({x[0], y[0]});
s.push(s_);