# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
284353 | Alexa2001 | Employment (JOI16_employment) | C++17 | 217 ms | 12148 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int Nmax = 4e5 + 5;
int n, q, m;
int tip[Nmax/2], val[Nmax/2], p[Nmax/2], a[Nmax/2];
vector<int> all;
class AIB
{
int ub(int x) { return (x&(-x)); }
int a[Nmax];
public:
void upd(int x, int y, int add)
{
for(; y; y-=ub(y)) a[y] += add;
for(--x; x; x-=ub(x)) a[x] -= add;
}
int query(int x)
{
int ans = 0;
for(; x<=m; x+=ub(x)) ans += a[x];
return ans;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |