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 get getDistance
const int m=1e6;
void findLocation(int N, int first, int location[], int stype[]){
if(N==1){
location[0]=first;
stype[0]=1;
return;
}
int n=N;
for(int i=0;i<n;i++) location[i]=-1;
int ind=1e9;
cout<<get(0,1)<<endl;
location[0]=first;stype[0]=1;
for(int i=0;i<=m;i++){
for(int j=0;j<n;j++){
if(location[j]!=-1) continue;
// if(j==2){
// cout<<get
// }
if(get(0,j)==i-first){
ind=min(ind,i);
// cout<<ind<<" "<<j<<" "<<i<<" "<<get(0,j)<<" "<<get(j,0)<<endl;
location[j]=i;
stype[j]=2;
}
}
}
return;
}
# | 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... |