# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
849506 | popovicirobert | Street Lamps (APIO19_street_lamps) | C++14 | 1469 ms | 524288 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>
#define lsb(x) (x & (-x))
using ull = unsigned long long;
using ll = long long;
using namespace std;
namespace Containers {
struct Segment {
long long l, r;
bool operator<(const Segment& rhs) const noexcept {
if (l == rhs.l) return r < rhs.r;
return l < rhs.l;
}
};
class DisjointSegmentContainer : public multiset<Segment> {
public:
vector<Segment> Add(Segment segm) {
auto intersecting = GetIntersecting(segm);
ll new_l = segm.l;
ll new_r = segm.r;
for (auto s : intersecting) {
new_l = min(new_l, s.l);
new_r = max(new_r, s.r);
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... |