| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 432869 | lior5654 | 기지국 (IOI20_stations) | C++17 | 1 ms | 456 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pl;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<pl> vpl;
typedef vector<vpl> vvpl;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pi> vpi;
typedef vector<vpi> vvpi;
#define rep(i, n) for(int i = 0; i < n; ++i)
#define all(c) (c.begin()), (c.end())
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#include "stations.h"
const int maxn = 1e3 + 5;
vi g[maxn];
std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) {
vi res(n);
rep(i, n-1) {
g[u[i]].pb(v[i]);
g[v[i]].pb(u[i]);
}
int fir = -1;
for(int i = 0; i < n; ++i) {
if(g[i].size() == 1) {
fir = i; break;
}
}
assert(fir != 0);
int pre = -1;
int cur = fir;
rep(i, n) {
res[cur] = i;
for(auto e : g[cur]) {
if(e!=pre) {
pre = cur; cur = e; break;
}
}
}
rep(i, n) {
g[i].clear();
}
}
int find_next_station(int s, int t, std::vector<int> c) {
if(s < t && s < c[0] || s > t && s > c[0]) {
return c[0];
} else {
return c[1];
}
}
컴파일 시 표준 에러 (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... | ||||
