This documentation is automatically generated by online-judge-tools/verification-helper
#include "src/utility/fenwick_tree/add.hpp"
zawa::fenwick_tree
にのせる構造体です。一般的な加法を提供します。
dat_type
: 型です。 T
とエイリアスされますstatic constexpr T id
: T{}
ですstatic T add(const T& a, const T& b)
: a + b
を返しますstatic T inverse(const T& a)
: -a
を返します#pragma once
namespace zawa {
template <class dat_type>
struct add_structure {
using T = dat_type;
static constexpr T id = T{};
static T add(const T& a, const T& b) {
return a + b;
}
static T inverse(const T& a) {
return -a;
}
};
} // namespace zawa
#line 2 "src/utility/fenwick_tree/add.hpp"
namespace zawa {
template <class dat_type>
struct add_structure {
using T = dat_type;
static constexpr T id = T{};
static T add(const T& a, const T& b) {
return a + b;
}
static T inverse(const T& a) {
return -a;
}
};
} // namespace zawa