library

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

View the Project on GitHub gyouzasushi/library

:heavy_check_mark: Monoid: GCD
(algebra/monoid_gcd.hpp)

Verified with

Code

#pragma once
#include <numeric>
template <class T>
struct monoid_gcd {
    using S = T;
    static S op(S a, S b) {
        return std::gcd(a, b);
    }
    static S e() {
        return T(0);
    }
};
#line 2 "algebra/monoid_gcd.hpp"
#include <numeric>
template <class T>
struct monoid_gcd {
    using S = T;
    static S op(S a, S b) {
        return std::gcd(a, b);
    }
    static S e() {
        return T(0);
    }
};
Back to top page