| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1356680 | MuhammadSaram | Fountain Parks (IOI21_parks) | C++17 | 2 ms | 4940 KiB |
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
const int M = 2e5 + 1;
int col[M];
vector<int> ver[M];
bool add(int u,int v)
{
u=col[u], v=col[v];
if (u==v) return 0;
if (ver[u].size()<ver[v].size()) swap(u,v);
for (int i:ver[v])
col[i]=u, ver[u].push_back(i);
ver[v].clear();
return 1;
}
int construct_roads(vector<int> x, vector<int> y)
{
int n=x.size();
vector<pair<int,int>> v;
for (int i=0;i<n;i++)
v.push_back({y[i],i});
sort(v.begin(), v.end());
vector<int> n1, n2, n3, n4;
for (int i=1;i<v.size();i++)
{
if (v[i].first!=v[i-1].first+2) return 0;
n1.push_back(v[i].second), n2.push_back(v[i-1].second);
n3.push_back(3), n4.push_back(v[i].first-1);
}
build(n1,n2,n3,n4);
}컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
