# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
943286 | lovrot | Construction of Highway (JOI18_construction) | C++17 | 2078 ms | 28316 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 <cstdio>
#include <set>
#include <vector>
#include <algorithm>
#include <stack>
#define X first
#define Y second
#define PB push_back
#define MP make_pair
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int LOG = 17;
const int N = 1 << LOG;
struct fenwick {
int F[N];
stack<pii> U;
fenwick() {
for(int &x : F) x = 0;
}
void add(int x, int val, bool f = 1) {
if(f) U.push({x, val});
for(; x < N; x += x & -x) F[x] += val;
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... |