# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
42808 | minhtung0404 | Segments (IZhO18_segments) | C++14 | 2360 ms | 12536 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.
//https://oj.uz/problem/view/IZhO18_segments
#include<bits/stdc++.h>
const int N = 2e5 + 5;
const int MAGIC = 447;
using namespace std;
struct segment{
int l, r, id;
};
vector <segment> mv;
set <int> ms;
int n, t, L[N], R[N], ans, cnt;
int l_sort[N], r_sort[N], l_nosort[N], r_nosort[N], p[N], num;
bool ck[N];
int bsearch(int l, int r, int k){
while (l != r){
int mid = (l + r) >> 1;
if (r_nosort[mid] - l_nosort[mid] + 1 >= k) r = mid;
else l = mid + 1;
}
if (r_nosort[l] - l_nosort[l] + 1 < k) return l + 1;
return l;
}
void get_L(int pos, int k){
int Max = (pos / MAGIC + 1) * MAGIC;
for (int i = pos; i < min(Max, cnt); i++) if (r_nosort[pos] < k) ans--;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |