# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
646851 | chenwz | Abracadabra (CEOI22_abracadabra) | C++11 | 608 ms | 34240 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>
#define sz(v) ((int)(v).size())
using namespace std;
typedef long long lint;
typedef pair<int, int> pi;
using VI = vector<int>;
const int NN = 2e5 + 4;
struct BIT {
int C[NN];
void add(int x, int v) {
while (x < NN) C[x] += v, x += x & -x;
}
int sum(int x) {
int ret = 0;
while (x) ret += C[x], x -= x & -x;
return ret;
}
int kth(int x) {
int pos = 0;
for (int i = 17; i >= 0; i--)
if (pos + (1 << i) < NN && C[pos + (1 << i)] < x)
pos += (1 << i), x -= C[pos];
return pos + 1;
}
};
BIT S;
int main() {
ios::sync_with_stdio(false), cin.tie(0);
int n, q;
cin >> n >> q;
# | 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... |