This documentation is automatically generated by competitive-verifier/competitive-verifier
#include "tools/is_in_grid.hpp"
template <typename T1, typename T2, typename T3, typename T4>
bool is_in_grid(T1 r, T2 c, T3 h, T4 w);
It returns $0 \leq r < h \land 0 \leq c < w$.
<T1>
is an integral type.<T2>
is an integral type.<T3>
is an integral type.<T4>
is an integral type.#ifndef TOOLS_IS_IN_GRID_HPP
#define TOOLS_IS_IN_GRID_HPP
#include <cassert>
#include <utility>
namespace tools {
template <typename T1, typename T2, typename T3, typename T4>
constexpr bool is_in_grid(const T1 r, const T2 c, const T3 h, const T4 w) noexcept {
assert(::std::cmp_greater_equal(h, 0));
assert(::std::cmp_greater_equal(w, 0));
return ::std::cmp_less_equal(0, r) && ::std::cmp_less(r, h) && ::std::cmp_less_equal(0, c) && ::std::cmp_less(c, w);
}
}
#endif
#line 1 "tools/is_in_grid.hpp"
#include <cassert>
#include <utility>
namespace tools {
template <typename T1, typename T2, typename T3, typename T4>
constexpr bool is_in_grid(const T1 r, const T2 c, const T3 h, const T4 w) noexcept {
assert(::std::cmp_greater_equal(h, 0));
assert(::std::cmp_greater_equal(w, 0));
return ::std::cmp_less_equal(0, r) && ::std::cmp_less(r, h) && ::std::cmp_less_equal(0, c) && ::std::cmp_less(c, w);
}
}