# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
581523 | wdjpng | Rail (IOI14_rail) | C++17 | 154 ms | 196424 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 "rail.h"
#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i = 0; i < n; i++)
#define all(a) a.begin(), a.end()
using namespace std;
void findLocation(signed n, signed first, signed lo[], signed sty[])
{
vector<vector<int>>dist(n, vector<int>(n));
vector<int>location(n);
vector<int>stype(n);
vector<int>d0(n);
int minn=1e12,mini=-1;
for(int i = 1; i < n; i++) {
int d = d0[i] = getDistance(0,i);
if(d<minn) {minn=d; mini=i;}
}
vector<int>dmini(n);
dmini[0]=d0[mini];
rep(i,n) if(i!=0&&i!=mini) dmini[i]=getDistance(i,mini);
int l=-1, maxl=0, r=-1, maxr=0;
rep(i,n)
{
if(d0[i]<dmini[i]&&maxr<d0[i])
{
maxr= d0[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... |