This documentation is automatically generated by competitive-verifier/competitive-verifier
#include "tools/gcd.hpp"
template <typename M, typename N>
constexpr std::common_type_t<M, N> gcd(M m, N n);
If std::gcd(m, n)
is available, it returns std::gcd(m, n)
.
tools::gcd(m, n)
will be extended by other header files in my library.
For example, tools::gcd(tools::bigint, tools::bigint)
gets available if you include tools/bigint.hpp
.
#ifndef TOOLS_GCD_HPP
#define TOOLS_GCD_HPP
#include <type_traits>
#include <numeric>
namespace tools {
template <typename M, typename N>
constexpr ::std::common_type_t<M, N> gcd(const M m, const N n) {
return ::std::gcd(m, n);
}
}
#endif
#line 1 "tools/gcd.hpp"
#include <type_traits>
#include <numeric>
namespace tools {
template <typename M, typename N>
constexpr ::std::common_type_t<M, N> gcd(const M m, const N n) {
return ::std::gcd(m, n);
}
}