{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"The cows play the child\u0027s game of hopscotch in a non-traditional way. Instead of a linear set of numbered boxes into which to hop, the cows create a 5x5 rectilinear grid of digits parallel to the x and y axes.\r\u003cbr\u003e\r\u003cbr\u003eThey then adroitly hop onto any digit in the grid and hop forward, backward, right, or left (never diagonally) to another digit in the grid. They hop again (same rules) to a digit (potentially a digit already visited).\r\u003cbr\u003e\r\u003cbr\u003eWith a total of five intra-grid hops, their hops create a six-digit integer (which might have leading zeroes like 000201).\r\u003cbr\u003e\r\u003cbr\u003eDetermine the count of the number of distinct integers that can be created in this manner."}},{"title":"Input","value":{"format":"HTML","content":"* Lines 1..5: The grid, five integers per line"}},{"title":"Output","value":{"format":"HTML","content":"* Line 1: The number of distinct integers that can be constructed"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1 1 1 1 1\r\n1 1 1 1 1\r\n1 1 1 1 1\r\n1 1 1 2 1\r\n1 1 1 1 1\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e15\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"OUTPUT DETAILS:\r\u003cbr\u003e111111, 111112, 111121, 111211, 111212, 112111, 112121, 121111, 121112, 121211, 121212, 211111, 211121, 212111, and 212121 can be constructed. No other values are possible."}}]}