compro_library

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

View the Project on GitHub siro53/compro_library

:warning: data-structure/monoid/min_index.hpp

Code

#pragma once

#include <algorithm>
#include <limits>
#include <utility>

template <typename T, T INF = std::numeric_limits<T>::max()> struct MonoidMinWithIndex {
    using S = std::pair<T, int>;
    using value_type = S;
    inline static S op(const S &l, const S &r) { return std::min(l, r); }
    inline static S e() {
        return std::make_pair(INF, -1);
    }
};
#line 2 "data-structure/monoid/min_index.hpp"

#include <algorithm>
#include <limits>
#include <utility>

template <typename T, T INF = std::numeric_limits<T>::max()> struct MonoidMinWithIndex {
    using S = std::pair<T, int>;
    using value_type = S;
    inline static S op(const S &l, const S &r) { return std::min(l, r); }
    inline static S e() {
        return std::make_pair(INF, -1);
    }
};
Back to top page