# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
654727 | prvocislo | Flight to the Ford (BOI22_communication) | C++17 | 3420 ms | 1948 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"communication.h"
#include <algorithm>
#include <iostream>
#include <vector>
typedef long long ll;
using namespace std;
struct segment { int l, r; };
bool cmp(segment a, segment b)
{
return a.l < b.l;
}
int siz(const vector<segment>& v)
{
int sum = 0;
for (segment i : v) sum += i.r - i.l + 1;
return sum;
}
int kth(const vector<segment> &v, int k) // k-ty prvok ktory mame (1-indexovane)
{
for (segment i : v)
{
if (i.l + k - 1 <= i.r) return i.l + k - 1;
k -= (i.r - i.l + 1);
}
return 1e9 + 5;
}
vector<segment> sub(const vector<segment>& v, int l, int r) // zober len prvky l az r
{
vector<segment> nw;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |