# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
963520 | ONEHUNDREDPUSHUPS | Fountain (eJOI20_fountain) | C++17 | 274 ms | 43880 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 sz size()
#define ll long long
#define t s.begin()
using namespace std;
const ll N = 100100;
const ll INF = 1e18;
ll up[N][20], sum[N][20];
void solve()
{
ll n, q, i, j, k;
cin >> n >> q;
vector<ll> d(n + 5, INF), c(n + 5, INF);
for(i = 1; i <= n; ++i)
{
cin >> d[i] >> c[i];
}
set<pair<ll, int>> s;
for(i = 1; i <= n; ++i)
{
while(s.sz && (*t).first < d[i])
{
up[(*t).second][0] = i;
s.erase(t);
}
s.insert({d[i], i});
}
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... |