# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
48590 | gs12117 | Rail (IOI14_rail) | C++11 | 165 ms | 888 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<vector>
#include<algorithm>
#include "rail.h"
int n;
int distz[5010];
int distf[5010];
int side[5010];
int vchk[5010];
int p;
struct stn {
int loc, val;
bool operator<(const stn&r)const {
return val < r.val;
}
};
void findLocation(int N, int first, int location[], int stype[])
{
if (n == 1) {
location[0] = first;
stype[0] = 1;
return;
}
n = N;
distz[0] = 0;
int f = -1;
for (int i = 1; i < n; i++) {
distz[i] = getDistance(0, i);
if (f == -1 || distz[i] < distz[f])f = i;
}
int rdf = distz[f];
Compilation message (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... |