# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1163631 | DangKhoizzzz | Growing Trees (BOI11_grow) | C++20 | 107 ms | 1604 KiB |
#include <bits/stdc++.h>
// #define int long long
using namespace std;
const int maxn = 1e5 + 7;
struct Fenwick_Tree
{
vector <int> tree = vector <int> (maxn , 0);
void update(int pos , int val)
{
while(pos < (int)tree.size())
{
tree[pos] += val;
pos += (pos & (-pos));
}
}
int get_prefix(int pos)
{
int sum = 0;
while(pos > 0)
{
sum += tree[pos];
pos -= (pos & (-pos));
}
return sum;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |