# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
651458 | NaimSS | Radio Towers (IOI22_towers) | C++17 | 2055 ms | 74840 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 "towers.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
#define rep(i,a,b) for(int i=(a);i<(b);++i)
typedef pair<int,int> pii;
typedef pair<int,pii> piii;
#define ff first
#define ss second
const int DEBUG=0;
const int N = 100100;
const int inf = 2e9;
int h[N];
// arvore para achar os indices l' e r':
struct value{
int mn,mx,best,best2;
value(){
mn = inf,mx=-inf,best=best2=-inf;
}
value operator+(const value &o)const{
value res;
res.mn = min(mn,o.mn);
res.mx = max(mx,o.mx);
res.best = max({best,o.best,o.mx - mn});
res.best2 = max({best2,o.best2,mx - o.mn});
return res;
}
};
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |