# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15686 | gs14004 | Rail (IOI14_rail) | C++14 | 127 ms | 976 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 <vector>
#include <algorithm>
using namespace std;
typedef pair<int,int> pi;
int dist0[5005], distmin[5005];
bool setCheck[5005];
vector<pi> v;
void make(int location[], int stype[], int x, int st){
vector<pi> tmp;
for(auto &i : v){
if(tmp.empty()){
stype[i.second] = x;
location[i.second] = location[st];
if(stype[i.second] == 1){
location[i.second] -= i.first;
}
else{
location[i.second] += i.first;
}
tmp.push_back(i);
continue;
}
int found = 0;
int longDist = getDistance(tmp.back().second, i.second);
for(auto &j : tmp){
int p = longDist;
if(x == 2){
# | 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... |