# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
417938 | parsabahrami | Sumtree (INOI20_sumtree) | C++17 | 1494 ms | 129148 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 <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
#define SZ(x) (int) (x).size();
#define F first
#define S second
#define int ll
int Pow(int a, int b, int md, int ret = 1) {
for (; b; b >>= 1, a = 1ll * a * a % md)
if (b & 1) ret = 1ll * ret * a % md;
return ret;
}
const int N = 5e5 + 10, MOD = 1e9 + 7;
int F[N], St[N], Ft[N], I[N], hv[N], hd[N], S[N], P[N], val[N], H[N], n, q, R, timer;
vector<int> adj[N]; set<pii> st[N]; ll ret; int cnt = 0;
struct node {
ll d, lz; node *lc, *rc;
node() : d(0), lz(0), lc(nullptr), rc(nullptr) {}
void bld(int l = 0, int r = n) {
if (r - l < 2) return;
lc = new node(); rc = new node();
int md = (l + r) >> 1;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |