# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1041181 | aymanrs | Escape Route 2 (JOI24_escape2) | C++17 | 3037 ms | 216132 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>
const int L = 17;
using namespace std;
void solve(){
int n, t, r;cin >> n >> t;
set<pair<int, int>> s[n-1];
vector<pair<int, int>> pp[n-1];
for(int i = 0;i < n-1;i++){
cin >> r;
while(r--){
int a, b;cin >> a >> b;
if(s[i].empty() || s[i].rbegin()->first<a || s[i].lower_bound({a,-1})->second > b){
auto p = s[i].insert({a,b}).first;
while(p != s[i].begin() && prev(p)->second >= b){
s[i].erase(prev(p));
}
if(p != prev(s[i].end()) && next(p)->first == p->first){
s[i].erase(next(p));
}
}
}
for(auto [a,b] : s[i]) pp[i].emplace_back(a,b);
}
vector<long long> bl[L][n-1]; vector<int> blt[L][n-1];
for(int l = 0;l < L;l++){
for(int i = 0;i < n-1;i++){
bl[l][i].resize(s[i].size());
blt[l][i].resize(s[i].size());
}
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |