# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
538595 | hohohaha | Street Lamps (APIO19_street_lamps) | C++14 | 4061 ms | 424408 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;
#define fori(i, l, r) for(int i = (int) (l); i <= (int) (r); i++)
#define ford(i, r, l) for(int i = (int) (r); i >= (int) (l); i--)
#define ii pair<int, int>
#define fi first
#define se second
#define vi vector<int>
#define eb emplace_back
#define em emplace
#define sp ' '
#define endl '\n'
#define int long long
const int maxn = 5e5 + 5;
int n, q;
char c[maxn];
string tp[maxn];
int id[maxn];
bool state[maxn];
int ans[maxn];
struct it {
vi mn, mx; // min, max of off ones
it (int len= 1) {
mn = vi(4 * len + 5, n);
mx = vi(4 * len + 5, 0);
build(1, 1, len);
}
void build(int u, int l, int r) {
if(l == r) mn[u] = mx[u] = l;
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... |