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-add.hpp

Required by

Verified with

Code

#pragma once

namespace luz::monoid {

  template < typename T >
  class RangeAddQueryMonoid {

   public:
    using value_type = T;

    static constexpr T operation(T a, T b) {
      return a + b;
    }

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

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

namespace luz::monoid {

  template < typename T >
  class RangeAddQueryMonoid {

   public:
    using value_type = T;

    static constexpr T operation(T a, T b) {
      return a + b;
    }

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

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