# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1143167 | boris_mihov | Port Facility (JOI17_port_facility) | C++17 | 27 ms | 32072 KiB |
#include <algorithm>
#include <iostream>
#include <numeric>
#include <cassert>
#include <vector>
#include <set>
typedef long long llong;
const int MAXN = 1e6 + 10;
const int MOD = 1e9 + 7;
const llong INF = 2e18;
const int MAXLOG = 21;
int n;
struct Fenwick
{
int tree[2 * MAXN];
void reset()
{
std::fill(tree + 1, tree + 1 + 2 * n, 0);
}
void update(int idx, int val)
{
for (; idx <= 2 * n ; idx += idx & (-idx))
{
tree[idx] += val;
}
}
# | 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... |