# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
238573 | thecodingwizard | trapezoid (balkan11_trapezoid) | C++11 | 974 ms | 8292 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;
#define pb push_back
#define ii pair<int, int>
#define f first
#define s second
const int mod = 30013;
int main() {
int n; cin >> n;
vector<ii> topLeft;
vector<pair<ii, ii>> A;
for (int i = 0; i < n; i++) {
int a, b, c, d; cin >> a >> b >> c >> d;
A.pb({{a,b},{c,d}});
topLeft.pb({a,i});
}
sort(topLeft.begin(), topLeft.end());
int tlIdx = 0;
set<ii> q;
map<int, ii> traps;
ii dp[n];
while (tlIdx != n) {
while (!q.empty() && q.begin()->f < topLeft[tlIdx].f) {
int x = q.begin()->s;
q.erase(q.begin());
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |