# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
941458 | TAhmed33 | Two Currencies (JOI23_currencies) | C++98 | 1841 ms | 66952 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 ll;
const int MAXN = 1e5 + 25;
#define mid ((l + r) >> 1)
#define tl (node + 1)
#define tr (node + 2 * (mid - l + 1))
struct SegmentTree {
ll tree[MAXN << 1];
void init () {
for (int i = 1; i < MAXN; i++) tree[i] = 0;
}
void update (ll pos, ll val) {
for (; pos < MAXN; pos += pos & (-pos)) tree[pos] += val;
}
ll get (ll x) {
ll sum = 0;
for (; x; x -= x & (-x)) sum += tree[x];
return sum;
}
ll get (ll l, ll r) {
return get(r) - get(l - 1);
}
} cur, cur3;
vector <int> adj[MAXN];
int n, m, q;
pair <ll, ll> dd[MAXN];
array <ll, 5> queries[MAXN];
ll ans[MAXN];
ll low[MAXN], high[MAXN];
# | 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... |