# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
518327 | ioilolcom | Luxury burrow (IZhO13_burrow) | C++14 | 1022 ms | 18596 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 endl "\n"
#define pii pair<int,int>
#define pb push_back
#define x first
#define y second
#define sz(x) ((int)(x).size())
#define mp make_pair
typedef long long int ll;
int nn,m,k;
const int N=1050;
int g[N][N];
int histogram( vector<int> vv){
vector<int> a;
a.push_back(0);
for(int e:vv) {
a.push_back(e);
}
int n=sz(a)-1;
vector<int> rt(n+1);
vector<int> lft(n+1);
vector<pair<int,int> > v;
for(int i=1; i<=n; i++) {
while(sz(v)&&v.back().first>=a[i]) {
v.pop_back();
}
if(sz(v)) {
lft[i]=v.back().second+1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |