# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
587739 | alireza_kaviani | Meetings (IOI18_meetings) | C++17 | 82 ms | 9940 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 "meetings.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define SZ(x) int((x).size())
#define lc id << 1
#define rc lc | 1
const ll MAXN = 1e5 + 10;
const ll LOG = 22;
const ll INF = 1e18;
struct Node{
int mx , pref , suff , sz;
};
int n , q , A[MAXN];
Node seg[MAXN << 2];
Node merge(const Node &L , const Node &R){
if(L.sz == 0) return R;
if(R.sz == 0) return L;
Node ans;
ans.mx = max(L.mx , R.mx);
ans.mx = max(ans.mx , L.suff + R.pref);
ans.sz = L.sz + R.sz;
ans.pref = L.pref + (L.pref == L.sz ? R.pref : 0);
ans.suff = R.suff + (R.suff == R.sz ? L.suff : 0);
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... |