# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
654669 | AlperenT | Flight to the Ford (BOI22_communication) | C++17 | 3682 ms | 2056 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 <bits/stdc++.h>
#include "communication.h"
using namespace std;
struct Seg{
int l, r;
bool operator < (const Seg &sc) const{
if(l == sc.l) return r < sc.r;
else return l < sc.l;
}
};
vector<Seg> merge(vector<Seg> a, vector<Seg> b){
for(auto seg : b) a.push_back(seg);
return a;
}
vector<Seg> fix(vector<Seg> vec){
sort(vec.begin(), vec.end());
vector<Seg> ans;
for(auto seg : vec){
if(ans.empty() || seg.l != ans.back().r + 1) ans.push_back(seg);
else ans.back().r = seg.r;
}
return ans;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |