# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
238573 | thecodingwizard | 사다리꼴 (balkan11_trapezoid) | C++11 | 974 ms | 8292 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |