# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
883776 | NK_ | Two Currencies (JOI23_currencies) | C++17 | 2413 ms | 37888 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.
// Success consists of going from failure to failure without loss of enthusiasm
#include <bits/stdc++.h>
using namespace std;
#define nl '\n'
#define pb push_back
#define sz(x) int(x.size())
#define f first
#define s second
#define mp make_pair
using ll = long long;
template<class T> using V = vector<T>;
using pi = pair<int, int>;
using QRY = array<ll, 4>;
using vpi = V<pi>;
using vi = V<int>;
using vl = V<ll>;
const int LG = 18;
struct BIT {
int N; vl A; void init(int n) { N = n; A = vl(N, 0); };
void upd(int p, int x) { for(++p;p<=N;p+=p&-p) A[p-1] += x; }
ll sum(int l, int r) { return sum(r + 1) - sum(l); }
ll sum(int r) { ll s = 0; for(;r;r-=r&-r) s += A[r-1]; return s; }
};
# | 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... |