Submission #1062983

#TimeUsernameProblemLanguageResultExecution timeMemory
1062983YassirSalamaRail (IOI14_rail)C++17
0 / 100
3044 ms600 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...