# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
746356 | baluteshih | Tourism (JOI23_tourism) | C++14 | 486 ms | 39492 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 pair<int, int> pii;
typedef pair<ll, ll> pll;
#define X first
#define Y second
#define SZ(a) ((int)a.size())
#define ALL(v) v.begin(), v.end()
#define pb push_back
const int MAXN = 100005;
const int K = 320;
struct Node {
int mi, micnt, smi, lazy;
} seg[MAXN << 2];
int cnt[MAXN], bcnt[MAXN / K + 1];
void up(int rt) {
seg[rt].mi = min(seg[rt << 1].mi, seg[rt << 1 | 1].mi);
seg[rt].micnt = 0;
seg[rt].smi = min(seg[rt << 1].smi, seg[rt << 1 | 1].smi);
if (seg[rt].mi == seg[rt << 1].mi) seg[rt].micnt += seg[rt << 1].micnt;
else seg[rt].smi = min(seg[rt].smi, seg[rt << 1].mi);
if (seg[rt].mi == seg[rt << 1 | 1].mi) seg[rt].micnt += seg[rt << 1 | 1].micnt;
else seg[rt].smi = min(seg[rt].smi, seg[rt << 1 | 1].mi);
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |