Submission #1108273

#TimeUsernameProblemLanguageResultExecution timeMemory
1108273AriadnaRail (IOI14_rail)C++14
8 / 100
46 ms592 KiB
#include <bits/stdc++.h> #include "rail.h" using namespace std; void findLocation(int n, int first, int location[], int stype[]) { location[0] = first; stype[0] = 1; for (int i = 1; i < n; ++i) { int d1 = getDistance(i, 0), d2 = getDistance(0, i); if (d1 < d2) { location[i] = location[0]-d1; stype[i] = 1; } else { location[i] = location[0]+d2; stype[i] = 2; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...