# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
346701 | ant101 | Rail (IOI14_rail) | C++14 | 424 ms | 98796 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>
using namespace std;
#define sz(x) (int)(x.size())
#define pb push_back
#define fi first
#define se second
const int INF = (int)(1e9);
typedef pair<int,int> ii;
int dist[5005][5005];
int d(int a,int b){
if(dist[a][b]!=-1)return dist[a][b];
return dist[a][b]=dist[b][a]=getDistance(a,b);
}
int flip(int x){
if(x==1)return 2;
return 1;
}
int pivot;
bool compare(ii a,ii b){
if(d(a.se,pivot)<d(b.se,pivot))return 1;
else if(d(a.se,pivot)>d(b.se,pivot))return 0;
return a.se<b.se;
}
void findLocation(int N, int first, int location[], int stype[])
{
memset(dist,-1,sizeof dist);
for (int i = 0; i < N; ++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... |