#pragma once
#include<utility>namespacehaar_lib{template<typenameT>structaffine_monoid{usingvalue_type=std::pair<T,T>;value_typeoperator()()const{returnstd::make_pair(1,0);}value_typeoperator()(constvalue_type&a,constvalue_type&b)const{returnstd::make_pair(a.first*b.first,a.first*b.second+a.second);}};}// namespace haar_lib