# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
959862 | ramalzaher | Bliskost (COI23_bliskost) | C++14 | 69 ms | 24052 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;
class BIT {
vector<int> bit;
int size;
public:
BIT(int n, vector<int> vals) {
bit.resize(n+1,0);
size=n;
for (int i=1; i<=n; i++) {
update(i,vals[i]);
}
}
void update(int pos, int val) {
while (pos<=size) {
bit[pos]+=val;
pos+=pos&-pos;
}
}
int query(int pos) {
int ans=0;
while (pos>0) {
ans+=bit[pos];
pos-=pos&-pos;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |