# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1003944 | vjudge1 | Ekoeko (COCI21_ekoeko) | C++17 | 16 ms | 3356 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;
using lli = long long;
const int MAXN = 2e5 + 10;
int bit[MAXN];
void add(int idx, int x, int n) {
for (; idx < n; idx = idx | (idx + 1))
bit[idx] += x;
}
int pref(int idx) {
int sum = 0;
for (; idx >= 0; idx = (idx & (idx + 1)) - 1)
sum += bit[idx];
return sum;
}
int sum(int l, int r) { return pref(r) - pref(l-1); }
int main() {
int n;
cin >> n;
n *= 2;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |