This documentation is automatically generated by online-judge-tools/verification-helper
View the Project on GitHub kmyk/competitive-programming-library
#include "monoids/max_index.hpp"
#pragma once #include <algorithm> #include <climits> #include <limits> #include <utility> /** * @note a semilattice */ template <class T> struct max_index_monoid { typedef std::pair<T, int> value_type; value_type unit() const { return std::make_pair(std::numeric_limits<T>::lowest(), INT_MIN); } value_type mult(value_type a, value_type b) const { return std::max(a, b); } };
#line 2 "monoids/max_index.hpp" #include <algorithm> #include <climits> #include <limits> #include <utility> /** * @note a semilattice */ template <class T> struct max_index_monoid { typedef std::pair<T, int> value_type; value_type unit() const { return std::make_pair(std::numeric_limits<T>::lowest(), INT_MIN); } value_type mult(value_type a, value_type b) const { return std::max(a, b); } };