# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
864220 | vjudge1 | Crossing (JOI21_crossing) | C++17 | 7034 ms | 61964 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;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define pb push_back
#define mp make_pair
struct seg2 {
vi nodes, upd;
seg2(int sz) {
nodes.resize(sz*4);
upd.resize(sz*4,-1);
}
seg2() : seg2(0) {}
int lc(int x) { return x << 1; }
int rc(int x) { return lc(x) | 1; }
void pushdown(int x) {
if (upd[x] != -1) {
nodes[x] = upd[x];
if (lc(x) < nodes.size()) nodes[lc(x)] = upd[x];
if (rc(x) < nodes.size()) nodes[rc(x)] = upd[x];
upd[x] = -1;
}
}
void update(int l, int r, int x, int xl, int xr, bool b) {
if (l > r) return;
pushdown(x);
if (l == xl && r == xr) {
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... |