# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
391310 | phathnv | Street Lamps (APIO19_street_lamps) | C++11 | 2790 ms | 100168 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;
const int N = 3e5 + 7;
struct Query{
int type, a, b;
};
struct Bit2D{
vector<int> nodes[N], d[N];
void fakeUpdate(int x, int y){
for(; x < N; x += x & -x)
nodes[x].push_back(y);
}
void fakeQuery(int x, int y){
for(; x > 0; x -= x & -x)
nodes[x].push_back(y);
}
void normalize(){
for(int i = 1; i < N; i++){
sort(nodes[i].begin(), nodes[i].end());
nodes[i].resize(unique(nodes[i].begin(), nodes[i].end()) - nodes[i].begin());
d[i].assign(nodes[i].size() + 1, 0);
}
}
void update(int x, int y, int val){
for(; x < N; x += x & -x){
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... |