proconlib

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

View the Project on GitHub KodamaD/proconlib

:warning: math/floor_div.cpp

Code

#pragma once
#include <cassert>

template <class T> constexpr T floor_div(const T& x, const T& y) {
    assert(y != 0);
    return x / y - (((x ^ y) < 0) && (x % y));
}
#line 2 "math/floor_div.cpp"
#include <cassert>

template <class T> constexpr T floor_div(const T& x, const T& y) {
    assert(y != 0);
    return x / y - (((x ^ y) < 0) && (x % y));
}
Back to top page