mkreem_library

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

View the Project on GitHub mkr33m/mkreem_library

:warning: Others/AbelianGroups.hpp

Code

#ifndef AbelianGroup_HPP
#define AbelianGroup_HPP

/**
 * 保証される代数的構造
 * ・結合法則
 * ・単位元の存在
 * ・逆元の存在
 * ・可換性
 */

#include <cmath>

#include "/home/pomelo/github.com/mkreem_library/ac-library/atcoder/modint.hpp"
#ifndef ATCODER_MODINT_HPP
#define ATCODER_MODINT_HPP // <- #include <ac-library/all> したときに重複してしまうから必須
#endif

// 加算群
template <typename T>
struct AdditiveGroup {
    using S = T;
    static S e() {
        return 0;
    }
    static S op(const S& l, const S& r) {
        return l + r;
    }
    static S inv(const S& x){
        return -x;
    }
};

// 乗算群
template <typename T = atcoder::modint998244353>
struct MultiplicativeGroup_998 {
    using S = T;
    static S e() {
        return 1;
    }
    static S op(const S& l, const S& r) {
        return l * r;
    }
    static S inv(const S& x) {
        return x.inv();
    }
};

// 乗算群
template <typename T = atcoder::modint1000000007>
struct MultiplicativeGroup_100 {
    using S = T;
    static S e() {
        return 1;
    }
    static S op(const S& l, const S& r) {
        return l * r;
    }
    static S inv(const S& x) {
        return x.inv();
    }
};

// XOR 群
template <typename T>
struct XorGroup {
    using S = T;
    static S e(){
        return 0;
    }
    static S op(const S& l, const S& r) {
        return l ^ r;
    }
    static S inv(const S& x){
        return x;
    }
};


#endif // AbelianGroup_HPP
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
    bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir]}).decode()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/languages/cplusplus.py", line 187, in bundle
    bundler.update(path)
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 401, in update
    self.update(self._resolve(pathlib.Path(included), included_from=path))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 260, in _resolve
    raise BundleErrorAt(path, -1, "no such header")
onlinejudge_verify.languages.cplusplus_bundle.BundleErrorAt: /home/pomelo/github.com/mkreem_library/ac-library/atcoder/modint.hpp: line -1: no such header
Back to top page