# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
471123 | keta_tsimakuridze | Street Lamps (APIO19_street_lamps) | C++14 | 692 ms | 62540 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>
#define f first
#define s second
#define int long long
#define pii pair<int,int>
using namespace std;
const int N = 3e5 + 5, mod = 1e9 + 7; // !
int t, tree[4 * N],Q, fw[N],a[N],n,ans[N];
string s;
vector<pii> add[N],q[N];
vector<int> rem[N];
void update(int u,int ind,int l,int r) {
if(l > ind || r < ind) return;
if(l == r) {
tree[u] ^= 1;
return;
}
int mid = (l + r)/2;
update(2 * u,ind,l,mid); update(2 * u + 1,ind,mid + 1, r);
tree[u] = min(tree[2 * u], tree[2 *u + 1]);
}
int getL(int u,int ind,int l,int r) {
if(l > ind) return 0;
if(l == r) {
if(tree[u]) {
return l;
}
return l + 1;
}
int mid = (l + r)/2;
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... |