/** *************************************************************************
--- Honey Heist ---
Graph based solution for MCPC 2017
R. Marshall
Input
The first 5 lines of input contain a single integer each, as follows:
R: the length (number of cells) of each edge of the grid,
where 2 <= R <= 20. The total number of cells in the grid can be
determined by taking a difference of cubes, $R^3 - (R-1)^3$.
N: the maximum number of cells 0x67 can chew through,
where 1 <= N < R^3 - (R-1)^3.
A: the starting cell ID, assume this cell is located on one of the
grid edges.
B: the ID of the cell containing the honey, where B <> A.
X: the number of wax-hardened cells, where 0 <= X < ( R^3 - (R-1)^3 ) - 1,
followed by $X$ integers on a single line separated by spaces, where
each integer is the ID of the cell.
Output
A single integer K if the path from A to B (where B is the Kth cell)
is no more than N, otherwise the string "No".
compile:
g++ -std=c++11 -o hh honeyheist.cpp
run:
./hh
************************************************************************* */
#include
#include
#include
#include