library

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

View the Project on GitHub matumoto1234/library

:warning: math/floor-div.hpp

Code

#pragma once

namespace matumoto {
  template <typename T>
  constexpr T floor_div(T n, T d) {
    assert(d != 0);
    return n / d - (((n ^ d) < 0) and (n % d));
  }
} // namespace matumoto
#line 2 "math/floor-div.hpp"

namespace matumoto {
  template <typename T>
  constexpr T floor_div(T n, T d) {
    assert(d != 0);
    return n / d - (((n ^ d) < 0) and (n % d));
  }
} // namespace matumoto
Back to top page