# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1112197 | ortsac | Fortune Telling 2 (JOI14_fortune_telling2) | C++17 | 2 ms | 336 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 int long long
#define pii pair<long long, long long>
#define fr first
#define se second
const int MAXN = 2e5 + 10;
const int INF = 0x3f3f3f3f3f3f3f3f;
struct Node {
int mi = INF, mx = -INF;
int qtdmx = 0;
};
Node merge(const Node& a, const Node& b) {
Node ans;
ans.mi = min(a.mi, b.mi);
ans.mx = max(a.mx, b.mx);
if (ans.mx == a.mx) ans.qtdmx += a.qtdmx;
if (ans.mx == b.mx) ans.qtdmx += b.qtdmx;
return ans;
}
Node seg[4*MAXN];
int v[MAXN];
void build(int node, int l, int r) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |