# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1102047 | Pacybwoah | Tower (JOI24_tower) | C++17 | 91 ms | 16328 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<iostream>
#include<vector>
#include<algorithm>
#include<utility>
#include<cassert>
#include<set>
using namespace std;
typedef long long ll;
ll inf = 8e18;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n, q;
cin >> n >> q;
ll d, a, b;
cin >> d >> a >> b;
vector<pair<int, int>> vec;
for(int i = 0; i < n; i++){
ll l, r;
cin >> l >> r;
vec.emplace_back(l, r);
assert(r <= 1000000);
}
vector<ll> dp(1000001, inf);
dp[0] = 0;
for(auto &[l, r]: vec){
for(int i = l; i <= r; i++) dp[i] = -1;
}
for(int i = 1; i <= 1000000; i++){
if(dp[i] == -1) continue;
# | 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... |