# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
378463 | ijxjdjd | Luxury burrow (IZhO13_burrow) | C++14 | 545 ms | 15108 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 FR(i, N) for (int i = 0; i < int(N); i++)
#define all(x) begin(x), end(x)
using namespace std;
using ll = long long;
const int MAXN = 1000;
bool active[MAXN][MAXN];
int board[MAXN][MAXN];
int histoArea(vector<int>& hist) {
stack<pair<int, int>> st;
int mx = 0;
FR(i, hist.size()) {
while (st.size() && hist[st.top().first] >= hist[i]) {
mx = max(hist[st.top().first] * (i-st.top().second-1), mx);
st.pop();
}
st.push({i, (st.size() ? st.top().first : -1)});
}
return mx;
}
int maxArea(int N, int M) {
vector<int> cur(M+1);
cur[M] = -1;
int res = 0;
FR(i, N) {
FR(j, M) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |