# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1174159 | nguyenkhangninh99 | Carnival (CEOI14_carnival) | C++17 | 5 ms | 444 KiB |
#include <bits/stdc++.h>
using namespace std;
/*
struct Seg {
int l, r, id;
bool operator<(const Seg &s) const {
return r > s.r;
}
};
int n;
vector<int> a, d;
vector<vector<Seg>> fiseg;
bool ok(int x) {
vector<int> b = a;
priority_queue<Seg> pq;
for (int i = 1; i <= n; ++i) {
for (auto &seg : segment[i]) pq.push(seg);
int cur = 0;
while (!pq.empty() && cur < x) {
if (pq.empty()) break;
Seg seg = pq.top();
if (seg.r < i) return false;
# | 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... |