# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
389591 | solaimanope | Fireworks (APIO16_fireworks) | C++17 | 282 ms | 72116 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>
using namespace std;
typedef long long LL;
/**
* @brief Slope-Trick
* @see https://maspypy.com/slope-trick-1-%E8%A7%A3%E8%AA%AC%E7%B7%A8
*/
template< typename T >
struct SlopeTrick {
T INF = numeric_limits< T >::max() / 3;
T min_f;
priority_queue< T, vector< T >, less<> > L;
priority_queue< T, vector< T >, greater<> > R;
T add_l, add_r;
//private:
void push_R(const T &a) {
R.push(a - add_r);
}
T top_R() const {
return R.top() + add_r;
}
T pop_R() {
T val = top_R();
R.pop();
# | 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... |