# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
23368 | gs14004 | New Ocurrences (KRIII5_NO) | C++11 | 499 ms | 49372 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pi;
typedef long long lint;
const int MAXN = 100005;
int n;
struct bit{
lint tree[MAXN];
lint sum;
void add(int x, lint v){
x++;
sum += v;
while(x <= n+1){
tree[x] += v;
x += x & -x;
}
}
lint query(int x){
if(x == n) return sum;
x++;
lint ret = 0;
while(x){
ret += tree[x];
x -= x & -x;
}
return ret;
}
}bl, br;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |