# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
124714 | Noam527 | Exhibition (JOI19_ho_t2) | C++17 | 293 ms | 5416 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 finish(x) return cout << x << endl, 0
typedef long long ll;
typedef long double ldb;
const int md = 1e9 + 7;
const ll inf = 1e18;
const int OO = 1;
const int OOO = 1;
using namespace std;
int n, m;
vector<pair<int, int>> a;
vector<int> b;
bool can(int x) {
priority_queue<int, vector<int>, greater<int>> Q;
int lst = -1, nxt = 0;
for (int i = m - x; i < m; i++) {
while (nxt < a.size() && a[nxt].first <= b[i]) {
if (a[nxt].second >= lst) Q.push(a[nxt].second);
nxt++;
}
if (!Q.size()) return false;
lst = Q.top();
Q.pop();
}
return true;
}
int main() {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |