# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
992726 | KietJ | Two Currencies (JOI23_currencies) | C++17 | 1321 ms | 102620 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;
#define f first
#define s second
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
typedef long long ll;
typedef pair <int, int> ii;
const int N = 3e5 + 5;
const int mod = 998244353;
struct Bit {
int n; vector <ll> bit;
Bit (int _n): n(_n), bit(_n + 2, 0) {};
void up(int x, int val) {
for(; x <= n; x += (x & -x)) bit[x] += val;
}
ll get(int x) {
ll ans = 0;
for(; x; x -= (x & -x)) ans += bit[x];
return ans;
}
void up_range(int l, int r, int val) {
up(l, val), up(r + 1, -val);
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... |