Algorithms

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

View the Project on GitHub HyunjaeLee/Algorithms

:warning: math/ceil_div.hpp

Code

#ifndef CEIL_DIV_HPP
#define CEIL_DIV_HPP

template <typename T> T ceil_div(T a, T b) {
    return a / b + static_cast<T>((a ^ b) > 0 && a % b != 0);
}

#endif // CEIL_DIV_HPP
#line 1 "math/ceil_div.hpp"



template <typename T> T ceil_div(T a, T b) {
    return a / b + static_cast<T>((a ^ b) > 0 && a % b != 0);
}
Back to top page