# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
124678 | EntityIT | Street Lamps (APIO19_street_lamps) | C++14 | 3532 ms | 135828 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.
/*
check long long - int
check N
*/
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
const int N = (int)3e5 + 5, Q = N;
int n, q;
string initSate;
struct Query {
int t, a, b;
Query (int _t = 0, int _a = 0, int _b = 0) : t(_t), a(_a), b(_b) {}
} query[Q];
struct Bit {
static const int LOG = __lg(N) + 1;
int a[1 << LOG];
void init () { memset(a, 0, sizeof a); }
void update (int pos, int val) {
for (; pos < (1 << LOG); pos += pos & -pos) a[pos] += val;
}
int get (int pos) {
int ret = 0;
for (; pos > 0; pos -= pos & -pos) ret += a[pos];
return ret;
# | 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... |