# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
412328 | model_code | Road Closures (APIO21_roads) | C++17 | 245 ms | 47784 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 "roads.h"
#include <bits/stdc++.h>
const long long INF = 1e18;
struct Edge {
int v, w;
Edge(int _v, int _w): v(_v), w(_w) {}
};
class Fenwick {
int size, n, logn;
std::vector<int> counts;
std::vector<long long> sums;
std::vector<int> weights;
public:
void build(const std::vector<Edge> &edges) {
size = 0;
weights.resize(edges.size());
for (int i = 0; i < static_cast<int>(edges.size()); ++i) {
weights[i] = edges[i].w;
}
std::sort(weights.begin(), weights.end());
weights.erase(std::unique(weights.begin(), weights.end()), weights.end());
n = weights.size();
sums.assign(n, 0LL);
counts.assign(n, 0);
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |