# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
30581 | RayaBurong25_1 | Roller Coaster Railroad (IOI16_railroad) | C++14 | 939 ms | 47984 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 "railroad.h"
#include <set>
#include <algorithm>
#define INF 1000000007
std::set<long long> I;
std::vector<long long> Ic;
long long Fen[400005];
int Pa[400005];
int n;
typedef struct node node;
struct node
{
int u, v;
long long w;
};
int compareW(node a, node b)
{
return (a.w < b.w);
}
std::vector<node> E;
void update(int pos, int val)
{
for (; pos <= Ic.size(); pos += pos&-pos)
Fen[pos] += val;
}
long long query(int pos)
{
long long r = 0;
for (; pos > 0; pos -= pos&-pos)
r += Fen[pos];
Compilation message (stderr)
# | 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... |