# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
791986 | TranGiaHuy1508 | Two Currencies (JOI23_currencies) | C++17 | 1573 ms | 116128 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;
void main_program();
signed main(){
ios_base::sync_with_stdio(0); cin.tie(0);
main_program();
}
#define int long long
using ii = pair<int, int>;
struct Segtree{
vector<int> tree;
int _n;
Segtree() = default;
Segtree(int N): tree(4*N), _n(N) {}
int get(int pos) { return get(1, 0, _n - 1, pos); }
int get(int i, int l, int r, int pos){
if (l == pos && r == pos) return tree[i];
int mid = (l + r) >> 1;
if (pos <= mid) return tree[i] + get(i<<1, l, mid, pos);
else return tree[i] + get(i<<1|1, mid+1, r, pos);
}
void update(int tl, int tr, int delta) { update(1, 0, _n - 1, tl, tr, delta); }
# | 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... |