# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
171201 | nobik | Rectangles (IOI19_rect) | C++14 | 5105 ms | 608712 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "rect.h"
#include <bits/stdc++.h>
using namespace std;
vector<vector<pair<int, int>>> CalcSegments(const vector<int>& a) {
int n = static_cast<int>(a.size());
vector<vector<pair<int, int>>> segments(n);
vector<int> s;
for (int i = 0; i < n; ++i) {
while (!s.empty()) {
int segment = i - s.back() - 1;
if (segment > 0)
segments[i].emplace_back(segment, 1);
if (a[s.back()] >= a[i])
break;
s.pop_back();
}
if (!s.empty() && a[s.back()] == a[i])
s.pop_back();
s.push_back(i);
}
segments.shrink_to_fit();
return segments;
}
vector<pair<int, int>> Merge(const vector<pair<int, int>>& a, const vector<pair<int, int>>& b) {
# | 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... |