# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
944612 | anudari_t | Dominance (CEOI08_dominance) | C++17 | 10 ms | 612 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>
using namespace std;
using lint = long long;
using pi = pair<lint, lint>;
const int MAXN = 6005;
struct rect{
int sx, ex, sy, ey, v;
};
struct event{
int s, e, x, y;
};
int n;
pi solve(vector<rect> v){
vector<int> vx, vy;
for(auto &i : v){
vy.push_back(i.sy);
vy.push_back(i.ey + 1);
}
sort(vy.begin(), vy.end());
vy.resize(unique(vy.begin(), vy.end()) - vy.begin());
vector<event> ev;
for(auto &i : v){
ev.push_back({i.sy, i.ey + 1, i.sx, +i.v});
ev.push_back({i.sy, i.ey + 1, i.ex + 1, -i.v});
}
sort(ev.begin(), ev.end(), [&](const event &x, const event &y){
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |