# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
51133 | mirbek01 | 철로 (IOI14_rail) | C++17 | 134 ms | 41792 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "rail.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 5e3 + 2;
int n, dist[N][N], cur;
bool cmp(int a, int b){
return dist[cur][a] < dist[cur][b];
}
void findLocation(int N, int first, int location[], int stype[]){
location[0] = first;
stype[0] = 1;
if(N == 1) return ;
vector <int> l, r, v;
n = N;
int in = 1;
for(int i = 1; i < n; i ++){
dist[0][i] = dist[i][0] = getDistance(0, i);
if(dist[0][i] < dist[0][in]) in = i;
}
location[in] = first + dist[0][in];
stype[in] = 2;
for(int i = 1; i < n; i ++){
if(in == i) continue;
dist[in][i] = dist[i][in] = getDistance(in, 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... |