# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
942397 | _callmelucian | Two Currencies (JOI23_currencies) | C++14 | 1039 ms | 53512 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;
typedef long double ld;
typedef pair<ll,ll> pl;
typedef pair<int,int> pii;
typedef tuple<int,int,int> tt;
#define all(a) a.begin(), a.end()
#define filter(a) a.erase(unique(all(a)), a.end())
const int mn = 1e5 + 5;
struct BIT {
vector<ll> tr;
BIT (int sz = 0) : tr(sz + 1) {}
int p (int k) { return k & -k; }
void update (int k, ll val) {
//cerr << "update id " << k << "\n";
for (; k < tr.size(); k += p(k)) tr[k] += val;
}
ll preSum (int k, ll ans = 0) {
//cerr << "query id " << k << "\n";
for (k; k; k -= p(k)) ans += tr[k];
return ans;
}
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... |