# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1169537 | shiomusubi496 | Bulldozer (JOI17_bulldozer) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep2(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define rrep(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define rrep2(i, a, b) for (int i = (int)(b) - 1; i >= (int)(a); --i)
#define all(v) begin(v), end(v)
#define rall(v) rbegin(v), rend(v)
using namespace std;
using ll = long long;
using PLL = pair<ll, ll>;
template<class T, class U> bool chmin(T& a, const U& b) { return a > b ? a = b, true : false; }
template<class T, class U> bool chmax(T& a, const U& b) { return a < b ? a = b, true : false; }
constexpr ll inf = 1e18;
class SubstrMax {
vector<ll> v;
public:
SubstrMax(vector<ll> v_) : v(v_) {}
void set(int k, ll x) {
v[k] = x;
}
ll all_prod() const {
ll ans = 0;
rep (l, v.size()) {