# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
280191 | SamAnd | Rail (IOI14_rail) | C++17 | 86 ms | 632 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "rail.h"
#include <bits/stdc++.h>
using namespace std;
#define m_p make_pair
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
typedef long long ll;
const int N = 5003;
int n;
void findLocation(int N_, int first, int location[], int stype[])
{
n = N_;
int minu = N * 5;
int minx;
for (int x = 1; x < n; ++x)
{
int d = getDistance(0, x);
if (d < minu)
{
minu = d;
minx = x;
}
}
location[0] = first;
stype[0] = 1;
location[minx] = first + minu;
stype[minx] = 2;
for (int x = 0; x < n; ++x)
{
if (x == 0 || x == minx)
continue;
int d1 = getDistance(0, x);
int d2 = getDistance(minx, x);
if (d1 < d2)
{
location[x] = location[0] + d1;
stype[x] = 2;
}
else
{
location[x] = location[minx] - d2;
stype[x] = 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... |