# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
103748 | alexpetrescu | Rail (IOI14_rail) | C++14 | 76 ms | 760 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 <algorithm>
#include <set>
#include <cstdio>
#define INF 1000000000
#define MAXN 5009
int dist[MAXN], perm[MAXN];
std::set < int > C, D;
std::set < int > ::iterator it, it2;
bool cmp(const int &a, const int &b) {
return dist[a] < dist[b];
}
inline bool notFound(int x) {
it = C.lower_bound(x);
if (it != C.end() && *it == x)
return 0;
it = D.lower_bound(x);
if (it != D.end() && *it == x)
return 0;
return 1;
}
inline int myGetDistance(int x, char a, int y, char b) {
if (a == 'C') {
if (b == 'D') {
# | 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... |