# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
465570 | Sench2006 | Exam (eJOI20_exam) | C++14 | 273 ms | 199108 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>
#include <unordered_map>
using namespace std;
#define ll long long
#define ar array
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
// --------------- SOLUTION --------------- //
const int N = 1e5+5;
int n;
int a[N], b[N];
int nm[N], pm[N];
void pre() {
stack<int> s;
for (int i = 1; i <= n; ++i) {
while (!s.empty() && a[s.top()] <= a[i])
s.pop();
if (s.empty())
pm[i] = 0;
else
pm[i] = s.top();
s.push(i);
}
while (!s.empty())
s.pop();
for (int i = n; i >= 1; --i) {
# | 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... |