cpp_library

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

View the Project on GitHub toyama1710/cpp_library

:heavy_check_mark: data_type/sum_monoid.hpp

Verified with

Code

#ifndef SUM_MONOID_HPP
#define SUM_MONOID_HPP

template <class T>
struct SumMonoid {
    using value_type = T;
    inline static T identity() {
        return (T)0;
    };
    inline static T operation(const T a, const T b) {
        return a + b;
    };
};

#endif
#line 1 "data_type/sum_monoid.hpp"



template <class T>
struct SumMonoid {
    using value_type = T;
    inline static T identity() {
        return (T)0;
    };
    inline static T operation(const T a, const T b) {
        return a + b;
    };
};
Back to top page