# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
702107 | ymm | Candies (JOI18_candies) | C++17 | 309 ms | 23340 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 Loop(x,l,r) for (ll x = (l); x < (ll)(r); ++x)
#define LoopR(x,l,r) for (ll x = (r)-1; x >= (ll)(l); --x)
typedef long long ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll , ll > pll;
using namespace std;
const int N = 200'010;
ll a[N];
struct Obj {
int l, r;
ll val0, val1;
} obj[N];
int rt[N];
ll val(int x) { return obj[x].val0 - obj[x].val1; }
set<pair<ll, int>, greater<pair<ll, int>>> pq;
int main()
{
cin.tie(0) -> sync_with_stdio(false);
int n;
cin >> n;
Loop (i,0,n+2) {
if (i==0 || i==n+1)
a[i] = -1e18;
else
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |