| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 598887 | proma | 철로 (IOI14_rail) | C++17 | 76 ms | 976 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "rail.h"
#include <bits/stdc++.h>
using namespace std;
int d[105][105];
void findLocation(int N, int first, int location[], int stype[]) {
for (int i = 0; i < N; i ++) {
d[i][i] = 0;
for (int j = i + 1; j < N; j ++) {
d[i][j] = d[j][i] = getDistance(i, j);
}
}
int nxt = -1, mn = 1e9;
for (int i = 1; i < N; i ++) {
if (mn > d[0][i]) {
mn = d[0][i];
nxt = i;
}
}
stype[0] = 1;
location[0] = first;
stype[nxt] = 2;
location[nxt] = first + mn;
for (int i = 1; i < N; i ++) {
if (i == nxt) continue;
if (d[0][i] == d[0][nxt] + d[nxt][i]) {
stype[i] = 1;
location[i] = first - d[0][i] + 2 * d[0][nxt];
}
else {
stype[i] = 2;
location[i] = first + d[0][i];
}
}
}
| # | 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... | ||||
