# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
36016 | minkank | Fortune Telling 2 (JOI14_fortune_telling2) | C++14 | 363 ms | 78560 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;
const int N = 2e5 + 5;
int n, m, a[N], b[N], c[N], last[21][3 * N], lg[3 * N], bit[3 * N];
vector<int> Value, Query[3 * N];
long long ans;
void upd(int pos) {
for(pos; pos > 0; pos -= pos & -pos) bit[pos]++;
}
int get(int pos) {
int res = 0;
for(pos; pos < 3 * N; pos += pos & -pos) res += bit[pos];
return res;
}
void getint(int &x) {
x = 0;
char c = getchar();
while('0' > c || c > '9') c = getchar();
while('0' <= c && c <= '9') x = (x << 3) + (x << 1) + c - '0', c = getchar();
}
int main() {
getint(n); getint(m);
lg[1] = 0;
for(int i = 2; i < 3 * N; ++i) lg[i] = lg[i / 2] + 1;
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... |