library_cpp

This documentation is automatically generated by competitive-verifier/competitive-verifier

View the Project on GitHub hidehic0/library_cpp

:warning: grid/template.hpp

Code

#pragma once
#include <bits/stdc++.h>

bool coordinate_check(int x, int w, int H, int W) {
  return 0 <= x && x < H && 0 <= w && w < W;
}

constexpr std::array<std::pair<int, int>, 4> MOVES1 = {
    {{0, 1}, {1, 0}, {-1, 0}, {0, -1}}};
constexpr std::array<std::pair<int, int>, 8> MOVES2 = {
    {{0, 1}, {1, 0}, {-1, 0}, {0, -1}, {1, 1}, {-1, -1}, {1, -1}, {-1, 1}}};
#line 2 "grid/template.hpp"
#include <bits/stdc++.h>

bool coordinate_check(int x, int w, int H, int W) {
  return 0 <= x && x < H && 0 <= w && w < W;
}

constexpr std::array<std::pair<int, int>, 4> MOVES1 = {
    {{0, 1}, {1, 0}, {-1, 0}, {0, -1}}};
constexpr std::array<std::pair<int, int>, 8> MOVES2 = {
    {{0, 1}, {1, 0}, {-1, 0}, {0, -1}, {1, 1}, {-1, -1}, {1, -1}, {-1, 1}}};
Back to top page