library

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

View the Project on GitHub gyouzasushi/library

:heavy_check_mark: Semiring: Plus Times
(algebra/semiring_plus_times.hpp)

Required by

Verified with

Code

#pragma once
template <class T>
struct semiring_plus_times {
    using S = T;
    static S add(S a, S b) {
        return a + b;
    }
    static S zero() {
        return T(0);
    }
    static S mul(S a, S b) {
        return a * b;
    }
    static S one() {
        return T(1);
    }
};
#line 2 "algebra/semiring_plus_times.hpp"
template <class T>
struct semiring_plus_times {
    using S = T;
    static S add(S a, S b) {
        return a + b;
    }
    static S zero() {
        return T(0);
    }
    static S mul(S a, S b) {
        return a * b;
    }
    static S one() {
        return T(1);
    }
};
Back to top page