# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
681036 | Matteo_Verz | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++17 | 3095 ms | 27612 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 <iostream>
#include <vector>
#include <stack>
#include <algorithm>
using namespace std;
struct Query {
int l, r, w, idx, ans;
};
int main() {
int n, k;
cin >> n >> k;
vector <int> v(n);
vector <Query> q(k);
for (int i = 0; i < n; i++)
cin >> v[i];
for (int i = 0; i < k; i++) {
cin >> q[i].l >> q[i].r >> q[i].w;
q[i].l--; q[i].r--;
q[i].idx = i;
}
sort(q.begin(), q.end(), [](Query a, Query b) {
return a.r < b.r;
});
vector <int> rightpos(n, -1);
stack <int> st;
# | 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... |