comp-library

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

View the Project on GitHub luzhiled1333/comp-library

:heavy_check_mark: src/data-structure/segment-tree/presets/monoid/operator-structure-chmin.hpp

Required by

Verified with

Code

#pragma once

#include <algorithm>
#include <limits>

namespace luz::monoid {

  template < typename T >
  class RangeChminQueryMonoid {
    static constexpr T identity_{std::numeric_limits< T >::max()};

   public:
    using value_type = T;

    static constexpr T operation(T a, T b) {
      return std::min(a, b);
    }

    static constexpr T identity() {
      return identity_;
    }
  };

} // namespace luz::monoid
#line 2 "src/data-structure/segment-tree/presets/monoid/operator-structure-chmin.hpp"

#include <algorithm>
#include <limits>

namespace luz::monoid {

  template < typename T >
  class RangeChminQueryMonoid {
    static constexpr T identity_{std::numeric_limits< T >::max()};

   public:
    using value_type = T;

    static constexpr T operation(T a, T b) {
      return std::min(a, b);
    }

    static constexpr T identity() {
      return identity_;
    }
  };

} // namespace luz::monoid
Back to top page