# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
290371 | AaronNaidu | Rail (IOI14_rail) | C++14 | 419 ms | 98428 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "rail.h"
using namespace std;
int distFrom0[5001];
int distFromMin[5001];
int queries[5001][5001];
int closest[5001];
int minDists[5001];
bool doneWith[5001];
void findLocation(int n, int first, int location[], int sType[]) {
location[0] = first;
sType[0] = 1;
doneWith[0] = true;
for (int i = 0; i < n; i++)
{
for (int j = i+1; j < n; j++)
{
queries[i][j] = getDistance(i,j);
queries[j][i] = queries[i][j];
}
}
for (int i = 0; i < n; i++)
{
minDists[i] = 1000000007;
for (int j = 0; j < n; j++)
{
if (j != i and queries[i][j] < minDists[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... |