# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1175920 | VMaksimoski008 | Constellation 3 (JOI20_constellation3) | C++20 | 474 ms | 92020 KiB |
#include <bits/stdc++.h>
#define ar array
//#define int long long
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const int mod = 1e9 + 7;
const ll inf = 1e18;
const int maxn = 2e5 + 5;
struct fenwick {
int n;
vector<ll> tree;
void init(int _n) { n = _n + 10; tree.resize(n+50); }
void update(int p, ll v) {
for(p++; p<n; p+=p&-p) tree[p] += v;
}
ll query(int p) {
ll ans = 0;
for(p++; p; p-=p&-p) ans += tree[p];
return ans;
}
} fwt[2];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |