# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
221526 | IgorI | Meetings (IOI18_meetings) | C++17 | 5573 ms | 26116 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 <map>
#include <algorithm>
using namespace std;
const int N = 800000;
int n, q;
int H[N];
pair<int, int> sp[20][N];
pair<int, int> spmax(int l, int r, int id)
{
int len = r - l + 1;
int jj = H[len];
if (id == 0)
{
return max(sp[jj][l], sp[jj][r - (1 << jj) + 1]);
}
else
{
if (sp[jj][l].first != sp[jj][r - (1 << jj) + 1].first)
return max(sp[jj][l], sp[jj][r - (1 << jj) + 1]);
else
return min(sp[jj][l], sp[jj][r - (1 << jj) + 1]);
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |