# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1155306 | alexdd | Rail (IOI14_rail) | C++20 | 798 ms | 67180 KiB |
#include "rail.h"
#include<bits/stdc++.h>
using namespace std;
int mp[5005][5005];
const int INF = 1e9;
int ramase;
int getd(int x, int y)
{
if(x==y)
return 0;
if(x<0 || y<0)
return INF;
if(x>y)
swap(x,y);
if(mp[x][y]==0)
{
//if(ramase==0)while(1);
ramase--;
mp[x][y] = getDistance(x,y);
}
return mp[x][y];
}
void findLocation(int N, int first, int location[], int stype[])
{
for(int i=0;i<N;i++)
location[i]=0;
ramase = 3*(N-1);
location[0] = first;
stype[0] = 1;
vector<pair<int,int>> d0;
# | 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... |