# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1062850 | NemanjaSo2005 | Rail (IOI14_rail) | C++17 | 328 ms | 98644 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 ll long long
using namespace std;
const int maxn=5005;
int kesh[maxn][maxn],N,idxC,idxD,poz[maxn],tip[maxn],najb[maxn];
int dist(int a,int b){
if(a==b)
return 0;
if(kesh[a][b]==-2){
// cout<<a<<" - "<<b<<": ";
int x=getDistance(a,b);
// cout<<x<<endl;
kesh[a][b]=kesh[b][a]=x;
}
return kesh[a][b];
}
void findLocation(int n, int first, int location[], int stype[]){
N=n;
for(int i=0;i<N;i++)
for(int j=0;j<N;j++)
kesh[i][j]=-2;
location[0]=first;
stype[0]=1;
if(N==1)
return;
for(int i=0;i<N;i++){
if(i==0)
najb[i]=1;
else
# | 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... |