# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
293171 | Berted | RMQ (NOI17_rmq) | C++14 | 193 ms | 9976 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 <set>
#include <algorithm>
#define pii pair<int, int>
#define fst first
#define snd second
#define ppi pair<int, pii>
using namespace std;
ppi interval[100001];
vector<int> rollback[100001];
set<int> s;
int n, q, ans[100001];
bool ins[100001];
pii intersect(pii &a, pii &b)
{
return {max(a.fst, b.fst), min(a.snd, b.snd)};
}
int main()
{
bool fail = 0;
cin >> n >> q;
for (int i = 0; i < n; i++) {ans[i] = -1; s.insert(i);}
for (int i = 0; i < q; i++)
{
cin >> interval[i].snd.fst >> interval[i].snd.snd >> interval[i].fst;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |