This documentation is automatically generated by online-judge-tools/verification-helper
#include "src/utility/monoid/addMonoid.hpp"
加法のモノイドを表現した構造体です。
zawa::addMonoid<T>
T
: int
long long
など0が単位元で加法が定義できるもの
using valueType = T
データ構造で使うために必要なやつ
メンバ
static constexpr valueType identity
加法単位元、0
static value_type operation(const value_type& a, const value_type& b)
加法、a + bを返す
#pragma once
namespace zawa {
template <class T>
struct addMonoid {
using valueType = T;
static constexpr valueType identity{};
static valueType operation(const valueType& a, const valueType& b) {
return a + b;
}
};
} // namespace zawa
#line 2 "src/utility/monoid/addMonoid.hpp"
namespace zawa {
template <class T>
struct addMonoid {
using valueType = T;
static constexpr valueType identity{};
static valueType operation(const valueType& a, const valueType& b) {
return a + b;
}
};
} // namespace zawa