# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1090882 | phong | Treatment Project (JOI20_treatment) | C++17 | 84 ms | 14544 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>
#define ll long long
const int nmax = 1e5 + 5, N = 1e5;
const ll oo = 1e18 + 5, base = 311;
const int lg = 17,mod = 1e9 +7;
#define pii pair<ll, ll>
#define fi first
#define se second
#define endl "\n"
#define debug(a, n) for(int i = 1; i <= n; ++i) cout << a[i] << ' '; cout << "\n";
using namespace std;
int n, m;
struct node{
ll t, l, r, c;
}a[nmax];
ll dp[nmax];
ll tree[nmax << 2][2];
priority_queue<pii, vector<pii>, greater<pii>> q;
void build(int id, int l, int r){
if(l == r){
if(dp[l] == oo){
tree[id][0] = a[l].l - a[l].t;
tree[id][1] = a[l].l + a[l].t;
}
else tree[id][0] =tree[id][1] = oo;
return;
}
int mid = r+ l >> 1;
build(id << 1, l, mid);
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... |