# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
799256 | IvanJ | Measures (CEOI22_measures) | C++17 | 287 ms | 28588 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 pb push_back
#define x first
#define y second
#define all(a) (a).begin(), (a).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const int maxn = 4e5 + 5;
const ll inf = 1e18;
struct Data {
ll ans, cnt, mini, maxi;
};
Data merge(Data A, Data B) {
if(B.cnt == 0) return A;
if(A.cnt == 0) return B;
Data ret;
ret.ans = max(A.ans, B.ans);
ret.ans = max(ret.ans, B.maxi - A.mini);
ret.cnt = A.cnt + B.cnt;
ret.mini = min(A.mini, B.mini);
ret.maxi = max(A.maxi, B.maxi);
return ret;
}
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... |