CP-Library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub joji0/CP-Library

:warning: acted-monoid/MaxAssign.hpp

Code

#pragma once
#include <algorithm>
#include <cstdint>
#include <limits>

template <typename T = int64_t>
struct MaxAssign {
        using S = T;
        using F = T;
        static constexpr F NONE = std::numeric_limits<T>::min();
        static S op(S a, S b) { return std::max(a, b); }
        static S e() { return std::numeric_limits<T>::min(); }
        static S mapping(F f, S x) { return f == NONE ? x : f; }
        static F composition(F f, F g) { return f == NONE ? g : f; }
        static F id() { return NONE; }
};
#line 2 "acted-monoid/MaxAssign.hpp"
#include <algorithm>
#include <cstdint>
#include <limits>

template <typename T = int64_t>
struct MaxAssign {
        using S = T;
        using F = T;
        static constexpr F NONE = std::numeric_limits<T>::min();
        static S op(S a, S b) { return std::max(a, b); }
        static S e() { return std::numeric_limits<T>::min(); }
        static S mapping(F f, S x) { return f == NONE ? x : f; }
        static F composition(F f, F g) { return f == NONE ? g : f; }
        static F id() { return NONE; }
};
Back to top page