{"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n0 0 0 0\n1 1 1 0\n1 0 1 0\n", "answer": "1 1 0 1\n0 0 0 0\n1 1 1 0\n1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 0, "matrix": [[1, 1, 0, 1], [0, 0, 0, 0], [1, 1, 1, 0], [1, 0, 1, 0]], "solution": [[1, 1, 0, 1], [0, 0, 0, 0], [1, 1, 1, 0], [1, 0, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n1 1 1\n1 0 1\n", "answer": "1 0 1\n2 1 2\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 1, "matrix": [[1, 0, 1], [1, 1, 1], [1, 0, 1]], "solution": [[1, 0, 1], [2, 1, 2], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 0 1\n1 1 0 1 0 1 0 1 1\n1 0 1 1 0 1 0 1 0\n1 1 1 1 1 1 1 0 1\n1 1 1 1 0 1 1 0 1\n1 1 1 1 1 1 1 1 1\n0 1 1 1 1 0 1 1 0\n1 1 1 1 1 1 1 1 1\n0 0 1 1 1 1 1 1 1\n", "answer": "0 1 1 2 1 2 1 0 1\n1 1 0 1 0 1 0 1 1\n1 0 1 1 0 1 0 1 0\n2 1 2 2 1 2 1 0 1\n2 2 2 1 0 1 1 0 1\n1 2 3 2 1 1 2 1 1\n0 1 2 2 1 0 1 1 0\n1 1 2 3 2 1 2 2 1\n0 0 1 2 3 2 3 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 2, "matrix": [[0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 1, 2, 1, 2, 1, 0, 1], [1, 1, 0, 1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1, 0], [2, 1, 2, 2, 1, 2, 1, 0, 1], [2, 2, 2, 1, 0, 1, 1, 0, 1], [1, 2, 3, 2, 1, 1, 2, 1, 1], [0, 1, 2, 2, 1, 0, 1, 1, 0], [1, 1, 2, 3, 2, 1, 2, 2, 1], [0, 0, 1, 2, 3, 2, 3, 3, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1\n1 1 0 1 1 1 0\n1 0 1 1 1 0 1\n1 0 1 1 0 0 1\n1 0 0 1 1 0 1\n1 1 1 1 1 1 0\n1 1 1 1 1 0 1\n", "answer": "3 2 1 1 0 1 1\n2 1 0 1 1 1 0\n1 0 1 2 1 0 1\n1 0 1 1 0 0 1\n1 0 0 1 1 0 1\n2 1 1 2 2 1 0\n3 2 2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 3, "matrix": [[1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1]], "solution": [[3, 2, 1, 1, 0, 1, 1], [2, 1, 0, 1, 1, 1, 0], [1, 0, 1, 2, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 0, 1], [2, 1, 1, 2, 2, 1, 0], [3, 2, 2, 2, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0\n0 0 1 1\n0 1 1 1\n1 1 1 1\n", "answer": "1 1 0 0\n0 0 1 1\n0 1 2 2\n1 2 3 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 4, "matrix": [[1, 1, 0, 0], [0, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]], "solution": [[1, 1, 0, 0], [0, 0, 1, 1], [0, 1, 2, 2], [1, 2, 3, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0 1\n1 1 1 0 1 0 1 1\n1 0 1 1 1 1 0 0\n1 1 1 1 1 1 1 1\n1 1 1 1 1 0 0 1\n1 1 1 1 1 0 1 1\n0 1 1 1 0 1 1 1\n1 1 1 1 0 0 1 1\n", "answer": "3 2 2 1 0 1 0 1\n2 1 1 0 1 0 1 1\n1 0 1 1 2 1 0 0\n2 1 2 2 2 1 1 1\n2 2 3 2 1 0 0 1\n1 2 3 2 1 0 1 2\n0 1 2 1 0 1 2 3\n1 2 2 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 5, "matrix": [[1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1]], "solution": [[3, 2, 2, 1, 0, 1, 0, 1], [2, 1, 1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 2, 1, 0, 0], [2, 1, 2, 2, 2, 1, 1, 1], [2, 2, 3, 2, 1, 0, 0, 1], [1, 2, 3, 2, 1, 0, 1, 2], [0, 1, 2, 1, 0, 1, 2, 3], [1, 2, 2, 1, 0, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1 1\n1 1 0 1 1 0 1 0\n1 1 0 0 1 1 1 1\n1 0 1 0 1 0 1 0\n1 0 1 1 1 1 0 1\n1 0 1 1 0 1 1 1\n1 1 1 1 1 0 1 1\n1 1 1 0 0 1 1 0\n", "answer": "2 1 0 0 1 1 2 1\n2 1 0 1 1 0 1 0\n2 1 0 0 1 1 2 1\n1 0 1 0 1 0 1 0\n1 0 1 1 1 1 0 1\n1 0 1 1 0 1 1 2\n2 1 2 1 1 0 1 1\n3 2 1 0 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 6, "matrix": [[1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 0, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1, 0]], "solution": [[2, 1, 0, 0, 1, 1, 2, 1], [2, 1, 0, 1, 1, 0, 1, 0], [2, 1, 0, 0, 1, 1, 2, 1], [1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 1, 1, 2], [2, 1, 2, 1, 1, 0, 1, 1], [3, 2, 1, 0, 0, 1, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 1 0 1\n1 0 1 1\n1 1 1 0\n", "answer": "3 2 1 2\n2 1 0 1\n1 0 1 1\n2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 7, "matrix": [[1, 1, 1, 1], [1, 1, 0, 1], [1, 0, 1, 1], [1, 1, 1, 0]], "solution": [[3, 2, 1, 2], [2, 1, 0, 1], [1, 0, 1, 1], [2, 1, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 1 0 1 1\n1 1 1 0 0 1 0 1 1 1\n1 1 1 0 1 1 1 0 1 1\n0 1 1 1 1 1 1 0 1 1\n1 0 1 1 1 1 1 1 0 1\n1 1 1 1 1 1 1 0 0 0\n0 1 1 1 0 1 1 1 1 0\n1 1 1 1 0 1 0 1 1 1\n1 1 1 1 1 0 1 1 1 1\n1 1 0 1 1 0 1 0 1 1\n", "answer": "0 1 0 1 1 2 1 0 1 2\n1 2 1 0 0 1 0 1 2 3\n1 2 1 0 1 2 1 0 1 2\n0 1 2 1 2 2 1 0 1 2\n1 0 1 2 2 3 2 1 0 1\n1 1 2 2 1 2 1 0 0 0\n0 1 2 1 0 1 1 1 1 0\n1 2 2 1 0 1 0 1 2 1\n2 2 1 2 1 0 1 1 2 2\n2 1 0 1 1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 8, "matrix": [[0, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 1, 1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0, 1, 1]], "solution": [[0, 1, 0, 1, 1, 2, 1, 0, 1, 2], [1, 2, 1, 0, 0, 1, 0, 1, 2, 3], [1, 2, 1, 0, 1, 2, 1, 0, 1, 2], [0, 1, 2, 1, 2, 2, 1, 0, 1, 2], [1, 0, 1, 2, 2, 3, 2, 1, 0, 1], [1, 1, 2, 2, 1, 2, 1, 0, 0, 0], [0, 1, 2, 1, 0, 1, 1, 1, 1, 0], [1, 2, 2, 1, 0, 1, 0, 1, 2, 1], [2, 2, 1, 2, 1, 0, 1, 1, 2, 2], [2, 1, 0, 1, 1, 0, 1, 0, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 0 1 1 1 1\n1 0 1 0 0 1\n1 1 1 1 0 1\n0 1 0 0 0 1\n0 1 1 1 1 1\n", "answer": "2 1 2 2 2 3\n1 0 1 1 1 2\n1 0 1 0 0 1\n1 1 1 1 0 1\n0 1 0 0 0 1\n0 1 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 9, "matrix": [[1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 0, 1], [0, 1, 0, 0, 0, 1], [0, 1, 1, 1, 1, 1]], "solution": [[2, 1, 2, 2, 2, 3], [1, 0, 1, 1, 1, 2], [1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 0, 1], [0, 1, 0, 0, 0, 1], [0, 1, 1, 1, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 1\n1 0 1 0 1 0 0\n0 1 0 1 1 1 0\n0 0 0 1 0 1 1\n1 1 0 1 0 1 1\n1 1 1 0 0 1 1\n1 1 0 1 1 0 1\n", "answer": "2 1 1 0 1 0 1\n1 0 1 0 1 0 0\n0 1 0 1 1 1 0\n0 0 0 1 0 1 1\n1 1 0 1 0 1 2\n2 2 1 0 0 1 2\n2 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 10, "matrix": [[1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 0], [0, 1, 0, 1, 1, 1, 0], [0, 0, 0, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1]], "solution": [[2, 1, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 0], [0, 1, 0, 1, 1, 1, 0], [0, 0, 0, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 2], [2, 2, 1, 0, 0, 1, 2], [2, 1, 0, 1, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1\n0 1 0 1 1 1\n1 1 1 1 1 1\n1 1 0 1 0 1\n1 0 1 0 1 1\n0 1 1 0 0 1\n", "answer": "1 1 0 1 2 3\n0 1 0 1 2 3\n1 2 1 2 1 2\n2 1 0 1 0 1\n1 0 1 0 1 2\n0 1 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 11, "matrix": [[1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 1], [0, 1, 1, 0, 0, 1]], "solution": [[1, 1, 0, 1, 2, 3], [0, 1, 0, 1, 2, 3], [1, 2, 1, 2, 1, 2], [2, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 2], [0, 1, 1, 0, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1\n1 1 1 0 1\n1 1 1 0 1\n0 1 1 1 1\n0 0 1 1 1\n", "answer": "0 1 2 1 2\n1 2 1 0 1\n1 2 1 0 1\n0 1 2 1 2\n0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 12, "matrix": [[0, 1, 1, 1, 1], [1, 1, 1, 0, 1], [1, 1, 1, 0, 1], [0, 1, 1, 1, 1], [0, 0, 1, 1, 1]], "solution": [[0, 1, 2, 1, 2], [1, 2, 1, 0, 1], [1, 2, 1, 0, 1], [0, 1, 2, 1, 2], [0, 0, 1, 2, 3]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0\n1 1 1 1\n0 1 1 1\n0 1 1 1\n", "answer": "0 1 0 0\n1 2 1 1\n0 1 2 2\n0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 13, "matrix": [[0, 1, 0, 0], [1, 1, 1, 1], [0, 1, 1, 1], [0, 1, 1, 1]], "solution": [[0, 1, 0, 0], [1, 2, 1, 1], [0, 1, 2, 2], [0, 1, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n0 1 0\n0 1 1\n", "answer": "1 2 1\n0 1 0\n0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 14, "matrix": [[1, 1, 1], [0, 1, 0], [0, 1, 1]], "solution": [[1, 2, 1], [0, 1, 0], [0, 1, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n1 1 1\n1 0 1\n", "answer": "1 0 1\n2 1 2\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 15, "matrix": [[1, 0, 1], [1, 1, 1], [1, 0, 1]], "solution": [[1, 0, 1], [2, 1, 2], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0 1 1\n1 0 1 1 1 1\n1 0 1 1 1 1\n1 1 0 1 0 1\n1 0 1 1 1 1\n1 1 0 0 1 0\n", "answer": "1 0 0 0 1 2\n1 0 1 1 2 3\n1 0 1 2 1 2\n2 1 0 1 0 1\n1 0 1 1 1 1\n2 1 0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 16, "matrix": [[1, 0, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 1, 0]], "solution": [[1, 0, 0, 0, 1, 2], [1, 0, 1, 1, 2, 3], [1, 0, 1, 2, 1, 2], [2, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1], [2, 1, 0, 0, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1\n1 0 1 1 1 1\n0 1 1 1 1 1\n0 0 1 0 0 1\n0 1 0 1 0 0\n1 1 1 1 1 0\n", "answer": "1 0 1 2 3 4\n1 0 1 2 2 3\n0 1 2 1 1 2\n0 0 1 0 0 1\n0 1 0 1 0 0\n1 2 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 17, "matrix": [[1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [0, 0, 1, 0, 0, 1], [0, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0]], "solution": [[1, 0, 1, 2, 3, 4], [1, 0, 1, 2, 2, 3], [0, 1, 2, 1, 1, 2], [0, 0, 1, 0, 0, 1], [0, 1, 0, 1, 0, 0], [1, 2, 1, 2, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0\n1 1 1 0 1 0 1\n1 0 0 1 1 1 1\n0 0 0 1 0 1 1\n0 1 0 1 0 1 1\n0 1 1 1 1 1 1\n0 0 0 1 0 1 1\n", "answer": "3 2 2 1 0 1 0\n2 1 1 0 1 0 1\n1 0 0 1 1 1 2\n0 0 0 1 0 1 2\n0 1 0 1 0 1 2\n0 1 1 2 1 2 3\n0 0 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 18, "matrix": [[1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1], [0, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1]], "solution": [[3, 2, 2, 1, 0, 1, 0], [2, 1, 1, 0, 1, 0, 1], [1, 0, 0, 1, 1, 1, 2], [0, 0, 0, 1, 0, 1, 2], [0, 1, 0, 1, 0, 1, 2], [0, 1, 1, 2, 1, 2, 3], [0, 0, 0, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1 1 0\n1 1 1 0 1 0 1 1 0 1\n1 0 0 1 0 1 1 1 1 1\n0 0 1 0 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 1 0\n1 1 1 0 1 0 1 0 1 1\n1 1 0 1 0 1 1 0 1 1\n1 1 0 1 0 1 1 0 1 0\n1 0 0 1 1 1 0 0 1 1\n1 0 1 1 1 1 1 0 0 0\n", "answer": "3 2 2 1 0 1 2 2 1 0\n2 1 1 0 1 0 1 1 0 1\n1 0 0 1 0 1 2 1 1 2\n0 0 1 0 1 2 1 0 1 1\n1 1 2 1 2 1 2 1 1 0\n2 2 1 0 1 0 1 0 1 1\n2 1 0 1 0 1 1 0 1 1\n2 1 0 1 0 1 1 0 1 0\n1 0 0 1 1 1 0 0 1 1\n1 0 1 2 2 2 1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 19, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0, 1, 0], [1, 0, 0, 1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 0, 0]], "solution": [[3, 2, 2, 1, 0, 1, 2, 2, 1, 0], [2, 1, 1, 0, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 0, 1, 2, 1, 1, 2], [0, 0, 1, 0, 1, 2, 1, 0, 1, 1], [1, 1, 2, 1, 2, 1, 2, 1, 1, 0], [2, 2, 1, 0, 1, 0, 1, 0, 1, 1], [2, 1, 0, 1, 0, 1, 1, 0, 1, 1], [2, 1, 0, 1, 0, 1, 1, 0, 1, 0], [1, 0, 0, 1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 2, 2, 2, 1, 0, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1\n1 0 0 1 1\n1 1 1 1 1\n0 0 0 1 1\n1 0 0 1 1\n", "answer": "2 1 0 1 2\n1 0 0 1 2\n1 1 1 2 3\n0 0 0 1 2\n1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 20, "matrix": [[1, 1, 0, 1, 1], [1, 0, 0, 1, 1], [1, 1, 1, 1, 1], [0, 0, 0, 1, 1], [1, 0, 0, 1, 1]], "solution": [[2, 1, 0, 1, 2], [1, 0, 0, 1, 2], [1, 1, 1, 2, 3], [0, 0, 0, 1, 2], [1, 0, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0 1 0 0 0\n0 1 1 1 0 1 0 0 1 0\n0 1 1 1 1 0 1 1 1 1\n1 0 1 0 1 1 1 0 1 1\n1 0 1 1 1 0 1 0 1 1\n1 0 1 0 1 1 0 0 1 1\n1 1 1 1 0 1 1 1 1 1\n0 1 1 1 1 1 0 0 1 1\n1 0 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1 0\n", "answer": "1 1 0 1 1 0 1 0 0 0\n0 1 1 1 0 1 0 0 1 0\n0 1 2 1 1 0 1 1 2 1\n1 0 1 0 1 1 1 0 1 2\n1 0 1 1 1 0 1 0 1 2\n1 0 1 0 1 1 0 0 1 2\n1 1 2 1 0 1 1 1 2 3\n0 1 2 2 1 1 0 0 1 2\n1 0 1 2 2 2 1 1 2 1\n2 1 2 3 2 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 21, "matrix": [[1, 1, 0, 1, 1, 0, 1, 0, 0, 0], [0, 1, 1, 1, 0, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 0]], "solution": [[1, 1, 0, 1, 1, 0, 1, 0, 0, 0], [0, 1, 1, 1, 0, 1, 0, 0, 1, 0], [0, 1, 2, 1, 1, 0, 1, 1, 2, 1], [1, 0, 1, 0, 1, 1, 1, 0, 1, 2], [1, 0, 1, 1, 1, 0, 1, 0, 1, 2], [1, 0, 1, 0, 1, 1, 0, 0, 1, 2], [1, 1, 2, 1, 0, 1, 1, 1, 2, 3], [0, 1, 2, 2, 1, 1, 0, 0, 1, 2], [1, 0, 1, 2, 2, 2, 1, 1, 2, 1], [2, 1, 2, 3, 2, 1, 0, 1, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 0 0\n1 1 0 0 0 1 0 1 0 0\n1 0 0 1 1 1 1 1 1 1\n1 1 0 0 1 1 1 1 1 1\n0 1 0 1 1 1 1 1 1 1\n0 0 1 0 1 0 1 1 0 0\n1 0 1 1 0 1 1 0 1 0\n1 0 1 1 0 0 0 1 1 0\n1 1 0 1 1 1 1 1 0 1\n", "answer": "1 2 2 2 2 3 2 2 1 1\n0 1 1 1 1 2 1 1 0 0\n1 1 0 0 0 1 0 1 0 0\n1 0 0 1 1 2 1 2 1 1\n1 1 0 0 1 2 2 3 2 2\n0 1 0 1 2 1 2 2 1 1\n0 0 1 0 1 0 1 1 0 0\n1 0 1 1 0 1 1 0 1 0\n1 0 1 1 0 0 0 1 1 0\n2 1 0 1 1 1 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 22, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 0, 0, 0, 1, 0, 1, 0, 0], [1, 0, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 0, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 0, 1, 1, 0, 0, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 0, 1]], "solution": [[1, 2, 2, 2, 2, 3, 2, 2, 1, 1], [0, 1, 1, 1, 1, 2, 1, 1, 0, 0], [1, 1, 0, 0, 0, 1, 0, 1, 0, 0], [1, 0, 0, 1, 1, 2, 1, 2, 1, 1], [1, 1, 0, 0, 1, 2, 2, 3, 2, 2], [0, 1, 0, 1, 2, 1, 2, 2, 1, 1], [0, 0, 1, 0, 1, 0, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 0, 1, 1, 0, 0, 0, 1, 1, 0], [2, 1, 0, 1, 1, 1, 1, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 0 1 0\n1 1 0 1 1 0 1 1 0\n1 1 0 1 1 1 1 1 0\n1 1 0 0 0 1 1 1 1\n1 1 1 1 1 1 1 0 1\n1 0 0 1 0 1 1 1 1\n0 1 1 1 0 1 1 1 1\n1 1 0 0 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n", "answer": "0 0 1 2 2 1 0 1 0\n1 1 0 1 1 0 1 1 0\n2 1 0 1 1 1 2 1 0\n2 1 0 0 0 1 2 1 1\n2 1 1 1 1 2 1 0 1\n1 0 0 1 0 1 2 1 2\n0 1 1 1 0 1 2 2 3\n1 1 0 0 1 2 3 3 4\n2 2 1 1 2 3 4 4 5", "metadata": {"source_dataset": "binary_matrix", "source_index": 23, "matrix": [[0, 0, 1, 1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 0, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 0, 1, 2, 2, 1, 0, 1, 0], [1, 1, 0, 1, 1, 0, 1, 1, 0], [2, 1, 0, 1, 1, 1, 2, 1, 0], [2, 1, 0, 0, 0, 1, 2, 1, 1], [2, 1, 1, 1, 1, 2, 1, 0, 1], [1, 0, 0, 1, 0, 1, 2, 1, 2], [0, 1, 1, 1, 0, 1, 2, 2, 3], [1, 1, 0, 0, 1, 2, 3, 3, 4], [2, 2, 1, 1, 2, 3, 4, 4, 5]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 1 1 1\n1 0 1 0\n0 1 1 1\n", "answer": "3 2 3 2\n2 1 2 1\n1 0 1 0\n0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 24, "matrix": [[1, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 0], [0, 1, 1, 1]], "solution": [[3, 2, 3, 2], [2, 1, 2, 1], [1, 0, 1, 0], [0, 1, 2, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1\n0 1 1 0\n1 1 1 0\n1 1 1 1\n", "answer": "0 1 2 1\n0 1 1 0\n1 2 1 0\n2 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 25, "matrix": [[0, 1, 1, 1], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1]], "solution": [[0, 1, 2, 1], [0, 1, 1, 0], [1, 2, 1, 0], [2, 3, 2, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1 0\n1 1 1 0 1 0 1 1 1 1\n0 1 0 1 1 1 1 1 0 1\n1 1 1 1 1 0 1 1 1 1\n0 0 0 1 1 1 1 1 1 1\n1 1 1 1 0 0 1 1 1 1\n0 1 0 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 0 1\n1 0 1 1 1 0 1 1 0 1\n1 0 1 1 1 1 1 1 1 1\n", "answer": "2 3 2 1 2 1 2 2 1 0\n1 2 1 0 1 0 1 2 1 1\n0 1 0 1 2 1 2 1 0 1\n1 1 1 2 1 0 1 2 1 2\n0 0 0 1 1 1 2 3 2 3\n1 1 1 1 0 0 1 2 2 3\n0 1 0 1 1 1 2 2 1 2\n1 1 1 1 0 1 2 1 0 1\n1 0 1 2 1 0 1 1 0 1\n1 0 1 2 2 1 2 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 26, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 3, 2, 1, 2, 1, 2, 2, 1, 0], [1, 2, 1, 0, 1, 0, 1, 2, 1, 1], [0, 1, 0, 1, 2, 1, 2, 1, 0, 1], [1, 1, 1, 2, 1, 0, 1, 2, 1, 2], [0, 0, 0, 1, 1, 1, 2, 3, 2, 3], [1, 1, 1, 1, 0, 0, 1, 2, 2, 3], [0, 1, 0, 1, 1, 1, 2, 2, 1, 2], [1, 1, 1, 1, 0, 1, 2, 1, 0, 1], [1, 0, 1, 2, 1, 0, 1, 1, 0, 1], [1, 0, 1, 2, 2, 1, 2, 2, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0\n1 0 1\n1 1 1\n", "answer": "1 0 0\n1 0 1\n2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 27, "matrix": [[1, 0, 0], [1, 0, 1], [1, 1, 1]], "solution": [[1, 0, 0], [1, 0, 1], [2, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n0 1 1 1\n1 0 1 0\n1 1 1 1\n", "answer": "1 1 0 1\n0 1 1 1\n1 0 1 0\n2 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 28, "matrix": [[1, 1, 0, 1], [0, 1, 1, 1], [1, 0, 1, 0], [1, 1, 1, 1]], "solution": [[1, 1, 0, 1], [0, 1, 1, 1], [1, 0, 1, 0], [2, 1, 2, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1\n0 1 1 1 0 1 1 0\n1 1 1 1 0 1 1 0\n1 1 0 1 1 0 1 1\n1 0 1 1 1 0 1 0\n1 0 1 0 1 1 1 0\n1 0 1 1 1 1 0 1\n0 0 1 1 1 1 1 1\n", "answer": "1 2 1 0 1 2 2 1\n0 1 2 1 0 1 1 0\n1 2 1 1 0 1 1 0\n2 1 0 1 1 0 1 1\n1 0 1 1 1 0 1 0\n1 0 1 0 1 1 1 0\n1 0 1 1 2 1 0 1\n0 0 1 2 3 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 29, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0], [1, 0, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1]], "solution": [[1, 2, 1, 0, 1, 2, 2, 1], [0, 1, 2, 1, 0, 1, 1, 0], [1, 2, 1, 1, 0, 1, 1, 0], [2, 1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0], [1, 0, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 2, 1, 0, 1], [0, 0, 1, 2, 3, 2, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n0 0 1 1\n1 1 1 1\n1 0 0 0\n", "answer": "1 1 0 1\n0 0 1 2\n1 1 1 1\n1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 30, "matrix": [[1, 1, 0, 1], [0, 0, 1, 1], [1, 1, 1, 1], [1, 0, 0, 0]], "solution": [[1, 1, 0, 1], [0, 0, 1, 2], [1, 1, 1, 1], [1, 0, 0, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 0 1 1\n0 1 1 1 1 1 0\n1 1 1 1 0 1 0\n1 0 1 1 1 0 1\n1 1 1 1 1 1 1\n1 1 1 1 1 1 0\n1 1 1 0 1 0 0\n", "answer": "1 2 1 0 0 1 1\n0 1 2 1 1 1 0\n1 1 2 1 0 1 0\n1 0 1 2 1 0 1\n2 1 2 2 2 1 1\n3 2 2 1 2 1 0\n3 2 1 0 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 31, "matrix": [[1, 1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 0]], "solution": [[1, 2, 1, 0, 0, 1, 1], [0, 1, 2, 1, 1, 1, 0], [1, 1, 2, 1, 0, 1, 0], [1, 0, 1, 2, 1, 0, 1], [2, 1, 2, 2, 2, 1, 1], [3, 2, 2, 1, 2, 1, 0], [3, 2, 1, 0, 1, 0, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0\n1 1 0 1\n1 1 0 0\n1 1 1 1\n", "answer": "0 0 1 0\n1 1 0 1\n2 1 0 0\n3 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 32, "matrix": [[0, 0, 1, 0], [1, 1, 0, 1], [1, 1, 0, 0], [1, 1, 1, 1]], "solution": [[0, 0, 1, 0], [1, 1, 0, 1], [2, 1, 0, 0], [3, 2, 1, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1 0 1\n1 0 1 1 1 1 1 1 0 1\n1 1 1 1 1 1 0 1 0 1\n1 1 1 1 1 1 0 1 1 0\n1 1 1 1 1 1 1 1 1 1\n0 0 0 1 1 0 1 1 1 1\n1 1 0 0 0 0 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n0 1 1 1 1 0 1 1 1 1\n1 0 0 1 1 1 1 1 1 0\n", "answer": "2 1 2 1 0 1 2 1 0 1\n1 0 1 2 1 2 1 1 0 1\n2 1 2 3 2 1 0 1 0 1\n2 2 2 3 2 1 0 1 1 0\n1 1 1 2 2 1 1 2 2 1\n0 0 0 1 1 0 1 2 3 2\n1 1 0 0 0 0 1 2 3 3\n1 2 1 1 1 1 2 3 3 2\n0 1 1 2 1 0 1 2 2 1\n1 0 0 1 2 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 33, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 1, 0]], "solution": [[2, 1, 2, 1, 0, 1, 2, 1, 0, 1], [1, 0, 1, 2, 1, 2, 1, 1, 0, 1], [2, 1, 2, 3, 2, 1, 0, 1, 0, 1], [2, 2, 2, 3, 2, 1, 0, 1, 1, 0], [1, 1, 1, 2, 2, 1, 1, 2, 2, 1], [0, 0, 0, 1, 1, 0, 1, 2, 3, 2], [1, 1, 0, 0, 0, 0, 1, 2, 3, 3], [1, 2, 1, 1, 1, 1, 2, 3, 3, 2], [0, 1, 1, 2, 1, 0, 1, 2, 2, 1], [1, 0, 0, 1, 2, 1, 2, 2, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 0 1 1\n1 0 0 1 1 1 1 1\n1 1 1 1 1 1 1 0\n1 0 1 1 0 1 1 0\n1 0 0 1 1 1 1 1\n0 1 0 1 1 1 1 1\n0 1 1 0 1 1 0 0\n1 1 1 0 0 0 1 1\n", "answer": "0 1 1 1 0 0 1 2\n1 0 0 1 1 1 2 1\n2 1 1 2 1 2 1 0\n1 0 1 1 0 1 1 0\n1 0 0 1 1 2 2 1\n0 1 0 1 2 2 1 1\n0 1 1 0 1 1 0 0\n1 2 1 0 0 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 34, "matrix": [[0, 1, 1, 1, 0, 0, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 0, 0, 1, 1]], "solution": [[0, 1, 1, 1, 0, 0, 1, 2], [1, 0, 0, 1, 1, 1, 2, 1], [2, 1, 1, 2, 1, 2, 1, 0], [1, 0, 1, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 2, 2, 1], [0, 1, 0, 1, 2, 2, 1, 1], [0, 1, 1, 0, 1, 1, 0, 0], [1, 2, 1, 0, 0, 0, 1, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1\n1 1 0 1 1 1 1\n1 0 0 1 1 0 0\n0 1 0 1 1 1 0\n1 1 1 1 1 1 1\n1 0 0 0 0 1 0\n0 0 1 1 0 1 0\n", "answer": "3 2 1 1 0 1 2\n2 1 0 1 1 1 1\n1 0 0 1 1 0 0\n0 1 0 1 2 1 0\n1 1 1 1 1 2 1\n1 0 0 0 0 1 0\n0 0 1 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 35, "matrix": [[1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 0, 0], [0, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1, 0], [0, 0, 1, 1, 0, 1, 0]], "solution": [[3, 2, 1, 1, 0, 1, 2], [2, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 0, 0], [0, 1, 0, 1, 2, 1, 0], [1, 1, 1, 1, 1, 2, 1], [1, 0, 0, 0, 0, 1, 0], [0, 0, 1, 1, 0, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0\n1 1 1 1 1 1\n1 0 0 1 0 1\n1 0 1 0 1 0\n1 0 1 1 1 0\n1 0 0 1 1 1\n", "answer": "2 1 0 1 1 0\n2 1 1 2 1 1\n1 0 0 1 0 1\n1 0 1 0 1 0\n1 0 1 1 1 0\n1 0 0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 36, "matrix": [[1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1]], "solution": [[2, 1, 0, 1, 1, 0], [2, 1, 1, 2, 1, 1], [1, 0, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1\n1 1 1 0 1\n1 1 0 1 0\n1 0 0 1 1\n0 1 1 0 1\n", "answer": "0 1 2 1 2\n1 2 1 0 1\n2 1 0 1 0\n1 0 0 1 1\n0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 37, "matrix": [[0, 1, 1, 1, 1], [1, 1, 1, 0, 1], [1, 1, 0, 1, 0], [1, 0, 0, 1, 1], [0, 1, 1, 0, 1]], "solution": [[0, 1, 2, 1, 2], [1, 2, 1, 0, 1], [2, 1, 0, 1, 0], [1, 0, 0, 1, 1], [0, 1, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 0\n1 0 1 1 1 0 1\n1 1 0 1 1 0 1\n1 0 0 1 1 1 1\n1 1 0 1 0 1 1\n1 0 1 1 0 1 1\n1 1 1 1 1 0 1\n", "answer": "0 1 2 2 1 0 0\n1 0 1 2 1 0 1\n2 1 0 1 1 0 1\n1 0 0 1 1 1 2\n2 1 0 1 0 1 2\n1 0 1 1 0 1 2\n2 1 2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 38, "matrix": [[0, 1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1]], "solution": [[0, 1, 2, 2, 1, 0, 0], [1, 0, 1, 2, 1, 0, 1], [2, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 2], [2, 1, 0, 1, 0, 1, 2], [1, 0, 1, 1, 0, 1, 2], [2, 1, 2, 2, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 1 0 1 0\n1 0 1 1 1 1 0 1 1 1\n1 0 1 1 1 1 1 0 1 0\n1 1 1 1 0 1 1 1 0 1\n1 1 0 1 0 1 1 1 1 1\n1 1 1 0 1 0 1 0 1 0\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 1 1 0 1 1 1\n1 1 0 1 0 1 1 0 1 0\n1 1 1 1 1 0 0 1 1 1\n", "answer": "2 1 2 1 0 0 1 0 1 0\n1 0 1 2 1 1 0 1 2 1\n1 0 1 2 1 2 1 0 1 0\n2 1 1 1 0 1 2 1 0 1\n2 1 0 1 0 1 2 1 1 1\n3 2 1 0 1 0 1 0 1 0\n3 2 1 0 0 1 1 1 2 1\n3 2 1 0 1 1 0 1 2 1\n2 1 0 1 0 1 1 0 1 0\n3 2 1 2 1 0 0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 39, "matrix": [[1, 1, 1, 1, 0, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 0, 0, 1, 1, 1]], "solution": [[2, 1, 2, 1, 0, 0, 1, 0, 1, 0], [1, 0, 1, 2, 1, 1, 0, 1, 2, 1], [1, 0, 1, 2, 1, 2, 1, 0, 1, 0], [2, 1, 1, 1, 0, 1, 2, 1, 0, 1], [2, 1, 0, 1, 0, 1, 2, 1, 1, 1], [3, 2, 1, 0, 1, 0, 1, 0, 1, 0], [3, 2, 1, 0, 0, 1, 1, 1, 2, 1], [3, 2, 1, 0, 1, 1, 0, 1, 2, 1], [2, 1, 0, 1, 0, 1, 1, 0, 1, 0], [3, 2, 1, 2, 1, 0, 0, 1, 2, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 0 1 1 1\n1 0 1 1 0\n0 1 0 0 0\n1 0 0 1 1\n", "answer": "2 1 2 3 2\n1 0 1 2 1\n1 0 1 1 0\n0 1 0 0 0\n1 0 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 40, "matrix": [[1, 1, 1, 1, 1], [1, 0, 1, 1, 1], [1, 0, 1, 1, 0], [0, 1, 0, 0, 0], [1, 0, 0, 1, 1]], "solution": [[2, 1, 2, 3, 2], [1, 0, 1, 2, 1], [1, 0, 1, 1, 0], [0, 1, 0, 0, 0], [1, 0, 0, 1, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 0 0 1 1 1\n1 1 1 1 1 1 1 1 0 1\n1 0 1 0 0 0 1 1 1 0\n1 1 1 1 0 1 1 1 1 1\n0 1 0 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 0 1 1\n1 0 1 1 1 1 1 0 1 0\n1 1 1 1 0 0 1 1 0 1\n1 0 1 1 1 1 0 0 1 0\n1 0 1 1 1 1 1 0 0 1\n", "answer": "1 0 1 1 0 0 0 1 1 2\n2 1 2 1 1 1 1 1 0 1\n1 0 1 0 0 0 1 2 1 0\n1 1 1 1 0 1 2 2 2 1\n0 1 0 1 1 2 2 1 2 2\n0 1 1 2 2 2 1 0 1 1\n1 0 1 2 1 1 1 0 1 0\n2 1 2 1 0 0 1 1 0 1\n1 0 1 2 1 1 0 0 1 0\n1 0 1 2 2 2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 41, "matrix": [[1, 0, 1, 1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 0, 0, 1, 0], [1, 0, 1, 1, 1, 1, 1, 0, 0, 1]], "solution": [[1, 0, 1, 1, 0, 0, 0, 1, 1, 2], [2, 1, 2, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 0, 0, 1, 2, 1, 0], [1, 1, 1, 1, 0, 1, 2, 2, 2, 1], [0, 1, 0, 1, 1, 2, 2, 1, 2, 2], [0, 1, 1, 2, 2, 2, 1, 0, 1, 1], [1, 0, 1, 2, 1, 1, 1, 0, 1, 0], [2, 1, 2, 1, 0, 0, 1, 1, 0, 1], [1, 0, 1, 2, 1, 1, 0, 0, 1, 0], [1, 0, 1, 2, 2, 2, 1, 0, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 1\n1 1 1 1 0 0 1\n1 0 1 1 1 1 1\n0 1 0 1 1 1 1\n1 0 1 1 0 1 1\n1 1 0 0 1 1 1\n1 0 1 0 0 1 1\n", "answer": "2 1 0 1 0 1 2\n2 1 1 1 0 0 1\n1 0 1 2 1 1 2\n0 1 0 1 1 2 3\n1 0 1 1 0 1 2\n2 1 0 0 1 2 3\n1 0 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 42, "matrix": [[1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1], [1, 0, 1, 0, 0, 1, 1]], "solution": [[2, 1, 0, 1, 0, 1, 2], [2, 1, 1, 1, 0, 0, 1], [1, 0, 1, 2, 1, 1, 2], [0, 1, 0, 1, 1, 2, 3], [1, 0, 1, 1, 0, 1, 2], [2, 1, 0, 0, 1, 2, 3], [1, 0, 1, 0, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 0\n1 1 0 1 1 0\n1 1 1 1 1 1\n1 1 1 1 0 0\n0 1 0 1 0 1\n1 1 1 1 1 1\n", "answer": "2 1 0 1 0 0\n2 1 0 1 1 0\n2 2 1 2 1 1\n1 2 1 1 0 0\n0 1 0 1 0 1\n1 2 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 43, "matrix": [[1, 1, 0, 1, 0, 0], [1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 0, 0], [2, 1, 0, 1, 1, 0], [2, 2, 1, 2, 1, 1], [1, 2, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1], [1, 2, 1, 2, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 0 1\n1 1 1\n", "answer": "2 1 2\n1 0 1\n2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 44, "matrix": [[1, 1, 1], [1, 0, 1], [1, 1, 1]], "solution": [[2, 1, 2], [1, 0, 1], [2, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 1 1 1\n0 0 1 1 1\n1 0 0 1 1\n1 1 0 1 1\n", "answer": "2 2 3 4 5\n1 1 2 3 4\n0 0 1 2 3\n1 0 0 1 2\n2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 45, "matrix": [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [0, 0, 1, 1, 1], [1, 0, 0, 1, 1], [1, 1, 0, 1, 1]], "solution": [[2, 2, 3, 4, 5], [1, 1, 2, 3, 4], [0, 0, 1, 2, 3], [1, 0, 0, 1, 2], [2, 1, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 0 1 1 1 1\n1 1 1 1 1 1 1 0 1\n1 1 1 1 1 1 0 1 0\n0 0 1 1 1 1 0 1 1\n1 1 1 0 1 1 1 0 1\n1 1 1 1 0 0 1 1 1\n1 1 1 1 1 1 0 1 0\n0 1 0 1 0 1 1 0 0\n0 1 1 1 1 0 1 0 1\n", "answer": "0 1 0 1 0 1 2 1 2\n1 2 1 2 1 2 1 0 1\n1 1 2 2 2 1 0 1 0\n0 0 1 1 2 1 0 1 1\n1 1 1 0 1 1 1 0 1\n2 2 2 1 0 0 1 1 1\n1 2 1 2 1 1 0 1 0\n0 1 0 1 0 1 1 0 0\n0 1 1 2 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 46, "matrix": [[0, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0, 1, 0, 1]], "solution": [[0, 1, 0, 1, 0, 1, 2, 1, 2], [1, 2, 1, 2, 1, 2, 1, 0, 1], [1, 1, 2, 2, 2, 1, 0, 1, 0], [0, 0, 1, 1, 2, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1], [2, 2, 2, 1, 0, 0, 1, 1, 1], [1, 2, 1, 2, 1, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 1, 0, 0], [0, 1, 1, 2, 1, 0, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0\n1 1 1 1\n1 1 0 1\n1 0 0 1\n", "answer": "2 1 0 0\n3 2 1 1\n2 1 0 1\n1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 47, "matrix": [[1, 1, 0, 0], [1, 1, 1, 1], [1, 1, 0, 1], [1, 0, 0, 1]], "solution": [[2, 1, 0, 0], [3, 2, 1, 1], [2, 1, 0, 1], [1, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 0 0\n1 0 1 1 1 1\n1 0 1 1 1 1\n0 1 1 0 1 1\n1 1 0 1 0 1\n1 1 1 0 1 0\n", "answer": "0 1 0 1 0 0\n1 0 1 2 1 1\n1 0 1 1 2 2\n0 1 1 0 1 2\n1 1 0 1 0 1\n2 2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 48, "matrix": [[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 0]], "solution": [[0, 1, 0, 1, 0, 0], [1, 0, 1, 2, 1, 1], [1, 0, 1, 1, 2, 2], [0, 1, 1, 0, 1, 2], [1, 1, 0, 1, 0, 1], [2, 2, 1, 0, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 1 1 1\n1 1 1 0\n1 0 1 1\n", "answer": "2 1 0 1\n3 2 1 1\n2 1 1 0\n1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 49, "matrix": [[1, 1, 0, 1], [1, 1, 1, 1], [1, 1, 1, 0], [1, 0, 1, 1]], "solution": [[2, 1, 0, 1], [3, 2, 1, 1], [2, 1, 1, 0], [1, 0, 1, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 1 0 1 1\n0 1 1 1 1 1 1 1 1\n1 1 1 0 1 0 1 0 1\n1 1 1 1 1 0 1 1 1\n1 1 0 0 1 1 1 0 0\n1 1 1 1 0 0 1 0 0\n0 1 1 1 0 1 1 1 1\n1 0 0 0 1 1 1 1 1\n0 1 0 1 1 1 0 1 1\n", "answer": "0 1 1 0 1 1 0 1 2\n0 1 2 1 2 1 1 1 2\n1 2 1 0 1 0 1 0 1\n2 2 1 1 1 0 1 1 1\n2 1 0 0 1 1 1 0 0\n1 2 1 1 0 0 1 0 0\n0 1 1 1 0 1 2 1 1\n1 0 0 0 1 2 1 2 2\n0 1 0 1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 50, "matrix": [[0, 1, 1, 0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0, 1, 0, 0], [0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 0, 1, 1]], "solution": [[0, 1, 1, 0, 1, 1, 0, 1, 2], [0, 1, 2, 1, 2, 1, 1, 1, 2], [1, 2, 1, 0, 1, 0, 1, 0, 1], [2, 2, 1, 1, 1, 0, 1, 1, 1], [2, 1, 0, 0, 1, 1, 1, 0, 0], [1, 2, 1, 1, 0, 0, 1, 0, 0], [0, 1, 1, 1, 0, 1, 2, 1, 1], [1, 0, 0, 0, 1, 2, 1, 2, 2], [0, 1, 0, 1, 2, 1, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 0 0 1 0 0\n1 1 1 1 1 1 0 1 1 1\n0 1 1 1 0 1 0 1 0 1\n1 1 0 1 1 0 1 0 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 0 0 1 1\n0 1 1 1 0 1 1 1 0 1\n1 1 0 1 1 1 1 1 1 0\n0 1 1 1 1 0 1 1 1 1\n1 0 1 0 1 0 1 1 1 1\n", "answer": "0 0 1 1 0 0 0 1 0 0\n1 1 2 2 1 1 0 1 1 1\n0 1 1 1 0 1 0 1 0 1\n1 1 0 1 1 0 1 0 1 2\n2 2 1 2 1 1 1 1 2 3\n1 2 2 1 0 1 0 0 1 2\n0 1 1 1 0 1 1 1 0 1\n1 1 0 1 1 1 2 2 1 0\n0 1 1 1 1 0 1 2 2 1\n1 0 1 0 1 0 1 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 51, "matrix": [[0, 0, 1, 1, 0, 0, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 1, 1, 1]], "solution": [[0, 0, 1, 1, 0, 0, 0, 1, 0, 0], [1, 1, 2, 2, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 0, 1, 2], [2, 2, 1, 2, 1, 1, 1, 1, 2, 3], [1, 2, 2, 1, 0, 1, 0, 0, 1, 2], [0, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 2, 2, 1, 0], [0, 1, 1, 1, 1, 0, 1, 2, 2, 1], [1, 0, 1, 0, 1, 0, 1, 2, 3, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 0 1 1\n1 1 1 0 0\n1 0 0 0 1\n0 1 0 1 1\n", "answer": "3 2 1 2 2\n2 1 0 1 1\n2 1 1 0 0\n1 0 0 0 1\n0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 52, "matrix": [[1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 0, 0], [1, 0, 0, 0, 1], [0, 1, 0, 1, 1]], "solution": [[3, 2, 1, 2, 2], [2, 1, 0, 1, 1], [2, 1, 1, 0, 0], [1, 0, 0, 0, 1], [0, 1, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1\n1 1 0 1 1\n0 1 1 1 1\n0 1 0 1 0\n1 0 1 0 1\n", "answer": "1 0 1 2 3\n1 1 0 1 2\n0 1 1 2 1\n0 1 0 1 0\n1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 53, "matrix": [[1, 0, 1, 1, 1], [1, 1, 0, 1, 1], [0, 1, 1, 1, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1]], "solution": [[1, 0, 1, 2, 3], [1, 1, 0, 1, 2], [0, 1, 1, 2, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 1 1\n1 1 1 0 0 1 1 0\n1 1 1 1 1 1 1 1\n1 1 1 0 1 1 0 1\n1 1 1 1 1 1 1 1\n0 1 0 0 0 1 0 1\n1 1 1 1 1 1 1 0\n1 0 1 1 0 1 0 0\n", "answer": "0 0 1 1 1 2 2 1\n1 1 1 0 0 1 1 0\n2 2 2 1 1 2 1 1\n2 2 1 0 1 1 0 1\n1 2 1 1 1 2 1 2\n0 1 0 0 0 1 0 1\n1 1 1 1 1 2 1 0\n1 0 1 1 0 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 54, "matrix": [[0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1, 0, 0]], "solution": [[0, 0, 1, 1, 1, 2, 2, 1], [1, 1, 1, 0, 0, 1, 1, 0], [2, 2, 2, 1, 1, 2, 1, 1], [2, 2, 1, 0, 1, 1, 0, 1], [1, 2, 1, 1, 1, 2, 1, 2], [0, 1, 0, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 2, 1, 0], [1, 0, 1, 1, 0, 1, 0, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1\n0 1 1 0 0 0\n1 0 0 0 1 0\n0 1 1 1 1 1\n1 0 1 0 1 1\n1 0 0 1 0 1\n", "answer": "1 2 2 1 0 1\n0 1 1 0 0 0\n1 0 0 0 1 0\n0 1 1 1 2 1\n1 0 1 0 1 2\n1 0 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 55, "matrix": [[1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 0, 0], [1, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1], [1, 0, 0, 1, 0, 1]], "solution": [[1, 2, 2, 1, 0, 1], [0, 1, 1, 0, 0, 0], [1, 0, 0, 0, 1, 0], [0, 1, 1, 1, 2, 1], [1, 0, 1, 0, 1, 2], [1, 0, 0, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0\n1 1 0 1 1 1 1 1\n1 1 1 1 1 1 0 0\n1 1 0 1 1 1 0 1\n1 0 1 0 1 1 1 1\n0 0 1 1 1 0 1 1\n1 1 1 0 0 1 1 1\n1 1 1 0 1 1 0 1\n", "answer": "3 2 1 2 3 2 1 0\n2 1 0 1 2 2 1 1\n3 2 1 2 2 1 0 0\n2 1 0 1 2 1 0 1\n1 0 1 0 1 1 1 2\n0 0 1 1 1 0 1 2\n1 1 1 0 0 1 1 2\n2 2 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 56, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1]], "solution": [[3, 2, 1, 2, 3, 2, 1, 0], [2, 1, 0, 1, 2, 2, 1, 1], [3, 2, 1, 2, 2, 1, 0, 0], [2, 1, 0, 1, 2, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1, 2], [0, 0, 1, 1, 1, 0, 1, 2], [1, 1, 1, 0, 0, 1, 1, 2], [2, 2, 1, 0, 1, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 0 0 0\n0 1 1 1 1 0 0 1 0\n0 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 0 1 1\n1 1 1 0 1 1 1 0 1\n1 1 1 1 1 1 1 1 0\n1 1 1 1 0 0 0 1 0\n1 1 1 0 1 1 0 0 1\n1 0 1 0 1 0 1 0 1\n", "answer": "1 2 2 1 0 0 0 0 0\n0 1 2 2 1 0 0 1 0\n0 1 2 2 2 1 1 1 0\n1 2 2 1 2 1 0 1 1\n2 2 1 0 1 2 1 0 1\n3 3 2 1 1 1 1 1 0\n3 2 2 1 0 0 0 1 0\n2 1 1 0 1 1 0 0 1\n1 0 1 0 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 57, "matrix": [[1, 1, 1, 1, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0, 0, 1, 0], [1, 1, 1, 0, 1, 1, 0, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1]], "solution": [[1, 2, 2, 1, 0, 0, 0, 0, 0], [0, 1, 2, 2, 1, 0, 0, 1, 0], [0, 1, 2, 2, 2, 1, 1, 1, 0], [1, 2, 2, 1, 2, 1, 0, 1, 1], [2, 2, 1, 0, 1, 2, 1, 0, 1], [3, 3, 2, 1, 1, 1, 1, 1, 0], [3, 2, 2, 1, 0, 0, 0, 1, 0], [2, 1, 1, 0, 1, 1, 0, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1\n0 0 1 1 1\n1 1 1 0 1\n1 1 0 1 0\n1 1 1 1 0\n", "answer": "1 1 0 1 2\n0 0 1 1 2\n1 1 1 0 1\n2 1 0 1 0\n3 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 58, "matrix": [[1, 1, 0, 1, 1], [0, 0, 1, 1, 1], [1, 1, 1, 0, 1], [1, 1, 0, 1, 0], [1, 1, 1, 1, 0]], "solution": [[1, 1, 0, 1, 2], [0, 0, 1, 1, 2], [1, 1, 1, 0, 1], [2, 1, 0, 1, 0], [3, 2, 1, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1\n1 1 1 0 1 0\n1 1 1 1 0 1\n1 1 1 1 1 1\n0 1 0 1 0 1\n0 1 0 1 1 1\n", "answer": "0 1 0 1 2 1\n1 2 1 0 1 0\n2 3 2 1 0 1\n1 2 1 2 1 2\n0 1 0 1 0 1\n0 1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 59, "matrix": [[0, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 1, 1]], "solution": [[0, 1, 0, 1, 2, 1], [1, 2, 1, 0, 1, 0], [2, 3, 2, 1, 0, 1], [1, 2, 1, 2, 1, 2], [0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 0\n1 1 0 1 1\n1 1 1 1 1\n1 1 1 1 1\n1 1 0 0 1\n", "answer": "2 1 0 0 0\n2 1 0 1 1\n3 2 1 2 2\n3 2 1 1 2\n2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 60, "matrix": [[1, 1, 0, 0, 0], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 0, 0, 1]], "solution": [[2, 1, 0, 0, 0], [2, 1, 0, 1, 1], [3, 2, 1, 2, 2], [3, 2, 1, 1, 2], [2, 1, 0, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 0 1 1 1 0 1\n1 0 1 0 1 1 1 1 1 0\n1 1 1 1 1 1 1 1 1 1\n1 0 1 1 1 0 1 1 1 0\n1 1 1 0 1 1 0 0 1 1\n1 1 1 0 0 1 1 1 0 1\n1 0 1 0 1 0 1 1 0 1\n0 1 1 1 1 1 0 0 1 1\n1 0 1 1 1 0 1 0 1 1\n0 1 1 1 0 1 1 1 1 1\n", "answer": "1 0 1 0 0 1 2 1 0 1\n1 0 1 0 1 2 3 2 1 0\n2 1 2 1 2 1 2 2 2 1\n1 0 1 1 1 0 1 1 1 0\n2 1 1 0 1 1 0 0 1 1\n2 1 1 0 0 1 1 1 0 1\n1 0 1 0 1 0 1 1 0 1\n0 1 2 1 2 1 0 0 1 2\n1 0 1 2 1 0 1 0 1 2\n0 1 2 1 0 1 2 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 61, "matrix": [[1, 0, 1, 0, 0, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 0, 0, 1, 2, 1, 0, 1], [1, 0, 1, 0, 1, 2, 3, 2, 1, 0], [2, 1, 2, 1, 2, 1, 2, 2, 2, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 0], [2, 1, 1, 0, 1, 1, 0, 0, 1, 1], [2, 1, 1, 0, 0, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 1, 0, 1], [0, 1, 2, 1, 2, 1, 0, 0, 1, 2], [1, 0, 1, 2, 1, 0, 1, 0, 1, 2], [0, 1, 2, 1, 0, 1, 2, 1, 2, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 0 1\n0 1 1\n", "answer": "0 1 0\n1 0 1\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 62, "matrix": [[0, 1, 0], [1, 0, 1], [0, 1, 1]], "solution": [[0, 1, 0], [1, 0, 1], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 1\n0 0 1 1 1 1 1 1\n0 1 0 1 1 1 1 1\n1 0 1 1 1 0 1 1\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0\n1 0 1 0 1 1 1 1\n", "answer": "1 1 2 3 2 1 0 1\n0 0 1 2 3 2 1 2\n0 1 0 1 2 1 2 3\n1 0 1 2 1 0 1 2\n2 1 2 3 2 1 2 2\n3 2 3 2 3 2 2 1\n2 1 2 1 2 2 1 0\n1 0 1 0 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 63, "matrix": [[1, 1, 1, 1, 1, 1, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1, 1, 1]], "solution": [[1, 1, 2, 3, 2, 1, 0, 1], [0, 0, 1, 2, 3, 2, 1, 2], [0, 1, 0, 1, 2, 1, 2, 3], [1, 0, 1, 2, 1, 0, 1, 2], [2, 1, 2, 3, 2, 1, 2, 2], [3, 2, 3, 2, 3, 2, 2, 1], [2, 1, 2, 1, 2, 2, 1, 0], [1, 0, 1, 0, 1, 2, 2, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 0 1 1 1\n1 1 1 1 0 1 0 1 0 1\n0 1 1 1 1 1 1 0 0 1\n1 0 1 1 1 1 0 1 1 1\n1 1 1 1 1 1 1 1 1 0\n1 1 1 0 1 0 1 1 1 1\n1 0 1 1 0 1 0 0 1 0\n1 1 1 0 1 1 0 1 1 1\n1 1 0 1 1 1 1 0 1 1\n0 0 0 0 1 0 0 1 0 0\n", "answer": "0 1 2 2 1 0 0 1 1 2\n1 2 2 1 0 1 0 1 0 1\n0 1 2 2 1 2 1 0 0 1\n1 0 1 2 2 1 0 1 1 1\n2 1 2 1 2 1 1 2 1 0\n2 1 1 0 1 0 1 1 2 1\n1 0 1 1 0 1 0 0 1 0\n2 1 1 0 1 1 0 1 2 1\n1 1 0 1 2 1 1 0 1 1\n0 0 0 0 1 0 0 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 64, "matrix": [[0, 1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 0, 0, 1, 0], [1, 1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1], [0, 0, 0, 0, 1, 0, 0, 1, 0, 0]], "solution": [[0, 1, 2, 2, 1, 0, 0, 1, 1, 2], [1, 2, 2, 1, 0, 1, 0, 1, 0, 1], [0, 1, 2, 2, 1, 2, 1, 0, 0, 1], [1, 0, 1, 2, 2, 1, 0, 1, 1, 1], [2, 1, 2, 1, 2, 1, 1, 2, 1, 0], [2, 1, 1, 0, 1, 0, 1, 1, 2, 1], [1, 0, 1, 1, 0, 1, 0, 0, 1, 0], [2, 1, 1, 0, 1, 1, 0, 1, 2, 1], [1, 1, 0, 1, 2, 1, 1, 0, 1, 1], [0, 0, 0, 0, 1, 0, 0, 1, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0\n1 1 1 1 0 0\n1 0 1 0 1 0\n1 0 0 0 1 0\n0 1 1 0 1 1\n0 1 1 1 1 1\n", "answer": "3 2 3 2 1 0\n2 1 2 1 0 0\n1 0 1 0 1 0\n1 0 0 0 1 0\n0 1 1 0 1 1\n0 1 2 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 65, "matrix": [[1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0], [1, 0, 1, 0, 1, 0], [1, 0, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1]], "solution": [[3, 2, 3, 2, 1, 0], [2, 1, 2, 1, 0, 0], [1, 0, 1, 0, 1, 0], [1, 0, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1], [0, 1, 2, 1, 2, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1\n1 1 1 0 0\n1 1 0 1 1\n0 1 1 1 1\n1 1 1 0 1\n", "answer": "0 1 2 1 1\n1 2 1 0 0\n1 1 0 1 1\n0 1 1 1 2\n1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 66, "matrix": [[0, 1, 1, 1, 1], [1, 1, 1, 0, 0], [1, 1, 0, 1, 1], [0, 1, 1, 1, 1], [1, 1, 1, 0, 1]], "solution": [[0, 1, 2, 1, 1], [1, 2, 1, 0, 0], [1, 1, 0, 1, 1], [0, 1, 1, 1, 2], [1, 2, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 1 1\n1 0 0 0 1 1 1\n1 1 1 0 1 1 0\n1 0 1 0 1 0 0\n1 1 1 1 1 1 0\n1 0 1 1 1 1 1\n1 1 1 0 0 1 0\n", "answer": "1 0 0 1 2 3 2\n1 0 0 0 1 2 1\n2 1 1 0 1 1 0\n1 0 1 0 1 0 0\n2 1 2 1 2 1 0\n1 0 1 1 1 2 1\n2 1 1 0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 67, "matrix": [[1, 0, 0, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 0]], "solution": [[1, 0, 0, 1, 2, 3, 2], [1, 0, 0, 0, 1, 2, 1], [2, 1, 1, 0, 1, 1, 0], [1, 0, 1, 0, 1, 0, 0], [2, 1, 2, 1, 2, 1, 0], [1, 0, 1, 1, 1, 2, 1], [2, 1, 1, 0, 0, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 0 0 1\n1 0 1 0 1 1 1 1 0\n1 1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 0 1\n1 1 1 1 1 1 1 1 0\n0 1 1 1 0 0 1 0 1\n1 1 1 0 1 0 0 1 1\n1 0 0 1 1 1 1 1 0\n1 0 0 1 0 1 0 1 1\n", "answer": "2 1 2 1 1 0 0 0 1\n1 0 1 0 1 1 1 1 0\n2 1 0 1 2 2 2 1 1\n2 2 1 2 2 2 1 0 1\n1 2 2 2 1 1 2 1 0\n0 1 2 1 0 0 1 0 1\n1 1 1 0 1 0 0 1 1\n1 0 0 1 1 1 1 1 0\n1 0 0 1 0 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 68, "matrix": [[1, 1, 1, 1, 1, 0, 0, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 0, 1, 0, 0, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 0, 1, 0, 1, 1]], "solution": [[2, 1, 2, 1, 1, 0, 0, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0], [2, 1, 0, 1, 2, 2, 2, 1, 1], [2, 2, 1, 2, 2, 2, 1, 0, 1], [1, 2, 2, 2, 1, 1, 2, 1, 0], [0, 1, 2, 1, 0, 0, 1, 0, 1], [1, 1, 1, 0, 1, 0, 0, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 0, 1, 0, 1, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1\n0 1 1 1 0 1\n1 1 1 1 1 1\n1 1 1 1 1 0\n1 1 1 0 1 1\n1 1 1 1 1 1\n", "answer": "0 1 2 2 1 2\n0 1 2 1 0 1\n1 2 3 2 1 1\n2 3 2 1 1 0\n3 2 1 0 1 1\n4 3 2 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 69, "matrix": [[0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 2, 2, 1, 2], [0, 1, 2, 1, 0, 1], [1, 2, 3, 2, 1, 1], [2, 3, 2, 1, 1, 0], [3, 2, 1, 0, 1, 1], [4, 3, 2, 1, 2, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 1 1 0 1\n0 1 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 1 1\n0 0 0 1 1 1 1 1 1 1\n0 1 1 1 1 1 0 1 0 1\n0 0 0 1 1 1 1 0 1 1\n1 1 0 1 1 0 1 0 1 1\n1 1 0 1 1 1 1 0 1 1\n1 1 0 1 1 1 0 1 1 1\n1 1 1 0 1 1 0 1 1 1\n", "answer": "1 2 2 1 0 0 1 1 0 1\n0 1 1 2 1 1 2 2 1 2\n1 1 0 1 2 2 2 3 2 3\n0 0 0 1 2 2 1 2 1 2\n0 1 1 2 2 1 0 1 0 1\n0 0 0 1 2 1 1 0 1 2\n1 1 0 1 1 0 1 0 1 2\n2 1 0 1 2 1 1 0 1 2\n2 1 0 1 2 1 0 1 2 3\n3 2 1 0 1 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 70, "matrix": [[1, 1, 1, 1, 0, 0, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 0, 1], [0, 0, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 1]], "solution": [[1, 2, 2, 1, 0, 0, 1, 1, 0, 1], [0, 1, 1, 2, 1, 1, 2, 2, 1, 2], [1, 1, 0, 1, 2, 2, 2, 3, 2, 3], [0, 0, 0, 1, 2, 2, 1, 2, 1, 2], [0, 1, 1, 2, 2, 1, 0, 1, 0, 1], [0, 0, 0, 1, 2, 1, 1, 0, 1, 2], [1, 1, 0, 1, 1, 0, 1, 0, 1, 2], [2, 1, 0, 1, 2, 1, 1, 0, 1, 2], [2, 1, 0, 1, 2, 1, 0, 1, 2, 3], [3, 2, 1, 0, 1, 1, 0, 1, 2, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1\n1 1 0\n1 1 1\n", "answer": "0 0 1\n1 1 0\n2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 71, "matrix": [[0, 0, 1], [1, 1, 0], [1, 1, 1]], "solution": [[0, 0, 1], [1, 1, 0], [2, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 0 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 0\n1 1 1 1 1 1\n0 1 1 1 1 1\n", "answer": "3 2 1 0 0 1\n4 3 2 1 1 2\n3 4 3 2 2 1\n2 3 3 2 1 0\n1 2 3 3 2 1\n0 1 2 3 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 72, "matrix": [[1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1]], "solution": [[3, 2, 1, 0, 0, 1], [4, 3, 2, 1, 1, 2], [3, 4, 3, 2, 2, 1], [2, 3, 3, 2, 1, 0], [1, 2, 3, 3, 2, 1], [0, 1, 2, 3, 3, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1\n1 1 0 1 1 1 1\n1 1 1 1 1 1 1\n1 1 1 1 0 1 0\n1 1 1 0 1 1 1\n0 1 1 0 1 1 1\n1 1 1 1 0 0 1\n", "answer": "3 2 1 0 1 2 3\n2 1 0 1 2 3 2\n3 2 1 2 1 2 1\n2 3 2 1 0 1 0\n1 2 1 0 1 2 1\n0 1 1 0 1 1 2\n1 2 2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 73, "matrix": [[1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1]], "solution": [[3, 2, 1, 0, 1, 2, 3], [2, 1, 0, 1, 2, 3, 2], [3, 2, 1, 2, 1, 2, 1], [2, 3, 2, 1, 0, 1, 0], [1, 2, 1, 0, 1, 2, 1], [0, 1, 1, 0, 1, 1, 2], [1, 2, 2, 1, 0, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 0 0\n1 1 1 1 1 1 1\n1 1 1 1 1 1 1\n1 1 1 1 0 1 0\n1 1 1 1 1 0 1\n1 1 1 1 1 1 1\n1 1 1 1 1 0 1\n", "answer": "0 1 0 1 1 0 0\n1 2 1 2 2 1 1\n2 3 2 2 1 2 1\n3 3 2 1 0 1 0\n4 4 3 2 1 0 1\n5 5 4 3 2 1 2\n5 4 3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 74, "matrix": [[0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1]], "solution": [[0, 1, 0, 1, 1, 0, 0], [1, 2, 1, 2, 2, 1, 1], [2, 3, 2, 2, 1, 2, 1], [3, 3, 2, 1, 0, 1, 0], [4, 4, 3, 2, 1, 0, 1], [5, 5, 4, 3, 2, 1, 2], [5, 4, 3, 2, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1\n0 1 1 1 1 0\n1 1 1 1 0 1\n0 0 1 0 1 1\n1 1 0 0 1 1\n0 1 1 1 1 1\n", "answer": "1 1 0 1 0 1\n0 1 1 2 1 0\n1 1 2 1 0 1\n0 0 1 0 1 2\n1 1 0 0 1 2\n0 1 1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 75, "matrix": [[1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 1]], "solution": [[1, 1, 0, 1, 0, 1], [0, 1, 1, 2, 1, 0], [1, 1, 2, 1, 0, 1], [0, 0, 1, 0, 1, 2], [1, 1, 0, 0, 1, 2], [0, 1, 1, 1, 2, 3]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1\n1 1 1 1 1\n0 1 1 1 1\n1 0 1 1 1\n1 1 1 0 1\n", "answer": "2 2 1 0 1\n1 2 2 1 2\n0 1 2 2 3\n1 0 1 1 2\n2 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 76, "matrix": [[1, 1, 1, 0, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 1], [1, 0, 1, 1, 1], [1, 1, 1, 0, 1]], "solution": [[2, 2, 1, 0, 1], [1, 2, 2, 1, 2], [0, 1, 2, 2, 3], [1, 0, 1, 1, 2], [2, 1, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0 0 1 1\n0 1 1 1 1 1 1\n1 0 1 1 1 1 1\n0 1 0 1 1 0 0\n1 1 1 1 1 1 1\n1 0 0 1 1 1 1\n0 0 0 1 0 1 1\n", "answer": "1 0 0 0 0 1 2\n0 1 1 1 1 2 2\n1 0 1 2 2 1 1\n0 1 0 1 1 0 0\n1 1 1 2 2 1 1\n1 0 0 1 1 2 2\n0 0 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 77, "matrix": [[1, 0, 0, 0, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1]], "solution": [[1, 0, 0, 0, 0, 1, 2], [0, 1, 1, 1, 1, 2, 2], [1, 0, 1, 2, 2, 1, 1], [0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 2, 2, 1, 1], [1, 0, 0, 1, 1, 2, 2], [0, 0, 0, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1\n1 1 0 1 1 1\n0 1 0 1 1 1\n1 0 1 1 1 0\n0 0 1 1 1 1\n1 1 1 1 1 0\n", "answer": "1 0 1 1 0 1\n1 1 0 1 1 2\n0 1 0 1 2 1\n1 0 1 2 1 0\n0 0 1 2 2 1\n1 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 78, "matrix": [[1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0]], "solution": [[1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 2], [0, 1, 0, 1, 2, 1], [1, 0, 1, 2, 1, 0], [0, 0, 1, 2, 2, 1], [1, 1, 2, 2, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0\n0 0 0 1\n1 1 1 1\n1 1 0 0\n", "answer": "1 0 1 0\n0 0 0 1\n1 1 1 1\n2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 79, "matrix": [[1, 0, 1, 0], [0, 0, 0, 1], [1, 1, 1, 1], [1, 1, 0, 0]], "solution": [[1, 0, 1, 0], [0, 0, 0, 1], [1, 1, 1, 1], [2, 1, 0, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1\n1 1 1 0 1 1\n1 1 1 0 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 0 1 1 1\n", "answer": "1 0 1 1 2 3\n2 1 1 0 1 2\n3 2 1 0 1 2\n4 3 2 1 2 3\n3 2 1 2 3 4\n2 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 80, "matrix": [[1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1]], "solution": [[1, 0, 1, 1, 2, 3], [2, 1, 1, 0, 1, 2], [3, 2, 1, 0, 1, 2], [4, 3, 2, 1, 2, 3], [3, 2, 1, 2, 3, 4], [2, 1, 0, 1, 2, 3]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 1\n1 1 0\n", "answer": "4 3 2\n3 2 1\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 81, "matrix": [[1, 1, 1], [1, 1, 1], [1, 1, 0]], "solution": [[4, 3, 2], [3, 2, 1], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0 1 1 1\n1 1 1 0 0 1 1\n1 1 1 0 1 0 1\n1 1 0 1 1 0 1\n1 0 0 0 1 1 1\n1 1 1 1 1 1 1\n1 1 0 0 1 1 1\n", "answer": "0 0 1 0 1 2 3\n1 1 1 0 0 1 2\n2 2 1 0 1 0 1\n2 1 0 1 1 0 1\n1 0 0 0 1 1 2\n2 1 1 1 2 2 3\n2 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 82, "matrix": [[0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1]], "solution": [[0, 0, 1, 0, 1, 2, 3], [1, 1, 1, 0, 0, 1, 2], [2, 2, 1, 0, 1, 0, 1], [2, 1, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 1, 2], [2, 1, 1, 1, 2, 2, 3], [2, 1, 0, 0, 1, 2, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1\n1 1 1 1 1 1\n0 0 1 0 1 1\n1 1 1 1 0 0\n0 1 1 0 1 0\n1 1 1 1 1 0\n", "answer": "2 1 0 1 2 3\n1 1 1 1 2 2\n0 0 1 0 1 1\n1 1 2 1 0 0\n0 1 1 0 1 0\n1 2 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 83, "matrix": [[1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 0]], "solution": [[2, 1, 0, 1, 2, 3], [1, 1, 1, 1, 2, 2], [0, 0, 1, 0, 1, 1], [1, 1, 2, 1, 0, 0], [0, 1, 1, 0, 1, 0], [1, 2, 2, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1\n1 1 1\n0 1 1\n", "answer": "0 0 1\n1 1 2\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 84, "matrix": [[0, 0, 1], [1, 1, 1], [0, 1, 1]], "solution": [[0, 0, 1], [1, 1, 2], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n0 1 1\n0 0 0\n", "answer": "1 2 2\n0 1 1\n0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 85, "matrix": [[1, 1, 1], [0, 1, 1], [0, 0, 0]], "solution": [[1, 2, 2], [0, 1, 1], [0, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 1 1 1 0\n1 1 1 0 1 1\n1 1 1 1 0 1\n1 1 1 0 1 0\n0 1 1 1 1 1\n", "answer": "5 4 3 2 2 1\n4 3 2 1 1 0\n3 2 1 0 1 1\n2 3 2 1 0 1\n1 2 1 0 1 0\n0 1 2 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 86, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1]], "solution": [[5, 4, 3, 2, 2, 1], [4, 3, 2, 1, 1, 0], [3, 2, 1, 0, 1, 1], [2, 3, 2, 1, 0, 1], [1, 2, 1, 0, 1, 0], [0, 1, 2, 1, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 0\n1 1 1 1 1 1 1\n1 1 1 1 1 1 1\n1 1 1 1 0 1 0\n0 1 1 1 1 0 1\n1 1 1 1 1 1 0\n1 0 1 1 1 1 0\n", "answer": "0 1 0 1 2 1 0\n1 2 1 2 2 2 1\n2 3 2 2 1 2 1\n1 2 2 1 0 1 0\n0 1 2 2 1 0 1\n1 1 2 3 2 1 0\n1 0 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 87, "matrix": [[0, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0], [0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 0]], "solution": [[0, 1, 0, 1, 2, 1, 0], [1, 2, 1, 2, 2, 2, 1], [2, 3, 2, 2, 1, 2, 1], [1, 2, 2, 1, 0, 1, 0], [0, 1, 2, 2, 1, 0, 1], [1, 1, 2, 3, 2, 1, 0], [1, 0, 1, 2, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 1 1 1\n1 1 0 1 1 1 1 0 1\n1 1 0 0 1 1 1 1 1\n1 0 0 1 0 0 1 1 0\n1 1 0 1 0 1 0 1 1\n1 1 0 1 1 1 1 1 1\n0 0 1 1 1 0 0 1 1\n1 0 1 0 1 1 1 1 1\n0 0 1 1 1 1 1 1 1\n", "answer": "0 1 0 1 2 3 2 1 2\n1 1 0 1 2 2 1 0 1\n2 1 0 0 1 1 2 1 1\n1 0 0 1 0 0 1 1 0\n2 1 0 1 0 1 0 1 1\n1 1 0 1 1 1 1 2 2\n0 0 1 1 1 0 0 1 2\n1 0 1 0 1 1 1 2 3\n0 0 1 1 2 2 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 88, "matrix": [[0, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 0, 1, 1, 0], [1, 1, 0, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 0, 1, 2, 3, 2, 1, 2], [1, 1, 0, 1, 2, 2, 1, 0, 1], [2, 1, 0, 0, 1, 1, 2, 1, 1], [1, 0, 0, 1, 0, 0, 1, 1, 0], [2, 1, 0, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 2, 2], [0, 0, 1, 1, 1, 0, 0, 1, 2], [1, 0, 1, 0, 1, 1, 1, 2, 3], [0, 0, 1, 1, 2, 2, 2, 3, 4]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1 1 1\n0 1 1 1 0 1 1 1\n1 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 1\n1 1 1 0 1 0 0 1\n0 0 1 1 1 0 1 1\n1 1 0 1 1 1 1 1\n1 0 0 1 1 1 1 1\n", "answer": "1 0 1 0 1 2 3 4\n0 1 1 1 0 1 2 3\n1 1 0 1 1 2 2 3\n2 2 1 1 2 1 1 2\n1 1 1 0 1 0 0 1\n0 0 1 1 1 0 1 2\n1 1 0 1 2 1 2 3\n1 0 0 1 2 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 89, "matrix": [[1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1], [0, 0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 0, 1, 2, 3, 4], [0, 1, 1, 1, 0, 1, 2, 3], [1, 1, 0, 1, 1, 2, 2, 3], [2, 2, 1, 1, 2, 1, 1, 2], [1, 1, 1, 0, 1, 0, 0, 1], [0, 0, 1, 1, 1, 0, 1, 2], [1, 1, 0, 1, 2, 1, 2, 3], [1, 0, 0, 1, 2, 2, 3, 4]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 0 1 1\n1 0 1 0 0 0 0 1 0\n0 0 1 1 1 1 1 0 1\n1 1 1 1 0 1 1 0 0\n1 0 1 1 1 1 1 0 1\n1 1 1 1 1 1 1 1 1\n0 0 0 1 0 1 1 1 0\n0 1 0 1 1 1 1 0 1\n1 1 1 1 0 0 0 1 1\n", "answer": "0 0 1 1 1 1 0 1 1\n1 0 1 0 0 0 0 1 0\n0 0 1 1 1 1 1 0 1\n1 1 2 1 0 1 1 0 0\n1 0 1 2 1 2 1 0 1\n1 1 1 2 1 2 2 1 1\n0 0 0 1 0 1 2 1 0\n0 1 0 1 1 1 1 0 1\n1 2 1 1 0 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 90, "matrix": [[0, 0, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 0, 0, 0, 1, 0], [0, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 0, 1, 1]], "solution": [[0, 0, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 0, 0, 0, 1, 0], [0, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 2, 1, 0, 1, 1, 0, 0], [1, 0, 1, 2, 1, 2, 1, 0, 1], [1, 1, 1, 2, 1, 2, 2, 1, 1], [0, 0, 0, 1, 0, 1, 2, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0, 1], [1, 2, 1, 1, 0, 0, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 0 1 1\n1 0 1 0 1 1 1 1 0 1\n1 1 1 0 1 0 0 1 0 1\n1 0 1 1 1 0 0 1 0 1\n0 1 1 1 1 0 1 1 1 0\n1 1 1 0 1 1 1 1 0 1\n1 1 0 1 1 0 1 1 1 1\n1 1 0 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 0 0 0\n", "answer": "2 1 0 1 2 3 2 1 1 0\n2 1 1 1 2 2 1 0 1 1\n1 0 1 0 1 1 1 1 0 1\n2 1 1 0 1 0 0 1 0 1\n1 0 1 1 1 0 0 1 0 1\n0 1 2 1 1 0 1 2 1 0\n1 2 1 0 1 1 2 1 0 1\n2 1 0 1 1 0 1 2 1 2\n2 1 0 1 2 1 2 1 1 1\n1 0 1 2 3 2 1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 91, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 0, 0]], "solution": [[2, 1, 0, 1, 2, 3, 2, 1, 1, 0], [2, 1, 1, 1, 2, 2, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0, 1], [2, 1, 1, 0, 1, 0, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 0, 1, 0, 1], [0, 1, 2, 1, 1, 0, 1, 2, 1, 0], [1, 2, 1, 0, 1, 1, 2, 1, 0, 1], [2, 1, 0, 1, 1, 0, 1, 2, 1, 2], [2, 1, 0, 1, 2, 1, 2, 1, 1, 1], [1, 0, 1, 2, 3, 2, 1, 0, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1 1 0\n1 1 1 0 1 0 0 0 1 1\n1 1 0 1 1 0 1 1 1 1\n1 0 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 0 1\n0 1 1 0 1 1 1 1 1 1\n1 0 1 1 1 0 1 0 0 0\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1 0\n1 0 1 1 0 1 1 1 0 0\n", "answer": "4 3 2 1 0 1 1 1 1 0\n3 2 1 0 1 0 0 0 1 1\n2 1 0 1 1 0 1 1 2 2\n1 0 1 2 2 1 2 2 1 2\n0 1 2 1 2 2 2 1 0 1\n0 1 1 0 1 1 2 1 1 1\n1 0 1 1 1 0 1 0 0 0\n2 1 2 2 2 1 1 1 1 1\n2 1 2 2 1 1 0 1 1 0\n1 0 1 1 0 1 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 92, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 0, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1, 1, 0, 0]], "solution": [[4, 3, 2, 1, 0, 1, 1, 1, 1, 0], [3, 2, 1, 0, 1, 0, 0, 0, 1, 1], [2, 1, 0, 1, 1, 0, 1, 1, 2, 2], [1, 0, 1, 2, 2, 1, 2, 2, 1, 2], [0, 1, 2, 1, 2, 2, 2, 1, 0, 1], [0, 1, 1, 0, 1, 1, 2, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0, 0, 0], [2, 1, 2, 2, 2, 1, 1, 1, 1, 1], [2, 1, 2, 2, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1, 1, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 0\n1 0 1 1 1 1 0 1\n1 0 1 1 1 1 1 1\n1 1 0 1 1 1 0 0\n1 0 1 1 1 1 0 0\n0 1 1 1 1 0 1 1\n1 1 1 0 0 0 1 0\n1 1 0 1 1 1 1 1\n", "answer": "2 1 2 2 1 0 1 0\n1 0 1 2 2 1 0 1\n1 0 1 2 3 2 1 1\n2 1 0 1 2 1 0 0\n1 0 1 2 2 1 0 0\n0 1 2 1 1 0 1 1\n1 2 1 0 0 0 1 0\n2 1 0 1 1 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 93, "matrix": [[1, 1, 1, 1, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 0, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[2, 1, 2, 2, 1, 0, 1, 0], [1, 0, 1, 2, 2, 1, 0, 1], [1, 0, 1, 2, 3, 2, 1, 1], [2, 1, 0, 1, 2, 1, 0, 0], [1, 0, 1, 2, 2, 1, 0, 0], [0, 1, 2, 1, 1, 0, 1, 1], [1, 2, 1, 0, 0, 0, 1, 0], [2, 1, 0, 1, 1, 1, 2, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 1 1 0 0\n0 1 0 1 1 1 1 1 1\n1 1 0 0 1 1 0 1 1\n1 1 1 1 1 1 1 1 1\n0 0 1 1 1 0 0 1 0\n1 1 1 1 1 1 0 1 0\n1 1 1 1 1 1 1 0 0\n0 1 1 1 1 1 1 1 1\n0 1 0 1 0 1 1 1 0\n", "answer": "1 0 0 1 2 2 1 0 0\n0 1 0 1 2 2 1 1 1\n1 1 0 0 1 1 0 1 2\n1 1 1 1 2 1 1 2 1\n0 0 1 2 1 0 0 1 0\n1 1 2 3 2 1 0 1 0\n1 2 2 3 2 2 1 0 0\n0 1 1 2 1 2 2 1 1\n0 1 0 1 0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 94, "matrix": [[1, 0, 0, 1, 1, 1, 1, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1, 1, 0]], "solution": [[1, 0, 0, 1, 2, 2, 1, 0, 0], [0, 1, 0, 1, 2, 2, 1, 1, 1], [1, 1, 0, 0, 1, 1, 0, 1, 2], [1, 1, 1, 1, 2, 1, 1, 2, 1], [0, 0, 1, 2, 1, 0, 0, 1, 0], [1, 1, 2, 3, 2, 1, 0, 1, 0], [1, 2, 2, 3, 2, 2, 1, 0, 0], [0, 1, 1, 2, 1, 2, 2, 1, 1], [0, 1, 0, 1, 0, 1, 2, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n0 1 1 1\n1 1 0 1\n1 0 1 1\n", "answer": "1 1 0 1\n0 1 1 2\n1 1 0 1\n1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 95, "matrix": [[1, 1, 0, 1], [0, 1, 1, 1], [1, 1, 0, 1], [1, 0, 1, 1]], "solution": [[1, 1, 0, 1], [0, 1, 1, 2], [1, 1, 0, 1], [1, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 0 1 1 0 1\n1 1 0 1 1 1\n1 0 0 1 1 0\n0 1 1 1 1 1\n1 0 1 0 0 1\n", "answer": "2 1 2 2 1 2\n1 0 1 1 0 1\n2 1 0 1 1 1\n1 0 0 1 1 0\n0 1 1 1 1 1\n1 0 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 96, "matrix": [[1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1], [1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 0, 1]], "solution": [[2, 1, 2, 2, 1, 2], [1, 0, 1, 1, 0, 1], [2, 1, 0, 1, 1, 1], [1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0\n1 1 1\n1 1 1\n", "answer": "1 0 0\n2 1 1\n3 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 97, "matrix": [[1, 0, 0], [1, 1, 1], [1, 1, 1]], "solution": [[1, 0, 0], [2, 1, 1], [3, 2, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0\n1 0 1 1\n1 1 0 1\n0 1 1 1\n", "answer": "1 0 0 0\n1 0 1 1\n1 1 0 1\n0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 98, "matrix": [[1, 0, 0, 0], [1, 0, 1, 1], [1, 1, 0, 1], [0, 1, 1, 1]], "solution": [[1, 0, 0, 0], [1, 0, 1, 1], [1, 1, 0, 1], [0, 1, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1\n1 1 1\n1 1 1\n", "answer": "0 0 1\n1 1 2\n2 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 99, "matrix": [[0, 0, 1], [1, 1, 1], [1, 1, 1]], "solution": [[0, 0, 1], [1, 1, 2], [2, 2, 3]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0 1 1\n1 1 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0 1 1\n0 1 0 1 1 0 1 1 0 1\n1 0 0 1 1 1 1 0 0 1\n1 0 1 0 0 1 1 1 0 0\n0 1 1 1 1 1 1 1 0 0\n1 1 1 1 1 1 1 0 0 1\n1 1 1 0 1 1 0 0 0 1\n1 1 1 0 1 1 1 1 1 1\n", "answer": "3 2 1 2 3 2 1 0 1 2\n2 1 0 1 2 2 2 1 2 3\n1 2 1 2 2 1 1 0 1 2\n0 1 0 1 1 0 1 1 0 1\n1 0 0 1 1 1 1 0 0 1\n1 0 1 0 0 1 2 1 0 0\n0 1 2 1 1 2 2 1 0 0\n1 2 2 1 2 2 1 0 0 1\n2 2 1 0 1 1 0 0 0 1\n3 2 1 0 1 2 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 100, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 0, 0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1]], "solution": [[3, 2, 1, 2, 3, 2, 1, 0, 1, 2], [2, 1, 0, 1, 2, 2, 2, 1, 2, 3], [1, 2, 1, 2, 2, 1, 1, 0, 1, 2], [0, 1, 0, 1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 0, 0, 1, 2, 1, 0, 0], [0, 1, 2, 1, 1, 2, 2, 1, 0, 0], [1, 2, 2, 1, 2, 2, 1, 0, 0, 1], [2, 2, 1, 0, 1, 1, 0, 0, 0, 1], [3, 2, 1, 0, 1, 2, 1, 1, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0\n0 0 0 0 1\n1 1 1 1 0\n0 1 1 1 1\n1 1 1 0 1\n", "answer": "1 1 1 1 0\n0 0 0 0 1\n1 1 1 1 0\n0 1 2 1 1\n1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 101, "matrix": [[1, 1, 1, 1, 0], [0, 0, 0, 0, 1], [1, 1, 1, 1, 0], [0, 1, 1, 1, 1], [1, 1, 1, 0, 1]], "solution": [[1, 1, 1, 1, 0], [0, 0, 0, 0, 1], [1, 1, 1, 1, 0], [0, 1, 2, 1, 1], [1, 2, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1 1 1 1 1\n1 1 0 1 0 1 1 1 1 0\n1 0 1 0 1 1 1 1 0 0\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 1 0\n1 0 0 1 1 0 0 1 1 1\n1 1 0 1 1 1 1 1 1 0\n1 0 1 0 1 0 1 1 1 1\n1 0 0 0 1 0 1 1 1 1\n1 0 1 0 0 0 1 1 1 1\n", "answer": "0 1 1 1 0 1 2 3 2 1\n1 1 0 1 0 1 2 2 1 0\n1 0 1 0 1 2 2 1 0 0\n2 1 2 1 2 1 2 2 1 1\n2 1 1 2 1 0 1 2 1 0\n1 0 0 1 1 0 0 1 2 1\n2 1 0 1 2 1 1 2 1 0\n1 0 1 0 1 0 1 2 2 1\n1 0 0 0 1 0 1 2 3 2\n1 0 1 0 0 0 1 2 3 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 102, "matrix": [[0, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 0, 1, 1, 1, 1], [1, 0, 0, 0, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 1, 1, 1]], "solution": [[0, 1, 1, 1, 0, 1, 2, 3, 2, 1], [1, 1, 0, 1, 0, 1, 2, 2, 1, 0], [1, 0, 1, 0, 1, 2, 2, 1, 0, 0], [2, 1, 2, 1, 2, 1, 2, 2, 1, 1], [2, 1, 1, 2, 1, 0, 1, 2, 1, 0], [1, 0, 0, 1, 1, 0, 0, 1, 2, 1], [2, 1, 0, 1, 2, 1, 1, 2, 1, 0], [1, 0, 1, 0, 1, 0, 1, 2, 2, 1], [1, 0, 0, 0, 1, 0, 1, 2, 3, 2], [1, 0, 1, 0, 0, 0, 1, 2, 3, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 1 1\n1 1 1 0 1 0 1 1 0\n0 0 1 1 1 0 0 0 1\n1 1 1 1 1 1 1 1 1\n1 0 1 1 1 1 0 1 1\n1 1 1 1 0 0 1 1 1\n0 1 1 1 1 0 1 1 0\n1 1 0 1 1 0 1 1 1\n1 0 0 1 1 1 1 1 1\n", "answer": "1 0 1 1 2 1 2 2 1\n1 1 1 0 1 0 1 1 0\n0 0 1 1 1 0 0 0 1\n1 1 2 2 2 1 1 1 2\n1 0 1 2 1 1 0 1 2\n1 1 2 1 0 0 1 2 1\n0 1 1 2 1 0 1 1 0\n1 1 0 1 1 0 1 2 1\n1 0 0 1 2 1 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 103, "matrix": [[1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1, 0], [0, 0, 1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 1, 2, 1, 2, 2, 1], [1, 1, 1, 0, 1, 0, 1, 1, 0], [0, 0, 1, 1, 1, 0, 0, 0, 1], [1, 1, 2, 2, 2, 1, 1, 1, 2], [1, 0, 1, 2, 1, 1, 0, 1, 2], [1, 1, 2, 1, 0, 0, 1, 2, 1], [0, 1, 1, 2, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 0, 1, 2, 1], [1, 0, 0, 1, 2, 1, 2, 3, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 0\n0 0 1 0 1\n1 0 1 1 1\n0 1 1 1 1\n1 1 1 1 1\n", "answer": "1 1 0 0 0\n0 0 1 0 1\n1 0 1 1 2\n0 1 2 2 3\n1 2 3 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 104, "matrix": [[1, 1, 0, 0, 0], [0, 0, 1, 0, 1], [1, 0, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 1, 1, 1]], "solution": [[1, 1, 0, 0, 0], [0, 0, 1, 0, 1], [1, 0, 1, 1, 2], [0, 1, 2, 2, 3], [1, 2, 3, 3, 4]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 0\n1 1 0 1 1\n1 0 1 1 1\n1 1 1 1 1\n1 1 1 1 0\n", "answer": "0 1 0 1 0\n1 1 0 1 1\n1 0 1 2 2\n2 1 2 2 1\n3 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 105, "matrix": [[0, 1, 0, 1, 0], [1, 1, 0, 1, 1], [1, 0, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0]], "solution": [[0, 1, 0, 1, 0], [1, 1, 0, 1, 1], [1, 0, 1, 2, 2], [2, 1, 2, 2, 1], [3, 2, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 1 1 1\n1 0 0 0 0 0 0 0 1\n0 1 1 1 1 1 1 0 1\n1 0 1 1 1 1 0 1 0\n1 0 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1 1\n1 0 1 1 1 1 0 0 1\n1 0 1 0 1 1 1 1 1\n1 1 1 1 1 0 1 1 1\n", "answer": "0 1 1 1 1 0 1 1 2\n1 0 0 0 0 0 0 0 1\n0 1 1 1 1 1 1 0 1\n1 0 1 2 2 1 0 1 0\n1 0 1 2 3 2 1 1 0\n2 1 2 2 3 2 1 1 1\n1 0 1 1 2 1 0 0 1\n1 0 1 0 1 1 1 1 2\n2 1 2 1 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 106, "matrix": [[0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1]], "solution": [[0, 1, 1, 1, 1, 0, 1, 1, 2], [1, 0, 0, 0, 0, 0, 0, 0, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 2, 2, 1, 0, 1, 0], [1, 0, 1, 2, 3, 2, 1, 1, 0], [2, 1, 2, 2, 3, 2, 1, 1, 1], [1, 0, 1, 1, 2, 1, 0, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1, 2], [2, 1, 2, 1, 1, 0, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0\n0 0 0 0\n0 1 1 0\n1 0 0 1\n", "answer": "1 0 0 0\n0 0 0 0\n0 1 1 0\n1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 107, "matrix": [[1, 0, 0, 0], [0, 0, 0, 0], [0, 1, 1, 0], [1, 0, 0, 1]], "solution": [[1, 0, 0, 0], [0, 0, 0, 0], [0, 1, 1, 0], [1, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1 0 1\n1 0 0 0 1 1 1 1\n1 1 0 1 0 1 1 0\n1 1 0 1 1 1 1 0\n1 1 1 0 1 0 1 1\n0 1 1 1 1 0 1 1\n0 1 1 1 1 1 0 1\n1 0 1 1 1 0 0 1\n", "answer": "1 0 1 0 1 1 0 1\n1 0 0 0 1 2 1 1\n2 1 0 1 0 1 1 0\n2 1 0 1 1 1 1 0\n1 2 1 0 1 0 1 1\n0 1 2 1 1 0 1 2\n0 1 2 2 2 1 0 1\n1 0 1 2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 108, "matrix": [[1, 0, 1, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 0, 1]], "solution": [[1, 0, 1, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 2, 1, 1], [2, 1, 0, 1, 0, 1, 1, 0], [2, 1, 0, 1, 1, 1, 1, 0], [1, 2, 1, 0, 1, 0, 1, 1], [0, 1, 2, 1, 1, 0, 1, 2], [0, 1, 2, 2, 2, 1, 0, 1], [1, 0, 1, 2, 1, 0, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1 1 1 1\n1 1 1 0 1 0 1 1 0\n1 1 1 0 0 1 1 1 1\n1 1 1 0 1 1 0 1 1\n1 1 0 1 1 1 1 1 1\n0 1 1 1 1 0 1 1 0\n1 0 1 1 0 0 1 1 1\n1 1 1 1 1 0 1 1 1\n1 1 1 1 1 1 0 1 1\n", "answer": "0 1 2 1 0 1 2 2 1\n1 2 1 0 1 0 1 1 0\n2 2 1 0 0 1 1 2 1\n2 2 1 0 1 1 0 1 2\n1 1 0 1 2 1 1 2 1\n0 1 1 2 1 0 1 1 0\n1 0 1 1 0 0 1 2 1\n2 1 2 2 1 0 1 2 2\n3 2 3 3 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 109, "matrix": [[0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[0, 1, 2, 1, 0, 1, 2, 2, 1], [1, 2, 1, 0, 1, 0, 1, 1, 0], [2, 2, 1, 0, 0, 1, 1, 2, 1], [2, 2, 1, 0, 1, 1, 0, 1, 2], [1, 1, 0, 1, 2, 1, 1, 2, 1], [0, 1, 1, 2, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 2, 1], [2, 1, 2, 2, 1, 0, 1, 2, 2], [3, 2, 3, 3, 2, 1, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1 0 1\n0 0 0 1 0 0 1 1 1\n1 0 1 0 0 1 1 1 1\n0 1 1 1 0 1 1 1 0\n1 1 1 1 0 1 1 1 0\n1 0 1 1 1 1 1 1 1\n0 0 1 1 0 1 1 1 1\n1 1 1 0 0 1 0 1 1\n0 1 1 1 1 0 1 1 1\n", "answer": "1 0 1 1 0 1 1 0 1\n0 0 0 1 0 0 1 1 2\n1 0 1 0 0 1 2 2 1\n0 1 2 1 0 1 2 1 0\n1 1 2 1 0 1 2 1 0\n1 0 1 2 1 2 2 2 1\n0 0 1 1 0 1 1 2 2\n1 1 1 0 0 1 0 1 2\n0 1 2 1 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 110, "matrix": [[1, 0, 1, 1, 0, 1, 1, 0, 1], [0, 0, 0, 1, 0, 0, 1, 1, 1], [1, 0, 1, 0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 1]], "solution": [[1, 0, 1, 1, 0, 1, 1, 0, 1], [0, 0, 0, 1, 0, 0, 1, 1, 2], [1, 0, 1, 0, 0, 1, 2, 2, 1], [0, 1, 2, 1, 0, 1, 2, 1, 0], [1, 1, 2, 1, 0, 1, 2, 1, 0], [1, 0, 1, 2, 1, 2, 2, 2, 1], [0, 0, 1, 1, 0, 1, 1, 2, 2], [1, 1, 1, 0, 0, 1, 0, 1, 2], [0, 1, 2, 1, 1, 0, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1 1 1\n1 1 0 1 1 0 1 0 0 1\n0 0 0 1 1 1 0 1 1 0\n1 1 1 1 1 1 1 1 1 1\n0 1 1 1 0 1 0 1 1 1\n1 1 0 1 1 1 0 0 0 1\n1 1 1 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 1 0 1\n0 1 1 1 0 0 1 0 1 1\n1 0 1 1 1 0 1 1 1 1\n", "answer": "2 2 1 0 1 1 2 1 1 2\n1 1 0 1 1 0 1 0 0 1\n0 0 0 1 2 1 0 1 1 0\n1 1 1 2 1 2 1 2 2 1\n0 1 1 1 0 1 0 1 1 2\n1 1 0 1 1 1 0 0 0 1\n2 2 1 1 0 1 1 1 1 2\n1 2 2 2 1 1 2 1 0 1\n0 1 2 1 0 0 1 0 1 2\n1 0 1 2 1 0 1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 111, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0, 0, 1], [0, 0, 0, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1]], "solution": [[2, 2, 1, 0, 1, 1, 2, 1, 1, 2], [1, 1, 0, 1, 1, 0, 1, 0, 0, 1], [0, 0, 0, 1, 2, 1, 0, 1, 1, 0], [1, 1, 1, 2, 1, 2, 1, 2, 2, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1, 2], [1, 1, 0, 1, 1, 1, 0, 0, 0, 1], [2, 2, 1, 1, 0, 1, 1, 1, 1, 2], [1, 2, 2, 2, 1, 1, 2, 1, 0, 1], [0, 1, 2, 1, 0, 0, 1, 0, 1, 2], [1, 0, 1, 2, 1, 0, 1, 1, 2, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1\n1 0 1 0 1 1\n1 1 0 1 1 1\n1 0 1 1 1 1\n1 0 0 0 1 1\n1 1 1 1 1 1\n", "answer": "2 1 2 1 0 1\n1 0 1 0 1 2\n2 1 0 1 2 3\n1 0 1 1 2 3\n1 0 0 0 1 2\n2 1 1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 112, "matrix": [[1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 2, 1, 0, 1], [1, 0, 1, 0, 1, 2], [2, 1, 0, 1, 2, 3], [1, 0, 1, 1, 2, 3], [1, 0, 0, 0, 1, 2], [2, 1, 1, 1, 2, 3]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1\n1 1 0 0 0 1 1\n1 1 1 1 1 0 1\n0 1 1 1 0 1 1\n1 1 0 1 0 1 1\n0 1 0 0 0 1 1\n1 1 1 1 1 1 1\n", "answer": "2 1 0 1 1 2 3\n2 1 0 0 0 1 2\n1 2 1 1 1 0 1\n0 1 1 1 0 1 2\n1 1 0 1 0 1 2\n0 1 0 0 0 1 2\n1 2 1 1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 113, "matrix": [[1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1], [0, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 1, 2, 3], [2, 1, 0, 0, 0, 1, 2], [1, 2, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 2], [1, 1, 0, 1, 0, 1, 2], [0, 1, 0, 0, 0, 1, 2], [1, 2, 1, 1, 1, 2, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1 1 0\n1 1 1 1 1 1 0 1 0 1\n1 1 1 0 1 1 0 1 1 0\n1 1 1 1 0 1 1 1 1 1\n1 1 1 1 0 0 1 0 0 0\n1 1 1 0 1 1 0 0 1 1\n1 1 1 1 1 0 1 1 1 1\n1 1 1 1 1 1 1 1 0 1\n0 1 1 1 1 1 1 1 1 0\n1 0 1 1 1 0 1 1 1 0\n", "answer": "3 2 1 0 1 2 1 2 1 0\n4 3 2 1 2 1 0 1 0 1\n3 2 1 0 1 1 0 1 1 0\n4 3 2 1 0 1 1 1 1 1\n4 3 2 1 0 0 1 0 0 0\n3 2 1 0 1 1 0 0 1 1\n2 3 2 1 1 0 1 1 1 2\n1 2 3 2 2 1 2 1 0 1\n0 1 2 3 2 1 2 2 1 0\n1 0 1 2 1 0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 114, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1, 1, 0]], "solution": [[3, 2, 1, 0, 1, 2, 1, 2, 1, 0], [4, 3, 2, 1, 2, 1, 0, 1, 0, 1], [3, 2, 1, 0, 1, 1, 0, 1, 1, 0], [4, 3, 2, 1, 0, 1, 1, 1, 1, 1], [4, 3, 2, 1, 0, 0, 1, 0, 0, 0], [3, 2, 1, 0, 1, 1, 0, 0, 1, 1], [2, 3, 2, 1, 1, 0, 1, 1, 1, 2], [1, 2, 3, 2, 2, 1, 2, 1, 0, 1], [0, 1, 2, 3, 2, 1, 2, 2, 1, 0], [1, 0, 1, 2, 1, 0, 1, 2, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 0 1 1 0\n1 1 1 1 0 1 1 0 1 1\n1 1 0 1 1 1 0 1 1 1\n1 0 1 1 1 1 1 0 1 0\n1 1 1 0 0 1 0 1 0 1\n1 1 1 1 0 1 1 1 1 1\n1 1 1 1 0 1 1 0 1 1\n1 1 0 1 1 1 0 0 1 1\n1 1 1 0 1 1 0 1 1 1\n1 1 1 1 1 1 1 0 1 0\n", "answer": "0 1 2 2 1 0 0 1 1 0\n1 2 1 1 0 1 1 0 1 1\n2 1 0 1 1 1 0 1 2 1\n1 0 1 1 1 2 1 0 1 0\n2 1 1 0 0 1 0 1 0 1\n3 2 2 1 0 1 1 1 1 2\n3 2 1 1 0 1 1 0 1 2\n2 1 0 1 1 1 0 0 1 2\n3 2 1 0 1 1 0 1 2 1\n4 3 2 1 2 2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 115, "matrix": [[0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 0]], "solution": [[0, 1, 2, 2, 1, 0, 0, 1, 1, 0], [1, 2, 1, 1, 0, 1, 1, 0, 1, 1], [2, 1, 0, 1, 1, 1, 0, 1, 2, 1], [1, 0, 1, 1, 1, 2, 1, 0, 1, 0], [2, 1, 1, 0, 0, 1, 0, 1, 0, 1], [3, 2, 2, 1, 0, 1, 1, 1, 1, 2], [3, 2, 1, 1, 0, 1, 1, 0, 1, 2], [2, 1, 0, 1, 1, 1, 0, 0, 1, 2], [3, 2, 1, 0, 1, 1, 0, 1, 2, 1], [4, 3, 2, 1, 2, 2, 1, 0, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0 0 0\n0 1 1 1 1 1\n0 1 1 0 1 1\n1 1 0 1 1 1\n0 1 0 1 1 1\n1 1 1 0 1 1\n", "answer": "0 1 0 0 0 0\n0 1 1 1 1 1\n0 1 1 0 1 2\n1 1 0 1 2 3\n0 1 0 1 2 3\n1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 116, "matrix": [[0, 1, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1]], "solution": [[0, 1, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 2], [1, 1, 0, 1, 2, 3], [0, 1, 0, 1, 2, 3], [1, 2, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 0 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 0 0 1 1 0\n1 1 0 0 1 0 1 0 1\n1 0 1 1 1 1 0 1 1\n1 1 1 0 1 1 1 1 0\n1 1 1 1 1 1 1 0 0\n1 0 0 0 1 1 1 1 1\n1 0 1 1 1 1 1 0 1\n", "answer": "3 2 1 0 1 1 0 1 2\n4 3 2 1 1 1 1 2 1\n3 2 1 1 0 0 1 1 0\n2 1 0 0 1 0 1 0 1\n1 0 1 1 2 1 0 1 1\n2 1 1 0 1 2 1 1 0\n2 1 1 1 2 2 1 0 0\n1 0 0 0 1 2 2 1 1\n1 0 1 1 2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 117, "matrix": [[1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 0], [1, 1, 0, 0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 0, 0, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1]], "solution": [[3, 2, 1, 0, 1, 1, 0, 1, 2], [4, 3, 2, 1, 1, 1, 1, 2, 1], [3, 2, 1, 1, 0, 0, 1, 1, 0], [2, 1, 0, 0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 2, 1, 0, 1, 1], [2, 1, 1, 0, 1, 2, 1, 1, 0], [2, 1, 1, 1, 2, 2, 1, 0, 0], [1, 0, 0, 0, 1, 2, 2, 1, 1], [1, 0, 1, 1, 2, 2, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n0 1 1 1\n0 1 0 1\n0 1 1 1\n", "answer": "1 2 2 3\n0 1 1 2\n0 1 0 1\n0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 118, "matrix": [[1, 1, 1, 1], [0, 1, 1, 1], [0, 1, 0, 1], [0, 1, 1, 1]], "solution": [[1, 2, 2, 3], [0, 1, 1, 2], [0, 1, 0, 1], [0, 1, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 1 0 1 1\n0 1 1 1 1 1\n0 1 1 1 1 1\n1 1 0 1 1 1\n1 0 1 1 1 0\n", "answer": "2 3 2 1 2 3\n1 2 1 0 1 2\n0 1 2 1 2 3\n0 1 1 2 3 2\n1 1 0 1 2 1\n1 0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 119, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0]], "solution": [[2, 3, 2, 1, 2, 3], [1, 2, 1, 0, 1, 2], [0, 1, 2, 1, 2, 3], [0, 1, 1, 2, 3, 2], [1, 1, 0, 1, 2, 1], [1, 0, 1, 2, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 1\n1 1 0\n", "answer": "4 3 2\n3 2 1\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 120, "matrix": [[1, 1, 1], [1, 1, 1], [1, 1, 0]], "solution": [[4, 3, 2], [3, 2, 1], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1 0 0\n1 1 1 1 1 1 1 0 1 1\n1 0 1 1 1 1 0 1 1 1\n0 1 1 1 1 1 0 0 0 0\n1 0 1 1 1 1 1 1 1 1\n1 0 1 1 0 1 1 1 1 1\n1 1 1 1 1 1 0 1 1 0\n1 1 0 1 0 1 0 1 1 0\n0 1 1 1 1 1 1 1 0 0\n1 1 1 1 0 0 1 1 1 0\n", "answer": "3 2 1 0 1 2 2 1 0 0\n2 1 2 1 2 2 1 0 1 1\n1 0 1 2 2 1 0 1 1 1\n0 1 2 3 2 1 0 0 0 0\n1 0 1 2 1 2 1 1 1 1\n1 0 1 1 0 1 1 2 2 1\n2 1 1 2 1 1 0 1 1 0\n1 1 0 1 0 1 0 1 1 0\n0 1 1 2 1 1 1 1 0 0\n1 2 2 1 0 0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 121, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 0, 0, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0, 1, 1, 1, 0]], "solution": [[3, 2, 1, 0, 1, 2, 2, 1, 0, 0], [2, 1, 2, 1, 2, 2, 1, 0, 1, 1], [1, 0, 1, 2, 2, 1, 0, 1, 1, 1], [0, 1, 2, 3, 2, 1, 0, 0, 0, 0], [1, 0, 1, 2, 1, 2, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 2, 2, 1], [2, 1, 1, 2, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 0, 1, 0, 1, 1, 0], [0, 1, 1, 2, 1, 1, 1, 1, 0, 0], [1, 2, 2, 1, 0, 0, 1, 2, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1\n1 1 1 1\n0 1 0 1\n1 1 1 1\n", "answer": "1 0 0 1\n1 1 1 2\n0 1 0 1\n1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 122, "matrix": [[1, 0, 0, 1], [1, 1, 1, 1], [0, 1, 0, 1], [1, 1, 1, 1]], "solution": [[1, 0, 0, 1], [1, 1, 1, 2], [0, 1, 0, 1], [1, 2, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 1\n0 0 1\n", "answer": "2 2 3\n1 1 2\n0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 123, "matrix": [[1, 1, 1], [1, 1, 1], [0, 0, 1]], "solution": [[2, 2, 3], [1, 1, 2], [0, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1\n1 1 0 0 0\n1 1 1 0 0\n0 1 1 1 1\n1 1 1 0 0\n", "answer": "0 1 1 1 1\n1 1 0 0 0\n1 2 1 0 0\n0 1 2 1 1\n1 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 124, "matrix": [[0, 1, 1, 1, 1], [1, 1, 0, 0, 0], [1, 1, 1, 0, 0], [0, 1, 1, 1, 1], [1, 1, 1, 0, 0]], "solution": [[0, 1, 1, 1, 1], [1, 1, 0, 0, 0], [1, 2, 1, 0, 0], [0, 1, 2, 1, 1], [1, 2, 1, 0, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1\n1 0 1 0 0 1\n1 1 1 0 1 0\n0 0 1 1 1 1\n1 0 0 0 1 0\n0 1 1 1 1 1\n", "answer": "2 1 1 0 1 2\n1 0 1 0 0 1\n1 1 1 0 1 0\n0 0 1 1 2 1\n1 0 0 0 1 0\n0 1 1 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 125, "matrix": [[1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 0, 1], [1, 1, 1, 0, 1, 0], [0, 0, 1, 1, 1, 1], [1, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1]], "solution": [[2, 1, 1, 0, 1, 2], [1, 0, 1, 0, 0, 1], [1, 1, 1, 0, 1, 0], [0, 0, 1, 1, 2, 1], [1, 0, 0, 0, 1, 0], [0, 1, 1, 1, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 1 1 0\n1 0 1 0\n1 1 1 1\n", "answer": "3 2 1 0\n2 1 1 0\n1 0 1 0\n2 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 126, "matrix": [[1, 1, 1, 0], [1, 1, 1, 0], [1, 0, 1, 0], [1, 1, 1, 1]], "solution": [[3, 2, 1, 0], [2, 1, 1, 0], [1, 0, 1, 0], [2, 1, 2, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 1\n1 1 1 1 1 1 1\n0 1 0 0 1 1 1\n0 1 1 1 0 1 1\n0 1 1 1 1 1 0\n1 0 1 1 1 0 1\n1 0 0 1 1 0 1\n", "answer": "0 1 0 1 2 3 4\n1 2 1 1 2 3 3\n0 1 0 0 1 2 2\n0 1 1 1 0 1 1\n0 1 2 2 1 1 0\n1 0 1 2 1 0 1\n1 0 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 127, "matrix": [[0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 0, 1]], "solution": [[0, 1, 0, 1, 2, 3, 4], [1, 2, 1, 1, 2, 3, 3], [0, 1, 0, 0, 1, 2, 2], [0, 1, 1, 1, 0, 1, 1], [0, 1, 2, 2, 1, 1, 0], [1, 0, 1, 2, 1, 0, 1], [1, 0, 0, 1, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 0 1 1\n1 1 1 1 0 1 1 1\n0 1 1 0 0 1 1 1\n0 1 1 0 0 0 1 1\n1 1 0 1 1 1 0 0\n0 1 0 0 0 1 1 1\n1 1 1 1 1 1 0 1\n1 0 1 1 1 0 0 1\n", "answer": "0 0 1 1 0 0 1 2\n1 1 2 1 0 1 2 3\n0 1 1 0 0 1 2 2\n0 1 1 0 0 0 1 1\n1 1 0 1 1 1 0 0\n0 1 0 0 0 1 1 1\n1 1 1 1 1 1 0 1\n1 0 1 2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 128, "matrix": [[0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1, 1], [0, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0], [0, 1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 0, 1]], "solution": [[0, 0, 1, 1, 0, 0, 1, 2], [1, 1, 2, 1, 0, 1, 2, 3], [0, 1, 1, 0, 0, 1, 2, 2], [0, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0], [0, 1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 2, 1, 0, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 0 1 1\n1 0 1 1 1 0 1 1 1\n0 1 1 1 1 1 0 1 1\n1 1 0 0 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 1 1\n1 1 1 0 1 1 1 1 0\n1 1 0 0 1 1 0 1 1\n1 0 1 0 1 0 1 1 1\n", "answer": "0 0 1 2 2 1 0 1 2\n1 0 1 2 1 0 1 2 3\n0 1 1 1 2 1 0 1 2\n1 1 0 0 1 2 1 2 3\n2 2 1 1 2 3 2 3 2\n3 2 1 0 1 2 2 2 1\n3 2 1 0 1 2 1 1 0\n2 1 0 0 1 1 0 1 1\n1 0 1 0 1 0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 129, "matrix": [[0, 0, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1, 1, 1]], "solution": [[0, 0, 1, 2, 2, 1, 0, 1, 2], [1, 0, 1, 2, 1, 0, 1, 2, 3], [0, 1, 1, 1, 2, 1, 0, 1, 2], [1, 1, 0, 0, 1, 2, 1, 2, 3], [2, 2, 1, 1, 2, 3, 2, 3, 2], [3, 2, 1, 0, 1, 2, 2, 2, 1], [3, 2, 1, 0, 1, 2, 1, 1, 0], [2, 1, 0, 0, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1, 2, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1\n1 0 1 1 1 0 1 0\n1 1 1 1 1 1 1 1\n1 0 0 1 0 1 1 0\n1 0 1 1 1 0 1 1\n1 1 1 0 1 1 1 1\n1 1 1 1 0 0 1 1\n1 1 0 0 1 0 0 1\n", "answer": "2 1 2 2 1 0 1 1\n1 0 1 2 1 0 1 0\n2 1 1 2 1 1 2 1\n1 0 0 1 0 1 1 0\n1 0 1 1 1 0 1 1\n2 1 1 0 1 1 2 2\n3 2 1 1 0 0 1 2\n2 1 0 0 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 130, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 0, 0, 1]], "solution": [[2, 1, 2, 2, 1, 0, 1, 1], [1, 0, 1, 2, 1, 0, 1, 0], [2, 1, 1, 2, 1, 1, 2, 1], [1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1], [2, 1, 1, 0, 1, 1, 2, 2], [3, 2, 1, 1, 0, 0, 1, 2], [2, 1, 0, 0, 1, 0, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1\n0 1 1 1 1 1 1 1\n1 1 1 1 0 0 0 1\n1 0 1 1 1 1 1 1\n0 1 1 1 1 1 0 0\n1 0 1 1 0 1 1 1\n0 0 1 1 1 0 0 1\n1 1 0 0 1 1 1 1\n", "answer": "1 2 1 0 1 2 2 3\n0 1 2 1 1 1 1 2\n1 1 2 1 0 0 0 1\n1 0 1 2 1 1 1 1\n0 1 2 2 1 1 0 0\n1 0 1 1 0 1 1 1\n0 0 1 1 1 0 0 1\n1 1 0 0 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 131, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 1, 1]], "solution": [[1, 2, 1, 0, 1, 2, 2, 3], [0, 1, 2, 1, 1, 1, 1, 2], [1, 1, 2, 1, 0, 0, 0, 1], [1, 0, 1, 2, 1, 1, 1, 1], [0, 1, 2, 2, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n0 1 0\n1 1 0\n", "answer": "0 1 1\n0 1 0\n1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 132, "matrix": [[0, 1, 1], [0, 1, 0], [1, 1, 0]], "solution": [[0, 1, 1], [0, 1, 0], [1, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 0 1 1 1 1 0\n0 1 1 1 1 1 0 1 1 1\n1 1 1 1 1 1 0 1 1 0\n1 0 1 1 1 1 0 1 1 0\n0 1 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1 0\n1 0 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 1 1\n1 0 1 0 0 1 1 1 1 1\n", "answer": "1 0 0 1 0 1 1 2 1 0\n0 1 1 2 1 1 0 1 2 1\n1 1 2 3 2 1 0 1 1 0\n1 0 1 2 2 1 0 1 1 0\n0 1 0 1 2 2 1 2 2 1\n1 1 1 2 2 1 0 1 1 0\n1 0 1 2 2 2 1 2 2 1\n2 1 2 2 1 2 2 3 3 2\n2 1 2 1 0 1 2 3 4 3\n1 0 1 0 0 1 2 3 4 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 133, "matrix": [[1, 0, 0, 1, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1, 0, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 0, 1, 1, 1, 1, 1]], "solution": [[1, 0, 0, 1, 0, 1, 1, 2, 1, 0], [0, 1, 1, 2, 1, 1, 0, 1, 2, 1], [1, 1, 2, 3, 2, 1, 0, 1, 1, 0], [1, 0, 1, 2, 2, 1, 0, 1, 1, 0], [0, 1, 0, 1, 2, 2, 1, 2, 2, 1], [1, 1, 1, 2, 2, 1, 0, 1, 1, 0], [1, 0, 1, 2, 2, 2, 1, 2, 2, 1], [2, 1, 2, 2, 1, 2, 2, 3, 3, 2], [2, 1, 2, 1, 0, 1, 2, 3, 4, 3], [1, 0, 1, 0, 0, 1, 2, 3, 4, 4]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n1 1 1\n1 1 0\n", "answer": "2 1 0\n3 2 1\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 134, "matrix": [[1, 1, 0], [1, 1, 1], [1, 1, 0]], "solution": [[2, 1, 0], [3, 2, 1], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n0 1 1 1 0 1\n1 1 1 1 0 1\n0 1 1 1 1 1\n1 0 1 0 1 0\n0 1 1 1 1 1\n", "answer": "1 2 3 2 1 2\n0 1 2 1 0 1\n1 2 2 1 0 1\n0 1 2 1 1 1\n1 0 1 0 1 0\n0 1 2 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 135, "matrix": [[1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1]], "solution": [[1, 2, 3, 2, 1, 2], [0, 1, 2, 1, 0, 1], [1, 2, 2, 1, 0, 1], [0, 1, 2, 1, 1, 1], [1, 0, 1, 0, 1, 0], [0, 1, 2, 1, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0\n1 0 1 1\n1 1 1 1\n1 1 0 1\n", "answer": "1 0 1 0\n1 0 1 1\n2 1 1 2\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 136, "matrix": [[1, 0, 1, 0], [1, 0, 1, 1], [1, 1, 1, 1], [1, 1, 0, 1]], "solution": [[1, 0, 1, 0], [1, 0, 1, 1], [2, 1, 1, 2], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1\n1 0 1 0 1 0\n0 1 1 1 1 1\n0 1 0 1 0 1\n1 1 1 1 0 1\n0 1 1 1 1 0\n", "answer": "2 1 2 1 0 1\n1 0 1 0 1 0\n0 1 1 1 1 1\n0 1 0 1 0 1\n1 2 1 1 0 1\n0 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 137, "matrix": [[1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0]], "solution": [[2, 1, 2, 1, 0, 1], [1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1], [1, 2, 1, 1, 0, 1], [0, 1, 2, 2, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1\n1 0 1 1 1\n1 1 1 1 1\n0 1 0 0 0\n0 1 1 0 1\n", "answer": "0 1 0 1 2\n1 0 1 2 2\n1 1 1 1 1\n0 1 0 0 0\n0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 138, "matrix": [[0, 1, 0, 1, 1], [1, 0, 1, 1, 1], [1, 1, 1, 1, 1], [0, 1, 0, 0, 0], [0, 1, 1, 0, 1]], "solution": [[0, 1, 0, 1, 2], [1, 0, 1, 2, 2], [1, 1, 1, 1, 1], [0, 1, 0, 0, 0], [0, 1, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0\n1 0 1 1\n1 0 1 1\n1 0 1 1\n", "answer": "0 1 1 0\n1 0 1 1\n1 0 1 2\n1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 139, "matrix": [[0, 1, 1, 0], [1, 0, 1, 1], [1, 0, 1, 1], [1, 0, 1, 1]], "solution": [[0, 1, 1, 0], [1, 0, 1, 1], [1, 0, 1, 2], [1, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 0 1 0 1\n0 0 0 1 1 1 1 1 1 1\n0 1 0 1 1 1 1 0 0 1\n1 1 1 1 0 0 1 0 1 1\n0 0 1 0 1 1 0 1 1 0\n0 0 1 1 1 0 1 1 1 0\n1 0 0 1 1 1 0 1 0 1\n0 0 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 1 0 0\n1 1 1 1 1 1 1 1 0 0\n", "answer": "1 1 1 0 1 1 0 1 0 1\n0 0 0 1 2 2 1 1 1 2\n0 1 0 1 1 1 1 0 0 1\n1 1 1 1 0 0 1 0 1 1\n0 0 1 0 1 1 0 1 1 0\n0 0 1 1 1 0 1 2 1 0\n1 0 0 1 2 1 0 1 0 1\n0 0 1 1 2 2 1 2 1 1\n1 1 1 0 1 2 2 1 0 0\n2 2 2 1 2 3 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 140, "matrix": [[1, 1, 1, 0, 1, 1, 0, 1, 0, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1, 1], [0, 0, 1, 0, 1, 1, 0, 1, 1, 0], [0, 0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 0, 1, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 0, 0]], "solution": [[1, 1, 1, 0, 1, 1, 0, 1, 0, 1], [0, 0, 0, 1, 2, 2, 1, 1, 1, 2], [0, 1, 0, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1, 1], [0, 0, 1, 0, 1, 1, 0, 1, 1, 0], [0, 0, 1, 1, 1, 0, 1, 2, 1, 0], [1, 0, 0, 1, 2, 1, 0, 1, 0, 1], [0, 0, 1, 1, 2, 2, 1, 2, 1, 1], [1, 1, 1, 0, 1, 2, 2, 1, 0, 0], [2, 2, 2, 1, 2, 3, 2, 1, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1\n0 0 1 0\n1 1 1 0\n1 1 1 0\n", "answer": "0 1 2 1\n0 0 1 0\n1 1 1 0\n2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 141, "matrix": [[0, 1, 1, 1], [0, 0, 1, 0], [1, 1, 1, 0], [1, 1, 1, 0]], "solution": [[0, 1, 2, 1], [0, 0, 1, 0], [1, 1, 1, 0], [2, 2, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0 1 1 1\n1 1 1 1 1 1 1\n1 0 1 1 1 0 1\n1 0 0 1 0 1 0\n1 1 1 0 1 1 1\n1 1 1 1 0 1 0\n1 1 1 1 1 1 1\n", "answer": "0 1 0 0 1 2 3\n1 1 1 1 2 1 2\n1 0 1 2 1 0 1\n1 0 0 1 0 1 0\n2 1 1 0 1 2 1\n3 2 2 1 0 1 0\n4 3 3 2 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 142, "matrix": [[0, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 1, 0, 1, 0], [1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 0, 0, 1, 2, 3], [1, 1, 1, 1, 2, 1, 2], [1, 0, 1, 2, 1, 0, 1], [1, 0, 0, 1, 0, 1, 0], [2, 1, 1, 0, 1, 2, 1], [3, 2, 2, 1, 0, 1, 0], [4, 3, 3, 2, 1, 2, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n0 0 1 1\n0 0 1 1\n1 1 1 1\n", "answer": "1 1 1 0\n0 0 1 1\n0 0 1 2\n1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 143, "matrix": [[1, 1, 1, 0], [0, 0, 1, 1], [0, 0, 1, 1], [1, 1, 1, 1]], "solution": [[1, 1, 1, 0], [0, 0, 1, 1], [0, 0, 1, 2], [1, 1, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 0 1\n1 0 0 1 1 0 1 0\n1 1 1 1 0 1 1 1\n0 1 1 1 0 1 1 1\n0 1 0 1 1 1 0 1\n1 1 1 1 1 1 0 1\n1 0 0 1 1 0 1 0\n1 1 0 0 1 0 1 1\n", "answer": "1 0 1 2 2 1 0 1\n1 0 0 1 1 0 1 0\n1 1 1 1 0 1 2 1\n0 1 1 1 0 1 1 2\n0 1 0 1 1 1 0 1\n1 1 1 2 2 1 0 1\n1 0 0 1 1 0 1 0\n2 1 0 0 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 144, "matrix": [[1, 0, 1, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 0, 1, 0], [1, 1, 0, 0, 1, 0, 1, 1]], "solution": [[1, 0, 1, 2, 2, 1, 0, 1], [1, 0, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 2, 1], [0, 1, 1, 1, 0, 1, 1, 2], [0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 2, 2, 1, 0, 1], [1, 0, 0, 1, 1, 0, 1, 0], [2, 1, 0, 0, 1, 0, 1, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1\n1 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1\n1 1 0 0 0 1 1 1\n1 1 1 1 0 1 0 0\n0 0 1 1 1 1 1 1\n", "answer": "3 2 1 1 0 1 2 3\n2 1 0 1 1 2 3 4\n3 2 1 2 2 3 4 4\n2 1 2 2 2 3 3 3\n1 0 1 1 1 2 2 2\n2 1 0 0 0 1 1 1\n1 1 1 1 0 1 0 0\n0 0 1 2 1 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 145, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1]], "solution": [[3, 2, 1, 1, 0, 1, 2, 3], [2, 1, 0, 1, 1, 2, 3, 4], [3, 2, 1, 2, 2, 3, 4, 4], [2, 1, 2, 2, 2, 3, 3, 3], [1, 0, 1, 1, 1, 2, 2, 2], [2, 1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0], [0, 0, 1, 2, 1, 2, 1, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1\n1 1 0 1 1 1\n0 0 1 1 0 1\n0 0 0 1 1 1\n1 1 0 0 1 1\n1 0 1 0 1 1\n", "answer": "2 2 1 1 0 1\n1 1 0 1 1 2\n0 0 1 1 0 1\n0 0 0 1 1 2\n1 1 0 0 1 2\n1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 146, "matrix": [[1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 0, 1], [0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1]], "solution": [[2, 2, 1, 1, 0, 1], [1, 1, 0, 1, 1, 2], [0, 0, 1, 1, 0, 1], [0, 0, 0, 1, 1, 2], [1, 1, 0, 0, 1, 2], [1, 0, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0 1 1 0 1\n0 1 1 0 1 1 1 1 1 0\n1 1 1 1 0 1 0 1 0 1\n1 1 1 0 1 1 1 1 0 1\n0 0 0 1 0 1 1 1 0 0\n1 0 1 1 0 1 1 0 1 0\n0 1 1 1 0 0 0 1 0 1\n1 1 1 1 1 1 1 0 1 0\n1 0 1 1 0 1 0 0 1 1\n1 1 1 1 1 1 1 0 1 1\n", "answer": "1 1 0 1 1 0 1 1 0 1\n0 1 1 0 1 1 1 2 1 0\n1 2 2 1 0 1 0 1 0 1\n1 1 1 0 1 2 1 1 0 1\n0 0 0 1 0 1 2 1 0 0\n1 0 1 1 0 1 1 0 1 0\n0 1 2 1 0 0 0 1 0 1\n1 1 2 2 1 1 1 0 1 0\n1 0 1 1 0 1 0 0 1 1\n2 1 2 2 1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 147, "matrix": [[1, 1, 0, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1], [0, 0, 0, 1, 0, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1, 0, 1, 0], [0, 1, 1, 1, 0, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 0], [1, 0, 1, 1, 0, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[1, 1, 0, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 2, 1, 0], [1, 2, 2, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 2, 1, 1, 0, 1], [0, 0, 0, 1, 0, 1, 2, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1, 0, 1, 0], [0, 1, 2, 1, 0, 0, 0, 1, 0, 1], [1, 1, 2, 2, 1, 1, 1, 0, 1, 0], [1, 0, 1, 1, 0, 1, 0, 0, 1, 1], [2, 1, 2, 2, 1, 2, 1, 0, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0 1\n1 1 1 1\n0 1 1 1\n1 1 1 0\n", "answer": "0 0 0 1\n1 1 1 2\n0 1 2 1\n1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 148, "matrix": [[0, 0, 0, 1], [1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 1, 0]], "solution": [[0, 0, 0, 1], [1, 1, 1, 2], [0, 1, 2, 1], [1, 2, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0 1\n1 1 1 1 1\n0 1 1 1 0\n1 1 1 1 0\n1 0 0 1 0\n", "answer": "0 1 0 0 1\n1 2 1 1 1\n0 1 2 1 0\n1 1 1 1 0\n1 0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 149, "matrix": [[0, 1, 0, 0, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 0], [1, 1, 1, 1, 0], [1, 0, 0, 1, 0]], "solution": [[0, 1, 0, 0, 1], [1, 2, 1, 1, 1], [0, 1, 2, 1, 0], [1, 1, 1, 1, 0], [1, 0, 0, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0\n0 1 1 1 1 1 0 1\n1 1 1 1 1 0 1 1\n1 0 0 1 1 1 1 1\n1 1 1 1 1 1 1 0\n1 0 1 1 1 0 1 1\n1 1 1 0 1 0 0 1\n1 0 1 1 1 0 1 1\n", "answer": "1 2 3 4 3 2 1 0\n0 1 2 3 2 1 0 1\n1 1 1 2 1 0 1 2\n1 0 0 1 2 1 2 1\n2 1 1 2 2 1 1 0\n1 0 1 1 1 0 1 1\n2 1 1 0 1 0 0 1\n1 0 1 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 150, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1]], "solution": [[1, 2, 3, 4, 3, 2, 1, 0], [0, 1, 2, 3, 2, 1, 0, 1], [1, 1, 1, 2, 1, 0, 1, 2], [1, 0, 0, 1, 2, 1, 2, 1], [2, 1, 1, 2, 2, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1], [2, 1, 1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0 1 1 1 0\n1 1 0 0 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1 1\n0 0 1 1 1 0 1 1 1 1\n1 1 1 1 0 1 1 1 0 0\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1 1\n1 1 0 1 1 1 1 0 1 1\n1 1 1 0 1 1 1 1 0 0\n1 1 0 1 0 1 1 1 0 1\n", "answer": "2 1 0 1 1 0 1 2 1 0\n2 1 0 0 1 1 1 2 2 1\n1 1 1 1 2 1 0 1 2 2\n0 0 1 2 1 0 1 2 1 1\n1 1 2 1 0 1 2 1 0 0\n2 2 2 2 1 2 1 2 1 1\n3 2 1 2 2 1 0 1 2 2\n2 1 0 1 2 2 1 0 1 1\n3 2 1 0 1 2 2 1 0 0\n2 1 0 1 0 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 151, "matrix": [[1, 1, 0, 1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 0], [1, 1, 0, 1, 0, 1, 1, 1, 0, 1]], "solution": [[2, 1, 0, 1, 1, 0, 1, 2, 1, 0], [2, 1, 0, 0, 1, 1, 1, 2, 2, 1], [1, 1, 1, 1, 2, 1, 0, 1, 2, 2], [0, 0, 1, 2, 1, 0, 1, 2, 1, 1], [1, 1, 2, 1, 0, 1, 2, 1, 0, 0], [2, 2, 2, 2, 1, 2, 1, 2, 1, 1], [3, 2, 1, 2, 2, 1, 0, 1, 2, 2], [2, 1, 0, 1, 2, 2, 1, 0, 1, 1], [3, 2, 1, 0, 1, 2, 2, 1, 0, 0], [2, 1, 0, 1, 0, 1, 2, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1\n0 1 1 1\n1 1 1 1\n1 1 0 1\n", "answer": "0 0 1 2\n0 1 2 3\n1 2 1 2\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 152, "matrix": [[0, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [1, 1, 0, 1]], "solution": [[0, 0, 1, 2], [0, 1, 2, 3], [1, 2, 1, 2], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 1 0 1\n0 1 1 0 0 1 0 1 1\n1 1 1 1 0 1 0 0 1\n1 1 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 0 1\n1 1 1 0 1 0 0 1 1\n1 1 1 1 0 1 0 1 1\n1 1 1 1 1 1 1 0 0\n1 1 1 1 1 1 1 1 1\n", "answer": "1 2 2 1 0 0 1 0 1\n0 1 1 0 0 1 0 1 2\n1 2 2 1 0 1 0 0 1\n2 2 1 0 1 2 1 1 2\n3 3 2 1 2 1 1 0 1\n3 2 1 0 1 0 0 1 2\n4 3 2 1 0 1 0 1 1\n5 4 3 2 1 2 1 0 0\n6 5 4 3 2 3 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 153, "matrix": [[1, 1, 1, 1, 0, 0, 1, 0, 1], [0, 1, 1, 0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 2, 2, 1, 0, 0, 1, 0, 1], [0, 1, 1, 0, 0, 1, 0, 1, 2], [1, 2, 2, 1, 0, 1, 0, 0, 1], [2, 2, 1, 0, 1, 2, 1, 1, 2], [3, 3, 2, 1, 2, 1, 1, 0, 1], [3, 2, 1, 0, 1, 0, 0, 1, 2], [4, 3, 2, 1, 0, 1, 0, 1, 1], [5, 4, 3, 2, 1, 2, 1, 0, 0], [6, 5, 4, 3, 2, 3, 2, 1, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 0 0\n1 1 1\n", "answer": "0 1 1\n1 0 0\n2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 154, "matrix": [[0, 1, 1], [1, 0, 0], [1, 1, 1]], "solution": [[0, 1, 1], [1, 0, 0], [2, 1, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 0 0\n1 0 1\n", "answer": "0 1 0\n1 0 0\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 155, "matrix": [[0, 1, 0], [1, 0, 0], [1, 0, 1]], "solution": [[0, 1, 0], [1, 0, 0], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 0 1\n1 0 1\n", "answer": "0 1 2\n1 0 1\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 156, "matrix": [[0, 1, 1], [1, 0, 1], [1, 0, 1]], "solution": [[0, 1, 2], [1, 0, 1], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 0\n0 1 1 1 0 1 0 1\n0 0 0 1 0 1 1 1\n1 1 1 1 0 1 0 1\n1 0 1 0 0 0 1 1\n1 1 1 1 1 1 1 1\n1 1 1 0 0 1 1 1\n1 1 0 1 1 1 1 1\n", "answer": "1 2 2 2 1 1 0 0\n0 1 1 1 0 1 0 1\n0 0 0 1 0 1 1 2\n1 1 1 1 0 1 0 1\n1 0 1 0 0 0 1 2\n2 1 2 1 1 1 2 3\n3 2 1 0 0 1 2 3\n2 1 0 1 1 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 157, "matrix": [[1, 1, 1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 0, 1, 0, 1], [0, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[1, 2, 2, 2, 1, 1, 0, 0], [0, 1, 1, 1, 0, 1, 0, 1], [0, 0, 0, 1, 0, 1, 1, 2], [1, 1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 0, 0, 0, 1, 2], [2, 1, 2, 1, 1, 1, 2, 3], [3, 2, 1, 0, 0, 1, 2, 3], [2, 1, 0, 1, 1, 2, 3, 4]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 0\n1 1 0\n", "answer": "3 2 1\n2 1 0\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 158, "matrix": [[1, 1, 1], [1, 1, 0], [1, 1, 0]], "solution": [[3, 2, 1], [2, 1, 0], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n0 0 1 1\n1 1 1 1\n1 1 0 1\n", "answer": "1 1 2 3\n0 0 1 2\n1 1 1 2\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 159, "matrix": [[1, 1, 1, 1], [0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 0, 1]], "solution": [[1, 1, 2, 3], [0, 0, 1, 2], [1, 1, 1, 2], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 1 1 1 0\n0 0 0 1 0 1 1 1 1\n1 0 1 1 0 1 0 1 1\n0 1 1 1 0 1 1 1 0\n1 1 0 0 1 1 0 1 1\n1 1 1 1 0 0 1 1 1\n1 1 1 1 1 0 0 0 0\n1 1 0 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1\n", "answer": "0 0 1 1 0 1 2 1 0\n0 0 0 1 0 1 1 2 1\n1 0 1 1 0 1 0 1 1\n0 1 1 1 0 1 1 1 0\n1 1 0 0 1 1 0 1 1\n2 2 1 1 0 0 1 1 1\n3 2 1 1 1 0 0 0 0\n2 1 0 0 1 1 1 1 1\n3 2 1 0 0 1 2 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 160, "matrix": [[0, 0, 1, 1, 0, 1, 1, 1, 0], [0, 0, 0, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1]], "solution": [[0, 0, 1, 1, 0, 1, 2, 1, 0], [0, 0, 0, 1, 0, 1, 1, 2, 1], [1, 0, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1, 0, 1, 1], [2, 2, 1, 1, 0, 0, 1, 1, 1], [3, 2, 1, 1, 1, 0, 0, 0, 0], [2, 1, 0, 0, 1, 1, 1, 1, 1], [3, 2, 1, 0, 0, 1, 2, 2, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0\n1 0 1 0\n0 1 1 1\n0 0 0 1\n", "answer": "2 1 0 0\n1 0 1 0\n0 1 1 1\n0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 161, "matrix": [[1, 1, 0, 0], [1, 0, 1, 0], [0, 1, 1, 1], [0, 0, 0, 1]], "solution": [[2, 1, 0, 0], [1, 0, 1, 0], [0, 1, 1, 1], [0, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 0 1 1 1 0\n0 1 0 1 1 1 1 0 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 0 0\n1 0 1 1 0 1 1 1 1\n1 1 1 1 1 1 1 0 1\n1 1 0 1 1 1 1 1 1\n1 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n", "answer": "1 0 1 0 0 1 2 1 0\n0 1 0 1 1 2 1 0 1\n1 2 1 2 2 2 1 1 1\n2 1 2 2 1 1 0 0 0\n1 0 1 1 0 1 1 1 1\n2 1 1 2 1 2 1 0 1\n2 1 0 1 2 3 2 1 2\n1 0 1 2 3 4 3 2 3\n2 1 2 3 4 5 4 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 162, "matrix": [[1, 0, 1, 0, 0, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 0, 0, 1, 2, 1, 0], [0, 1, 0, 1, 1, 2, 1, 0, 1], [1, 2, 1, 2, 2, 2, 1, 1, 1], [2, 1, 2, 2, 1, 1, 0, 0, 0], [1, 0, 1, 1, 0, 1, 1, 1, 1], [2, 1, 1, 2, 1, 2, 1, 0, 1], [2, 1, 0, 1, 2, 3, 2, 1, 2], [1, 0, 1, 2, 3, 4, 3, 2, 3], [2, 1, 2, 3, 4, 5, 4, 3, 4]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1 0 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 0 1 0 1 0 0\n1 1 1 0 1 0 0 1 1\n1 0 1 1 0 0 0 1 1\n0 1 1 1 1 1 1 1 1\n0 1 1 1 1 0 1 1 1\n0 1 0 0 1 0 1 1 1\n1 1 1 1 1 1 1 1 1\n", "answer": "0 1 2 1 0 1 0 1 2\n1 2 2 1 1 1 1 1 1\n2 2 1 0 1 0 1 0 0\n2 1 1 0 1 0 0 1 1\n1 0 1 1 0 0 0 1 2\n0 1 2 2 1 1 1 2 3\n0 1 1 1 1 0 1 2 3\n0 1 0 0 1 0 1 2 3\n1 2 1 1 2 1 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 163, "matrix": [[0, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 0, 0], [1, 1, 1, 0, 1, 0, 0, 1, 1], [1, 0, 1, 1, 0, 0, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 2, 1, 0, 1, 0, 1, 2], [1, 2, 2, 1, 1, 1, 1, 1, 1], [2, 2, 1, 0, 1, 0, 1, 0, 0], [2, 1, 1, 0, 1, 0, 0, 1, 1], [1, 0, 1, 1, 0, 0, 0, 1, 2], [0, 1, 2, 2, 1, 1, 1, 2, 3], [0, 1, 1, 1, 1, 0, 1, 2, 3], [0, 1, 0, 0, 1, 0, 1, 2, 3], [1, 2, 1, 1, 2, 1, 2, 3, 4]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1\n1 0 0\n0 0 1\n", "answer": "0 0 1\n1 0 0\n0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 164, "matrix": [[0, 0, 1], [1, 0, 0], [0, 0, 1]], "solution": [[0, 0, 1], [1, 0, 0], [0, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0 0 1\n1 0 1 1 1 0\n1 1 1 1 1 0\n1 0 1 1 1 0\n1 1 1 1 1 1\n1 0 1 1 1 1\n", "answer": "1 0 0 0 0 1\n1 0 1 1 1 0\n2 1 2 2 1 0\n1 0 1 2 1 0\n2 1 2 3 2 1\n1 0 1 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 165, "matrix": [[1, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1]], "solution": [[1, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 0], [2, 1, 2, 2, 1, 0], [1, 0, 1, 2, 1, 0], [2, 1, 2, 3, 2, 1], [1, 0, 1, 2, 3, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1\n1 1 1 1 1 0 0\n1 1 1 1 0 1 1\n1 0 1 1 1 0 1\n0 0 1 0 1 1 1\n1 1 1 1 0 1 0\n1 1 1 1 1 1 0\n", "answer": "3 2 1 0 1 1 1\n3 2 2 1 1 0 0\n2 1 2 1 0 1 1\n1 0 1 1 1 0 1\n0 0 1 0 1 1 1\n1 1 2 1 0 1 0\n2 2 3 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 166, "matrix": [[1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 0]], "solution": [[3, 2, 1, 0, 1, 1, 1], [3, 2, 2, 1, 1, 0, 0], [2, 1, 2, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 1, 1], [1, 1, 2, 1, 0, 1, 0], [2, 2, 3, 2, 1, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0\n1 0 0\n1 0 1\n", "answer": "0 0 0\n1 0 0\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 167, "matrix": [[0, 0, 0], [1, 0, 0], [1, 0, 1]], "solution": [[0, 0, 0], [1, 0, 0], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1 1 1 0\n0 1 0 1 1 1 1 0 1\n0 1 1 1 1 0 0 1 0\n0 1 1 0 1 1 0 1 1\n1 0 0 0 1 1 0 1 1\n1 0 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n0 1 0 1 0 1 1 0 1\n", "answer": "0 1 1 1 0 1 2 1 0\n0 1 0 1 1 1 1 0 1\n0 1 1 1 1 0 0 1 0\n0 1 1 0 1 1 0 1 1\n1 0 0 0 1 1 0 1 2\n1 0 1 1 2 2 1 2 3\n1 0 1 2 2 3 2 2 3\n1 1 1 2 1 2 2 1 2\n0 1 0 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 168, "matrix": [[0, 1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 0, 1, 1], [1, 0, 0, 0, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1, 0, 1]], "solution": [[0, 1, 1, 1, 0, 1, 2, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 0, 1, 1], [1, 0, 0, 0, 1, 1, 0, 1, 2], [1, 0, 1, 1, 2, 2, 1, 2, 3], [1, 0, 1, 2, 2, 3, 2, 2, 3], [1, 1, 1, 2, 1, 2, 2, 1, 2], [0, 1, 0, 1, 0, 1, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 0\n1 0 0 1 0 1 1 1\n1 0 1 1 1 1 0 1\n1 1 1 1 1 1 1 0\n0 1 1 1 1 0 1 0\n1 0 1 1 0 0 0 1\n1 1 1 0 1 1 0 1\n1 1 1 1 1 0 1 1\n", "answer": "2 1 1 2 1 0 1 0\n1 0 0 1 0 1 1 1\n1 0 1 2 1 1 0 1\n1 1 2 3 2 1 1 0\n0 1 2 2 1 0 1 0\n1 0 1 1 0 0 0 1\n2 1 1 0 1 1 0 1\n3 2 2 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 169, "matrix": [[1, 1, 1, 1, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1, 0], [1, 0, 1, 1, 0, 0, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[2, 1, 1, 2, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1, 1, 1], [1, 0, 1, 2, 1, 1, 0, 1], [1, 1, 2, 3, 2, 1, 1, 0], [0, 1, 2, 2, 1, 0, 1, 0], [1, 0, 1, 1, 0, 0, 0, 1], [2, 1, 1, 0, 1, 1, 0, 1], [3, 2, 2, 1, 1, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 1\n1 1 0 1 1 1 0 0 1\n1 1 1 0 0 1 1 0 0\n1 1 0 0 0 1 1 1 1\n1 0 1 1 1 1 1 0 1\n1 1 0 1 1 1 0 0 1\n1 0 1 1 0 0 0 1 1\n1 1 1 1 0 0 1 0 1\n", "answer": "4 3 2 2 1 2 2 2 3\n3 2 1 1 0 1 1 1 2\n2 1 0 1 1 1 0 0 1\n3 2 1 0 0 1 1 0 0\n2 1 0 0 0 1 2 1 1\n1 0 1 1 1 2 1 0 1\n2 1 0 1 1 1 0 0 1\n1 0 1 1 0 0 0 1 2\n2 1 2 1 0 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 170, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 0, 1, 1, 0, 0], [1, 1, 0, 0, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1]], "solution": [[4, 3, 2, 2, 1, 2, 2, 2, 3], [3, 2, 1, 1, 0, 1, 1, 1, 2], [2, 1, 0, 1, 1, 1, 0, 0, 1], [3, 2, 1, 0, 0, 1, 1, 0, 0], [2, 1, 0, 0, 0, 1, 2, 1, 1], [1, 0, 1, 1, 1, 2, 1, 0, 1], [2, 1, 0, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 0, 0, 0, 1, 2], [2, 1, 2, 1, 0, 0, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0\n1 1 1 1 1\n1 0 1 1 1\n1 1 1 0 1\n1 1 1 0 1\n", "answer": "0 1 1 0 0\n1 1 2 1 1\n1 0 1 1 2\n2 1 1 0 1\n3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 171, "matrix": [[0, 1, 1, 0, 0], [1, 1, 1, 1, 1], [1, 0, 1, 1, 1], [1, 1, 1, 0, 1], [1, 1, 1, 0, 1]], "solution": [[0, 1, 1, 0, 0], [1, 1, 2, 1, 1], [1, 0, 1, 1, 2], [2, 1, 1, 0, 1], [3, 2, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1\n1 1 0 1 1 1 0 0\n0 1 1 1 1 1 1 1\n1 1 1 1 0 0 1 1\n1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1\n1 1 1 1 0 1 0 0\n", "answer": "3 3 2 2 1 2 2 2\n2 2 1 1 0 1 1 1\n1 1 0 1 1 1 0 0\n0 1 1 2 1 1 1 1\n1 2 2 1 0 0 1 2\n1 2 3 2 1 1 2 2\n0 1 2 2 1 2 1 1\n1 2 2 1 0 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 172, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0]], "solution": [[3, 3, 2, 2, 1, 2, 2, 2], [2, 2, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 2, 1, 1, 1, 1], [1, 2, 2, 1, 0, 0, 1, 2], [1, 2, 3, 2, 1, 1, 2, 2], [0, 1, 2, 2, 1, 2, 1, 1], [1, 2, 2, 1, 0, 1, 0, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0\n1 0 1\n1 1 1\n", "answer": "1 0 0\n1 0 1\n2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 173, "matrix": [[1, 0, 0], [1, 0, 1], [1, 1, 1]], "solution": [[1, 0, 0], [1, 0, 1], [2, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 1 0 1 1\n0 1 1 0 1 0\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 0 1 1\n", "answer": "2 3 2 1 2 2\n1 2 1 0 1 1\n0 1 1 0 1 0\n1 2 2 1 2 1\n2 3 2 1 2 2\n3 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 174, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1]], "solution": [[2, 3, 2, 1, 2, 2], [1, 2, 1, 0, 1, 1], [0, 1, 1, 0, 1, 0], [1, 2, 2, 1, 2, 1], [2, 3, 2, 1, 2, 2], [3, 2, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0\n0 1 1 1 0 1 1\n1 1 0 1 0 1 0\n0 1 1 1 1 1 1\n1 1 1 0 0 1 1\n1 1 1 1 1 1 1\n1 1 1 0 1 1 0\n", "answer": "1 2 2 2 1 1 0\n0 1 1 1 0 1 1\n1 1 0 1 0 1 0\n0 1 1 1 1 2 1\n1 2 1 0 0 1 2\n2 3 2 1 1 2 1\n3 2 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 175, "matrix": [[1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0]], "solution": [[1, 2, 2, 2, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 2, 1], [1, 2, 1, 0, 0, 1, 2], [2, 3, 2, 1, 1, 2, 1], [3, 2, 1, 0, 1, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0 0\n1 0 1 1 1 0 1\n1 0 0 1 1 1 1\n1 1 1 0 1 0 0\n1 0 1 1 1 0 1\n1 1 1 0 1 0 1\n0 1 1 1 1 0 1\n", "answer": "2 1 0 1 1 0 0\n1 0 1 2 1 0 1\n1 0 0 1 2 1 1\n2 1 1 0 1 0 0\n1 0 1 1 1 0 1\n1 1 1 0 1 0 1\n0 1 2 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 176, "matrix": [[1, 1, 0, 1, 1, 0, 0], [1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1]], "solution": [[2, 1, 0, 1, 1, 0, 0], [1, 0, 1, 2, 1, 0, 1], [1, 0, 0, 1, 2, 1, 1], [2, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0, 1], [0, 1, 2, 1, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 0 1 1\n1 1 1 1 1 0 1 1\n0 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 0\n0 1 0 0 1 1 1 1\n1 1 1 1 1 0 0 1\n1 1 0 0 1 1 1 0\n1 1 1 1 0 1 0 1\n", "answer": "1 0 1 2 1 0 1 2\n1 1 2 2 1 0 1 2\n0 1 2 2 2 1 2 1\n0 1 1 1 2 2 1 0\n0 1 0 0 1 1 1 1\n1 2 1 1 1 0 0 1\n2 1 0 0 1 1 1 0\n3 2 1 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 177, "matrix": [[1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 0, 1]], "solution": [[1, 0, 1, 2, 1, 0, 1, 2], [1, 1, 2, 2, 1, 0, 1, 2], [0, 1, 2, 2, 2, 1, 2, 1], [0, 1, 1, 1, 2, 2, 1, 0], [0, 1, 0, 0, 1, 1, 1, 1], [1, 2, 1, 1, 1, 0, 0, 1], [2, 1, 0, 0, 1, 1, 1, 0], [3, 2, 1, 1, 0, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 1\n0 1 0 1 1 0\n1 1 0 1 1 1\n0 1 0 1 1 0\n0 1 1 1 1 0\n1 1 1 0 0 1\n", "answer": "1 0 0 1 2 1\n0 1 0 1 1 0\n1 1 0 1 2 1\n0 1 0 1 1 0\n0 1 1 1 1 0\n1 2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 178, "matrix": [[1, 0, 0, 1, 1, 1], [0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 1]], "solution": [[1, 0, 0, 1, 2, 1], [0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 2, 1], [0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 2, 1, 0, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0\n1 1 1 1 1 1\n1 0 1 1 0 1\n1 1 1 1 0 1\n1 0 1 0 1 1\n0 1 1 1 0 1\n", "answer": "3 2 2 1 0 0\n2 1 2 2 1 1\n1 0 1 1 0 1\n2 1 2 1 0 1\n1 0 1 0 1 2\n0 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 179, "matrix": [[1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1]], "solution": [[3, 2, 2, 1, 0, 0], [2, 1, 2, 2, 1, 1], [1, 0, 1, 1, 0, 1], [2, 1, 2, 1, 0, 1], [1, 0, 1, 0, 1, 2], [0, 1, 2, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 1 0 1\n0 1 0 0\n1 0 0 0\n", "answer": "2 2 1 0\n1 1 0 1\n0 1 0 0\n1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 180, "matrix": [[1, 1, 1, 0], [1, 1, 0, 1], [0, 1, 0, 0], [1, 0, 0, 0]], "solution": [[2, 2, 1, 0], [1, 1, 0, 1], [0, 1, 0, 0], [1, 0, 0, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 0 1 1 0\n1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1\n1 1 1 0 1 1 1 1\n0 1 1 0 1 1 1 1\n1 1 1 0 1 1 0 1\n1 1 0 1 1 0 1 1\n0 1 1 1 0 0 0 1\n", "answer": "0 1 0 1 0 1 1 0\n1 2 1 2 1 2 2 1\n2 3 2 1 0 1 2 2\n1 2 1 0 1 2 2 3\n0 1 1 0 1 2 1 2\n1 2 1 0 1 1 0 1\n1 1 0 1 1 0 1 2\n0 1 1 1 0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 181, "matrix": [[0, 1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 0, 0, 0, 1]], "solution": [[0, 1, 0, 1, 0, 1, 1, 0], [1, 2, 1, 2, 1, 2, 2, 1], [2, 3, 2, 1, 0, 1, 2, 2], [1, 2, 1, 0, 1, 2, 2, 3], [0, 1, 1, 0, 1, 2, 1, 2], [1, 2, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 2], [0, 1, 1, 1, 0, 0, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n0 0 1 0\n1 1 1 0\n1 1 1 0\n", "answer": "1 0 1 1\n0 0 1 0\n1 1 1 0\n2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 182, "matrix": [[1, 0, 1, 1], [0, 0, 1, 0], [1, 1, 1, 0], [1, 1, 1, 0]], "solution": [[1, 0, 1, 1], [0, 0, 1, 0], [1, 1, 1, 0], [2, 2, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1\n1 1 1 1 1 1\n1 1 1 1 1 0\n0 1 1 1 1 0\n1 1 1 0 1 0\n1 1 1 1 1 1\n", "answer": "2 1 0 1 0 1\n2 2 1 2 1 1\n1 2 2 2 1 0\n0 1 2 1 1 0\n1 2 1 0 1 0\n2 3 2 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 183, "matrix": [[1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 0, 1], [2, 2, 1, 2, 1, 1], [1, 2, 2, 2, 1, 0], [0, 1, 2, 1, 1, 0], [1, 2, 1, 0, 1, 0], [2, 3, 2, 1, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1 1 1 1 0\n0 0 0 1 1 1 1 0 0 1\n1 1 1 0 1 1 0 1 1 0\n1 1 1 1 0 1 0 1 1 0\n1 1 1 1 1 1 1 1 0 1\n1 1 1 1 1 1 0 1 1 1\n1 0 1 1 0 0 0 1 0 0\n1 1 1 1 1 1 1 1 1 1\n0 0 1 1 0 1 1 1 0 0\n1 1 0 0 1 1 1 0 1 1\n", "answer": "1 0 1 0 1 2 2 1 1 0\n0 0 0 1 2 2 1 0 0 1\n1 1 1 0 1 1 0 1 1 0\n2 2 2 1 0 1 0 1 1 0\n3 2 3 2 1 2 1 1 0 1\n2 1 2 2 1 1 0 1 1 1\n1 0 1 1 0 0 0 1 0 0\n1 1 2 2 1 1 1 2 1 1\n0 0 1 1 0 1 2 1 0 0\n1 1 0 0 1 2 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 184, "matrix": [[1, 0, 1, 0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 0, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1, 1, 0, 1, 1]], "solution": [[1, 0, 1, 0, 1, 2, 2, 1, 1, 0], [0, 0, 0, 1, 2, 2, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 0], [2, 2, 2, 1, 0, 1, 0, 1, 1, 0], [3, 2, 3, 2, 1, 2, 1, 1, 0, 1], [2, 1, 2, 2, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 0, 0, 1, 0, 0], [1, 1, 2, 2, 1, 1, 1, 2, 1, 1], [0, 0, 1, 1, 0, 1, 2, 1, 0, 0], [1, 1, 0, 0, 1, 2, 1, 0, 1, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 1 1 1\n1 0 1 1 1 0 1 1 1\n1 0 1 0 1 1 1 0 1\n0 1 0 1 1 1 0 0 0\n1 1 1 0 1 1 1 1 1\n0 1 1 0 1 1 0 1 1\n0 1 1 1 1 1 0 1 0\n1 0 0 1 0 1 0 1 1\n1 1 1 1 1 0 1 1 0\n", "answer": "2 1 2 1 0 0 1 2 3\n1 0 1 1 1 0 1 1 2\n1 0 1 0 1 1 1 0 1\n0 1 0 1 2 1 0 0 0\n1 2 1 0 1 2 1 1 1\n0 1 1 0 1 1 0 1 1\n0 1 1 1 1 1 0 1 0\n1 0 0 1 0 1 0 1 1\n2 1 1 2 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 185, "matrix": [[1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0]], "solution": [[2, 1, 2, 1, 0, 0, 1, 2, 3], [1, 0, 1, 1, 1, 0, 1, 1, 2], [1, 0, 1, 0, 1, 1, 1, 0, 1], [0, 1, 0, 1, 2, 1, 0, 0, 0], [1, 2, 1, 0, 1, 2, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1, 0, 1, 1], [2, 1, 1, 2, 1, 0, 1, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 0 1 1\n1 0 1 1 1 0\n0 1 1 1 1 1\n", "answer": "3 2 1 0 1 2\n4 3 2 1 2 3\n3 2 2 1 2 2\n2 1 1 0 1 1\n1 0 1 1 1 0\n0 1 2 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 186, "matrix": [[1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1]], "solution": [[3, 2, 1, 0, 1, 2], [4, 3, 2, 1, 2, 3], [3, 2, 2, 1, 2, 2], [2, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0], [0, 1, 2, 2, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0\n1 1 0 1 1\n1 1 1 1 0\n1 1 0 1 0\n1 1 1 1 1\n", "answer": "3 2 1 1 0\n2 1 0 1 1\n3 2 1 1 0\n2 1 0 1 0\n3 2 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 187, "matrix": [[1, 1, 1, 1, 0], [1, 1, 0, 1, 1], [1, 1, 1, 1, 0], [1, 1, 0, 1, 0], [1, 1, 1, 1, 1]], "solution": [[3, 2, 1, 1, 0], [2, 1, 0, 1, 1], [3, 2, 1, 1, 0], [2, 1, 0, 1, 0], [3, 2, 1, 2, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1\n1 0 1 1 0\n1 1 1 1 1\n1 1 1 1 1\n1 0 1 1 1\n", "answer": "2 1 1 0 1\n1 0 1 1 0\n2 1 2 2 1\n2 1 2 3 2\n1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 188, "matrix": [[1, 1, 1, 0, 1], [1, 0, 1, 1, 0], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 0, 1, 1, 1]], "solution": [[2, 1, 1, 0, 1], [1, 0, 1, 1, 0], [2, 1, 2, 2, 1], [2, 1, 2, 3, 2], [1, 0, 1, 2, 3]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 1 1\n1 1 1\n", "answer": "0 1 0\n1 2 1\n2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 189, "matrix": [[0, 1, 0], [1, 1, 1], [1, 1, 1]], "solution": [[0, 1, 0], [1, 2, 1], [2, 3, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1\n0 1 1 1 1 1 0\n1 1 0 0 1 1 1\n1 1 1 1 1 0 1\n0 0 1 1 1 0 0\n1 1 1 1 0 1 1\n1 1 0 1 0 1 1\n", "answer": "1 2 1 0 1 2 1\n0 1 1 1 2 1 0\n1 1 0 0 1 1 1\n1 1 1 1 1 0 1\n0 0 1 2 1 0 0\n1 1 1 1 0 1 1\n2 1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 190, "matrix": [[1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [0, 0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1]], "solution": [[1, 2, 1, 0, 1, 2, 1], [0, 1, 1, 1, 2, 1, 0], [1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [0, 0, 1, 2, 1, 0, 0], [1, 1, 1, 1, 0, 1, 1], [2, 1, 0, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0 1\n0 0 1 1 1\n1 1 1 1 1\n1 1 1 1 1\n1 1 0 1 1\n", "answer": "1 0 0 0 1\n0 0 1 1 2\n1 1 2 2 3\n2 2 1 2 3\n2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 191, "matrix": [[1, 0, 0, 0, 1], [0, 0, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1]], "solution": [[1, 0, 0, 0, 1], [0, 0, 1, 1, 2], [1, 1, 2, 2, 3], [2, 2, 1, 2, 3], [2, 1, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 0 1\n1 1 1 1 1 1 0 0\n1 1 0 0 1 1 0 1\n1 1 1 1 0 0 1 1\n1 1 1 1 0 1 1 1\n1 1 1 1 1 1 0 1\n1 1 0 1 1 0 0 1\n1 1 1 0 1 1 1 0\n", "answer": "0 0 1 2 2 1 0 1\n1 1 1 1 2 1 0 0\n2 1 0 0 1 1 0 1\n3 2 1 1 0 0 1 2\n4 3 2 1 0 1 1 2\n3 2 1 2 1 1 0 1\n2 1 0 1 1 0 0 1\n3 2 1 0 1 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 192, "matrix": [[0, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 0]], "solution": [[0, 0, 1, 2, 2, 1, 0, 1], [1, 1, 1, 1, 2, 1, 0, 0], [2, 1, 0, 0, 1, 1, 0, 1], [3, 2, 1, 1, 0, 0, 1, 2], [4, 3, 2, 1, 0, 1, 1, 2], [3, 2, 1, 2, 1, 1, 0, 1], [2, 1, 0, 1, 1, 0, 0, 1], [3, 2, 1, 0, 1, 1, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 1 1\n1 1 1 1 1 0 0 1\n1 1 1 1 0 0 1 1\n1 0 1 1 1 1 0 1\n0 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 0\n0 1 0 1 1 1 1 1\n0 0 0 1 0 1 1 1\n", "answer": "2 1 0 1 0 1 1 2\n3 2 1 2 1 0 0 1\n2 1 2 1 0 0 1 2\n1 0 1 2 1 1 0 1\n0 1 2 3 2 2 1 1\n0 1 1 2 2 2 1 0\n0 1 0 1 1 2 2 1\n0 0 0 1 0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 193, "matrix": [[1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1, 1]], "solution": [[2, 1, 0, 1, 0, 1, 1, 2], [3, 2, 1, 2, 1, 0, 0, 1], [2, 1, 2, 1, 0, 0, 1, 2], [1, 0, 1, 2, 1, 1, 0, 1], [0, 1, 2, 3, 2, 2, 1, 1], [0, 1, 1, 2, 2, 2, 1, 0], [0, 1, 0, 1, 1, 2, 2, 1], [0, 0, 0, 1, 0, 1, 2, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1\n0 1 1 1 0 1 1 1\n1 1 0 1 1 1 1 0\n1 1 1 1 0 1 1 0\n1 1 1 1 1 0 1 1\n1 1 1 1 0 1 1 1\n1 0 0 0 1 1 0 1\n1 1 0 1 1 1 1 0\n", "answer": "1 1 0 1 1 2 3 2\n0 1 1 1 0 1 2 1\n1 1 0 1 1 2 1 0\n2 2 1 1 0 1 1 0\n3 2 2 2 1 0 1 1\n2 1 1 1 0 1 1 2\n1 0 0 0 1 1 0 1\n2 1 0 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 194, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 0]], "solution": [[1, 1, 0, 1, 1, 2, 3, 2], [0, 1, 1, 1, 0, 1, 2, 1], [1, 1, 0, 1, 1, 2, 1, 0], [2, 2, 1, 1, 0, 1, 1, 0], [3, 2, 2, 2, 1, 0, 1, 1], [2, 1, 1, 1, 0, 1, 1, 2], [1, 0, 0, 0, 1, 1, 0, 1], [2, 1, 0, 1, 2, 2, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 1 1 1 1 1\n1 1 1 0 1 0 0 1 1 0\n1 0 0 1 0 0 1 0 1 1\n1 0 1 1 0 1 1 0 0 1\n1 1 1 0 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 1 0\n1 1 1 1 0 1 0 1 1 1\n1 0 1 1 1 1 1 1 0 1\n1 1 1 1 0 1 0 1 1 1\n0 1 0 1 1 1 1 1 1 1\n", "answer": "1 0 0 1 2 1 1 2 2 1\n2 1 1 0 1 0 0 1 1 0\n1 0 0 1 0 0 1 0 1 1\n1 0 1 1 0 1 1 0 0 1\n2 1 1 0 1 1 2 1 1 1\n3 2 2 1 1 0 1 2 1 0\n2 1 2 1 0 1 0 1 1 1\n1 0 1 2 1 2 1 1 0 1\n1 1 1 1 0 1 0 1 1 2\n0 1 0 1 1 2 1 2 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 195, "matrix": [[1, 0, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1, 1, 0], [1, 0, 0, 1, 0, 0, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 0, 1, 2, 1, 1, 2, 2, 1], [2, 1, 1, 0, 1, 0, 0, 1, 1, 0], [1, 0, 0, 1, 0, 0, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 1, 0, 0, 1], [2, 1, 1, 0, 1, 1, 2, 1, 1, 1], [3, 2, 2, 1, 1, 0, 1, 2, 1, 0], [2, 1, 2, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 2, 1, 2, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1, 2], [0, 1, 0, 1, 1, 2, 1, 2, 2, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0 0 1 1 1\n1 0 1 1 1 1 1 1\n0 0 1 1 1 1 0 1\n1 1 1 1 1 1 1 1\n1 1 0 1 0 1 1 1\n1 0 1 1 1 0 1 1\n1 1 1 1 1 0 0 1\n1 0 0 1 0 0 1 1\n", "answer": "0 1 0 0 0 1 2 3\n1 0 1 1 1 2 1 2\n0 0 1 2 2 1 0 1\n1 1 1 2 1 2 1 2\n2 1 0 1 0 1 2 3\n1 0 1 2 1 0 1 2\n2 1 1 2 1 0 0 1\n1 0 0 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 196, "matrix": [[0, 1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1], [1, 0, 0, 1, 0, 0, 1, 1]], "solution": [[0, 1, 0, 0, 0, 1, 2, 3], [1, 0, 1, 1, 1, 2, 1, 2], [0, 0, 1, 2, 2, 1, 0, 1], [1, 1, 1, 2, 1, 2, 1, 2], [2, 1, 0, 1, 0, 1, 2, 3], [1, 0, 1, 2, 1, 0, 1, 2], [2, 1, 1, 2, 1, 0, 0, 1], [1, 0, 0, 1, 0, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1\n1 1 1 0\n1 1 1 0\n1 1 1 1\n", "answer": "0 1 0 1\n1 2 1 0\n2 2 1 0\n3 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 197, "matrix": [[0, 1, 0, 1], [1, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1]], "solution": [[0, 1, 0, 1], [1, 2, 1, 0], [2, 2, 1, 0], [3, 3, 2, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0\n0 1 1\n0 1 0\n", "answer": "1 0 0\n0 1 1\n0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 198, "matrix": [[1, 0, 0], [0, 1, 1], [0, 1, 0]], "solution": [[1, 0, 0], [0, 1, 1], [0, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0\n1 1 1 1\n1 1 1 0\n1 1 1 0\n", "answer": "0 1 0 0\n1 2 1 1\n2 2 1 0\n3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 199, "matrix": [[0, 1, 0, 0], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 0]], "solution": [[0, 1, 0, 0], [1, 2, 1, 1], [2, 2, 1, 0], [3, 2, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 0 1 1\n1 0 0 1 1 1 1 1\n1 1 1 1 1 1 1 1\n0 1 0 1 1 1 1 0\n0 0 1 1 0 1 1 1\n1 1 1 1 1 1 0 0\n1 1 1 1 1 1 1 1\n0 0 1 0 1 1 0 1\n", "answer": "1 0 1 2 1 0 1 2\n1 0 0 1 2 1 2 2\n1 1 1 2 2 2 2 1\n0 1 0 1 1 2 1 0\n0 0 1 1 0 1 1 1\n1 1 2 2 1 1 0 0\n1 1 2 1 2 2 1 1\n0 0 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 200, "matrix": [[1, 0, 1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 0], [0, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 0, 1]], "solution": [[1, 0, 1, 2, 1, 0, 1, 2], [1, 0, 0, 1, 2, 1, 2, 2], [1, 1, 1, 2, 2, 2, 2, 1], [0, 1, 0, 1, 1, 2, 1, 0], [0, 0, 1, 1, 0, 1, 1, 1], [1, 1, 2, 2, 1, 1, 0, 0], [1, 1, 2, 1, 2, 2, 1, 1], [0, 0, 1, 0, 1, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0 1 1 1\n1 1 1 1 0 1 0 0\n1 0 1 1 0 0 1 1\n1 1 1 0 0 1 1 1\n0 1 0 1 1 1 1 0\n1 1 1 1 1 1 0 1\n0 1 1 0 1 1 1 1\n1 0 1 1 0 1 1 1\n", "answer": "0 1 1 0 0 1 1 1\n1 1 2 1 0 1 0 0\n1 0 1 1 0 0 1 1\n1 1 1 0 0 1 2 1\n0 1 0 1 1 2 1 0\n1 2 1 1 2 1 0 1\n0 1 1 0 1 2 1 2\n1 0 1 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 201, "matrix": [[0, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 1]], "solution": [[0, 1, 1, 0, 0, 1, 1, 1], [1, 1, 2, 1, 0, 1, 0, 0], [1, 0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 0, 1, 2, 1], [0, 1, 0, 1, 1, 2, 1, 0], [1, 2, 1, 1, 2, 1, 0, 1], [0, 1, 1, 0, 1, 2, 1, 2], [1, 0, 1, 1, 0, 1, 2, 3]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 1 1 1 1\n1 1 1 1 0 1 1 0 0\n0 1 1 0 0 1 0 1 0\n1 1 0 0 1 1 1 1 0\n1 0 1 1 1 1 1 1 1\n1 1 0 1 1 0 1 1 0\n1 0 0 1 1 1 0 1 1\n0 0 1 1 0 1 1 1 1\n1 1 1 0 1 1 1 1 1\n", "answer": "0 1 1 0 1 2 2 1 1\n1 2 2 1 0 1 1 0 0\n0 1 1 0 0 1 0 1 0\n1 1 0 0 1 2 1 1 0\n1 0 1 1 2 1 2 2 1\n2 1 0 1 1 0 1 1 0\n1 0 0 1 1 1 0 1 1\n0 0 1 1 0 1 1 2 2\n1 1 1 0 1 2 2 3 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 202, "matrix": [[0, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 0], [0, 1, 1, 0, 0, 1, 0, 1, 0], [1, 1, 0, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 1, 0, 1, 1], [0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[0, 1, 1, 0, 1, 2, 2, 1, 1], [1, 2, 2, 1, 0, 1, 1, 0, 0], [0, 1, 1, 0, 0, 1, 0, 1, 0], [1, 1, 0, 0, 1, 2, 1, 1, 0], [1, 0, 1, 1, 2, 1, 2, 2, 1], [2, 1, 0, 1, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 1, 0, 1, 1], [0, 0, 1, 1, 0, 1, 1, 2, 2], [1, 1, 1, 0, 1, 2, 2, 3, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0 1\n0 1 1 1 1\n1 1 1 1 1\n0 1 1 1 0\n0 1 0 1 1\n", "answer": "1 0 0 0 1\n0 1 1 1 2\n1 2 2 2 1\n0 1 1 1 0\n0 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 203, "matrix": [[1, 0, 0, 0, 1], [0, 1, 1, 1, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 0], [0, 1, 0, 1, 1]], "solution": [[1, 0, 0, 0, 1], [0, 1, 1, 1, 2], [1, 2, 2, 2, 1], [0, 1, 1, 1, 0], [0, 1, 0, 1, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n0 1 1\n1 1 1\n", "answer": "1 1 0\n0 1 1\n1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 204, "matrix": [[1, 1, 0], [0, 1, 1], [1, 1, 1]], "solution": [[1, 1, 0], [0, 1, 1], [1, 2, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 0 0 0 1\n1 1 1 1 0 1 1 1 1 1\n1 0 1 0 1 0 1 1 1 1\n0 1 1 1 0 0 1 1 0 1\n0 1 1 1 1 1 1 0 0 1\n0 1 1 1 1 1 1 0 1 1\n1 1 1 0 1 1 1 0 1 1\n1 0 1 1 1 0 0 0 1 1\n0 1 0 1 1 1 1 0 1 0\n1 1 1 1 0 1 1 0 1 0\n", "answer": "2 1 0 0 1 1 0 0 0 1\n2 1 1 1 0 1 1 1 1 2\n1 0 1 0 1 0 1 2 1 2\n0 1 2 1 0 0 1 1 0 1\n0 1 2 2 1 1 1 0 0 1\n0 1 2 1 2 2 1 0 1 2\n1 1 1 0 1 1 1 0 1 2\n1 0 1 1 1 0 0 0 1 1\n0 1 0 1 1 1 1 0 1 0\n1 2 1 1 0 1 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 205, "matrix": [[1, 1, 0, 0, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 0, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 0, 0, 1, 1], [0, 1, 0, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1, 0, 1, 0]], "solution": [[2, 1, 0, 0, 1, 1, 0, 0, 0, 1], [2, 1, 1, 1, 0, 1, 1, 1, 1, 2], [1, 0, 1, 0, 1, 0, 1, 2, 1, 2], [0, 1, 2, 1, 0, 0, 1, 1, 0, 1], [0, 1, 2, 2, 1, 1, 1, 0, 0, 1], [0, 1, 2, 1, 2, 2, 1, 0, 1, 2], [1, 1, 1, 0, 1, 1, 1, 0, 1, 2], [1, 0, 1, 1, 1, 0, 0, 0, 1, 1], [0, 1, 0, 1, 1, 1, 1, 0, 1, 0], [1, 2, 1, 1, 0, 1, 1, 0, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 1 1\n0 1 0 1 1 1 1 1 1\n0 1 0 1 1 0 1 1 1\n1 0 0 0 0 1 1 1 0\n1 1 1 1 1 1 1 1 1\n0 0 0 1 1 1 0 1 1\n1 0 1 0 1 1 1 1 0\n1 1 1 1 1 1 1 1 1\n1 1 0 1 0 0 1 0 0\n", "answer": "1 2 1 2 2 1 0 1 2\n0 1 0 1 2 1 1 2 2\n0 1 0 1 1 0 1 2 1\n1 0 0 0 0 1 2 1 0\n1 1 1 1 1 2 1 2 1\n0 0 0 1 2 1 0 1 1\n1 0 1 0 1 2 1 1 0\n2 1 1 1 1 1 2 1 1\n2 1 0 1 0 0 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 206, "matrix": [[1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 0, 1, 0, 0]], "solution": [[1, 2, 1, 2, 2, 1, 0, 1, 2], [0, 1, 0, 1, 2, 1, 1, 2, 2], [0, 1, 0, 1, 1, 0, 1, 2, 1], [1, 0, 0, 0, 0, 1, 2, 1, 0], [1, 1, 1, 1, 1, 2, 1, 2, 1], [0, 0, 0, 1, 2, 1, 0, 1, 1], [1, 0, 1, 0, 1, 2, 1, 1, 0], [2, 1, 1, 1, 1, 1, 2, 1, 1], [2, 1, 0, 1, 0, 0, 1, 0, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 0 1\n1 1 0 1 0 1 1\n0 1 0 1 1 1 1\n1 1 0 1 1 1 1\n0 1 1 1 0 1 1\n1 1 1 1 1 1 0\n0 1 1 1 1 1 1\n", "answer": "0 0 1 2 1 0 1\n1 1 0 1 0 1 2\n0 1 0 1 1 2 3\n1 1 0 1 1 2 2\n0 1 1 1 0 1 1\n1 2 2 2 1 1 0\n0 1 2 3 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 207, "matrix": [[0, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1], [0, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1]], "solution": [[0, 0, 1, 2, 1, 0, 1], [1, 1, 0, 1, 0, 1, 2], [0, 1, 0, 1, 1, 2, 3], [1, 1, 0, 1, 1, 2, 2], [0, 1, 1, 1, 0, 1, 1], [1, 2, 2, 2, 1, 1, 0], [0, 1, 2, 3, 2, 2, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 1\n1 1 0 0 1 1 0 1 1\n1 1 1 1 1 0 1 0 1\n1 0 1 0 1 1 1 1 0\n0 1 0 1 0 1 1 1 1\n1 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1 0\n", "answer": "0 1 0 1 2 3 3 4 5\n1 2 1 2 3 3 2 3 4\n0 1 1 1 2 2 1 2 3\n1 1 0 0 1 1 0 1 2\n2 1 1 1 1 0 1 0 1\n1 0 1 0 1 1 2 1 0\n0 1 0 1 0 1 2 2 1\n1 2 1 2 1 2 2 1 0\n2 3 2 3 2 3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 208, "matrix": [[0, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0], [0, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 0, 1, 2, 3, 3, 4, 5], [1, 2, 1, 2, 3, 3, 2, 3, 4], [0, 1, 1, 1, 2, 2, 1, 2, 3], [1, 1, 0, 0, 1, 1, 0, 1, 2], [2, 1, 1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 1, 2, 1, 0], [0, 1, 0, 1, 0, 1, 2, 2, 1], [1, 2, 1, 2, 1, 2, 2, 1, 0], [2, 3, 2, 3, 2, 3, 2, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 0 1 1 0\n0 0 1 0 0 0 1 0 1 1\n1 1 1 1 0 0 1 1 1 1\n1 0 0 1 1 1 1 1 0 0\n0 1 0 1 1 1 1 0 1 0\n1 1 1 1 0 1 1 1 1 1\n0 1 0 1 1 1 0 0 1 1\n1 1 0 1 1 1 0 1 1 1\n1 0 1 1 1 1 1 0 1 0\n1 1 1 0 0 0 1 1 1 1\n", "answer": "1 1 1 0 1 1 0 1 1 0\n0 0 1 0 0 0 1 0 1 1\n1 1 1 1 0 0 1 1 1 1\n1 0 0 1 1 1 2 1 0 0\n0 1 0 1 1 2 1 0 1 0\n1 2 1 1 0 1 1 1 2 1\n0 1 0 1 1 1 0 0 1 2\n1 1 0 1 2 1 0 1 2 1\n1 0 1 1 1 1 1 0 1 0\n2 1 1 0 0 0 1 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 209, "matrix": [[1, 1, 1, 0, 1, 1, 0, 1, 1, 0], [0, 0, 1, 0, 0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 0, 0], [0, 1, 0, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 0, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 0, 1, 1, 1, 1]], "solution": [[1, 1, 1, 0, 1, 1, 0, 1, 1, 0], [0, 0, 1, 0, 0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 2, 1, 0, 0], [0, 1, 0, 1, 1, 2, 1, 0, 1, 0], [1, 2, 1, 1, 0, 1, 1, 1, 2, 1], [0, 1, 0, 1, 1, 1, 0, 0, 1, 2], [1, 1, 0, 1, 2, 1, 0, 1, 2, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1, 0], [2, 1, 1, 0, 0, 0, 1, 1, 2, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n1 0 0\n1 0 1\n", "answer": "2 1 0\n1 0 0\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 210, "matrix": [[1, 1, 0], [1, 0, 0], [1, 0, 1]], "solution": [[2, 1, 0], [1, 0, 0], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1 1\n0 0 1 1 1 1 1 1 1\n1 0 1 0 1 1 1 1 1\n0 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1\n0 1 0 1 1 0 1 1 0\n1 1 1 1 1 0 0 1 1\n1 1 1 0 0 1 1 1 0\n1 0 0 1 1 1 1 0 1\n", "answer": "1 1 1 0 1 2 3 4 5\n0 0 1 1 2 3 3 4 4\n1 0 1 0 1 2 2 3 3\n0 1 2 1 2 2 1 2 2\n1 2 1 2 2 1 0 1 1\n0 1 0 1 1 0 1 1 0\n1 2 1 1 1 0 0 1 1\n2 1 1 0 0 1 1 1 0\n1 0 0 1 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 211, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 1, 0, 1]], "solution": [[1, 1, 1, 0, 1, 2, 3, 4, 5], [0, 0, 1, 1, 2, 3, 3, 4, 4], [1, 0, 1, 0, 1, 2, 2, 3, 3], [0, 1, 2, 1, 2, 2, 1, 2, 2], [1, 2, 1, 2, 2, 1, 0, 1, 1], [0, 1, 0, 1, 1, 0, 1, 1, 0], [1, 2, 1, 1, 1, 0, 0, 1, 1], [2, 1, 1, 0, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 2, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1\n1 1 0 1 1 1 0 1\n1 1 1 1 1 1 1 1\n1 1 1 0 1 1 0 1\n0 1 0 1 1 1 1 0\n0 1 0 0 1 1 1 1\n1 1 1 1 1 1 0 1\n0 1 1 0 1 1 0 0\n", "answer": "3 2 1 1 0 1 1 2\n2 1 0 1 1 1 0 1\n2 2 1 1 2 2 1 2\n1 2 1 0 1 1 0 1\n0 1 0 1 2 2 1 0\n0 1 0 0 1 2 1 1\n1 2 1 1 2 1 0 1\n0 1 1 0 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 212, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 1, 0], [0, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 0, 0]], "solution": [[3, 2, 1, 1, 0, 1, 1, 2], [2, 1, 0, 1, 1, 1, 0, 1], [2, 2, 1, 1, 2, 2, 1, 2], [1, 2, 1, 0, 1, 1, 0, 1], [0, 1, 0, 1, 2, 2, 1, 0], [0, 1, 0, 0, 1, 2, 1, 1], [1, 2, 1, 1, 2, 1, 0, 1], [0, 1, 1, 0, 1, 1, 0, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 1\n1 1 1\n", "answer": "0 1 2\n1 2 3\n2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 213, "matrix": [[0, 1, 1], [1, 1, 1], [1, 1, 1]], "solution": [[0, 1, 2], [1, 2, 3], [2, 3, 4]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1 0 1\n1 1 1 1 0 1 1 1 1 1\n0 1 1 1 1 1 1 1 0 1\n1 0 1 1 1 1 1 0 0 1\n0 0 1 0 0 0 1 1 1 1\n1 1 1 0 1 1 1 1 1 1\n0 1 1 1 1 1 1 0 0 0\n1 1 1 1 1 1 0 0 1 1\n1 1 1 1 1 1 0 1 1 0\n1 1 1 1 1 1 0 1 0 1\n", "answer": "2 1 0 1 1 2 2 1 0 1\n1 2 1 1 0 1 2 2 1 2\n0 1 2 2 1 2 2 1 0 1\n1 0 1 1 1 1 1 0 0 1\n0 0 1 0 0 0 1 1 1 2\n1 1 1 0 1 1 2 1 1 1\n0 1 2 1 2 2 1 0 0 0\n1 2 3 2 2 1 0 0 1 1\n2 3 4 3 2 1 0 1 1 0\n3 4 4 3 2 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 214, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 0, 0, 1], [0, 0, 1, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 0, 1]], "solution": [[2, 1, 0, 1, 1, 2, 2, 1, 0, 1], [1, 2, 1, 1, 0, 1, 2, 2, 1, 2], [0, 1, 2, 2, 1, 2, 2, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 0, 0, 1], [0, 0, 1, 0, 0, 0, 1, 1, 1, 2], [1, 1, 1, 0, 1, 1, 2, 1, 1, 1], [0, 1, 2, 1, 2, 2, 1, 0, 0, 0], [1, 2, 3, 2, 2, 1, 0, 0, 1, 1], [2, 3, 4, 3, 2, 1, 0, 1, 1, 0], [3, 4, 4, 3, 2, 1, 0, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 0\n1 0 0 1 1 1 1 1\n0 1 1 0 1 0 1 1\n1 0 0 1 1 0 1 0\n1 1 1 1 0 1 1 0\n0 1 1 0 1 1 1 1\n0 1 1 1 1 1 1 0\n1 1 0 1 1 1 1 1\n", "answer": "2 1 0 1 2 2 1 0\n1 0 0 1 2 1 2 1\n0 1 1 0 1 0 1 1\n1 0 0 1 1 0 1 0\n1 1 1 1 0 1 1 0\n0 1 1 0 1 2 2 1\n0 1 1 1 2 2 1 0\n1 1 0 1 2 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 215, "matrix": [[1, 1, 0, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 2, 2, 1, 0], [1, 0, 0, 1, 2, 1, 2, 1], [0, 1, 1, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 0, 1, 2, 2, 1], [0, 1, 1, 1, 2, 2, 1, 0], [1, 1, 0, 1, 2, 3, 2, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0 1\n0 1 1 1\n0 0 1 1\n0 1 0 1\n", "answer": "0 0 0 1\n0 1 1 2\n0 0 1 2\n0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 216, "matrix": [[0, 0, 0, 1], [0, 1, 1, 1], [0, 0, 1, 1], [0, 1, 0, 1]], "solution": [[0, 0, 0, 1], [0, 1, 1, 2], [0, 0, 1, 2], [0, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0\n1 0 1\n1 1 1\n", "answer": "1 0 0\n1 0 1\n2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 217, "matrix": [[1, 0, 0], [1, 0, 1], [1, 1, 1]], "solution": [[1, 0, 0], [1, 0, 1], [2, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1\n0 0 1 0 1 0\n1 1 0 1 0 1\n0 1 1 1 1 1\n1 1 1 0 1 1\n1 0 0 1 0 0\n", "answer": "1 1 0 1 2 1\n0 0 1 0 1 0\n1 1 0 1 0 1\n0 1 1 1 1 2\n1 1 1 0 1 1\n1 0 0 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 218, "matrix": [[1, 1, 0, 1, 1, 1], [0, 0, 1, 0, 1, 0], [1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 0, 0]], "solution": [[1, 1, 0, 1, 2, 1], [0, 0, 1, 0, 1, 0], [1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 2], [1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 0, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 0 1\n0 1 1 1 1 1 1 1 1\n0 1 1 1 0 1 0 1 1\n1 0 1 0 0 1 1 1 1\n0 1 0 0 0 1 1 1 1\n0 1 0 1 1 0 0 0 1\n1 1 1 0 1 1 0 1 0\n", "answer": "0 1 2 3 4 4 3 2 1\n1 2 3 4 3 3 2 1 0\n1 2 3 3 2 2 1 0 1\n0 1 2 2 1 2 1 1 2\n0 1 2 1 0 1 0 1 2\n1 0 1 0 0 1 1 2 3\n0 1 0 0 0 1 1 1 2\n0 1 0 1 1 0 0 0 1\n1 2 1 0 1 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 219, "matrix": [[0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1], [1, 0, 1, 0, 0, 1, 1, 1, 1], [0, 1, 0, 0, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 0, 0, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1, 0]], "solution": [[0, 1, 2, 3, 4, 4, 3, 2, 1], [1, 2, 3, 4, 3, 3, 2, 1, 0], [1, 2, 3, 3, 2, 2, 1, 0, 1], [0, 1, 2, 2, 1, 2, 1, 1, 2], [0, 1, 2, 1, 0, 1, 0, 1, 2], [1, 0, 1, 0, 0, 1, 1, 2, 3], [0, 1, 0, 0, 0, 1, 1, 1, 2], [0, 1, 0, 1, 1, 0, 0, 0, 1], [1, 2, 1, 0, 1, 1, 0, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 0\n1 0 1 1 1 1 1 0\n1 1 1 1 0 1 1 1\n1 1 1 1 0 1 1 0\n1 0 1 1 0 0 1 1\n0 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1\n1 0 1 1 1 1 0 0\n", "answer": "2 1 2 3 2 1 0 0\n1 0 1 2 1 2 1 0\n2 1 2 1 0 1 2 1\n2 1 2 1 0 1 1 0\n1 0 1 1 0 0 1 1\n0 1 2 2 1 1 2 2\n1 1 2 2 1 0 1 1\n1 0 1 2 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 220, "matrix": [[1, 1, 1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 0, 0]], "solution": [[2, 1, 2, 3, 2, 1, 0, 0], [1, 0, 1, 2, 1, 2, 1, 0], [2, 1, 2, 1, 0, 1, 2, 1], [2, 1, 2, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 1], [0, 1, 2, 2, 1, 1, 2, 2], [1, 1, 2, 2, 1, 0, 1, 1], [1, 0, 1, 2, 2, 1, 0, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 0 1 1\n1 1 0 0 1 1 1 1 1\n1 1 0 0 1 0 0 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 1\n0 1 1 0 1 0 0 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 0 1 1\n0 1 0 0 0 1 1 1 1\n", "answer": "2 1 0 1 2 1 0 1 2\n2 1 0 0 1 1 1 2 3\n2 1 0 0 1 0 0 1 2\n2 2 1 1 1 1 1 2 3\n1 2 2 1 0 1 1 2 3\n0 1 1 0 1 0 0 1 2\n1 2 2 1 2 1 1 2 3\n1 2 1 0 1 1 0 1 2\n0 1 0 0 0 1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 221, "matrix": [[1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1], [0, 1, 0, 0, 0, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 2, 1, 0, 1, 2], [2, 1, 0, 0, 1, 1, 1, 2, 3], [2, 1, 0, 0, 1, 0, 0, 1, 2], [2, 2, 1, 1, 1, 1, 1, 2, 3], [1, 2, 2, 1, 0, 1, 1, 2, 3], [0, 1, 1, 0, 1, 0, 0, 1, 2], [1, 2, 2, 1, 2, 1, 1, 2, 3], [1, 2, 1, 0, 1, 1, 0, 1, 2], [0, 1, 0, 0, 0, 1, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 1 1\n1 1 1 1 1 0 0\n1 1 1 1 1 1 0\n1 0 0 1 1 1 1\n0 0 1 1 0 1 1\n0 1 1 1 1 0 1\n1 1 1 0 1 0 1\n", "answer": "1 0 0 1 2 1 1\n2 1 1 2 1 0 0\n2 1 1 2 2 1 0\n1 0 0 1 1 2 1\n0 0 1 1 0 1 2\n0 1 2 1 1 0 1\n1 2 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 222, "matrix": [[1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0, 1]], "solution": [[1, 0, 0, 1, 2, 1, 1], [2, 1, 1, 2, 1, 0, 0], [2, 1, 1, 2, 2, 1, 0], [1, 0, 0, 1, 1, 2, 1], [0, 0, 1, 1, 0, 1, 2], [0, 1, 2, 1, 1, 0, 1], [1, 2, 1, 0, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1 0\n1 0 0 1 1 1 0 1 0\n1 1 1 1 1 0 0 1 0\n0 1 1 1 1 0 1 1 1\n0 1 0 1 1 0 0 1 0\n1 0 1 1 1 1 1 0 1\n1 0 1 1 1 1 1 0 1\n0 1 0 1 1 1 0 1 1\n0 1 1 1 1 1 1 1 1\n", "answer": "2 1 1 0 1 2 1 1 0\n1 0 0 1 2 1 0 1 0\n1 1 1 2 1 0 0 1 0\n0 1 1 2 1 0 1 2 1\n0 1 0 1 1 0 0 1 0\n1 0 1 2 2 1 1 0 1\n1 0 1 2 3 2 1 0 1\n0 1 0 1 2 1 0 1 2\n0 1 1 2 3 2 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 223, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 0, 0, 1, 0], [1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 1, 0, 1, 2, 1, 1, 0], [1, 0, 0, 1, 2, 1, 0, 1, 0], [1, 1, 1, 2, 1, 0, 0, 1, 0], [0, 1, 1, 2, 1, 0, 1, 2, 1], [0, 1, 0, 1, 1, 0, 0, 1, 0], [1, 0, 1, 2, 2, 1, 1, 0, 1], [1, 0, 1, 2, 3, 2, 1, 0, 1], [0, 1, 0, 1, 2, 1, 0, 1, 2], [0, 1, 1, 2, 3, 2, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 0 1 0\n0 1 0 0\n1 0 1 1\n", "answer": "2 1 2 1\n1 0 1 0\n0 1 0 0\n1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 224, "matrix": [[1, 1, 1, 1], [1, 0, 1, 0], [0, 1, 0, 0], [1, 0, 1, 1]], "solution": [[2, 1, 2, 1], [1, 0, 1, 0], [0, 1, 0, 0], [1, 0, 1, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0\n0 0 1 0 1 1\n0 1 0 1 1 1\n1 1 1 1 1 1\n1 0 1 0 1 1\n0 1 1 0 1 1\n", "answer": "1 1 2 1 1 0\n0 0 1 0 1 1\n0 1 0 1 2 2\n1 1 1 1 2 3\n1 0 1 0 1 2\n0 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 225, "matrix": [[1, 1, 1, 1, 1, 0], [0, 0, 1, 0, 1, 1], [0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1], [0, 1, 1, 0, 1, 1]], "solution": [[1, 1, 2, 1, 1, 0], [0, 0, 1, 0, 1, 1], [0, 1, 0, 1, 2, 2], [1, 1, 1, 1, 2, 3], [1, 0, 1, 0, 1, 2], [0, 1, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 0 1 1\n1 1 0 1 1 0 1 0\n1 1 1 1 1 1 1 1\n1 1 1 1 0 1 0 0\n1 1 1 1 1 1 0 1\n1 1 1 0 1 0 0 1\n1 1 0 0 1 1 0 1\n0 0 0 0 1 1 0 1\n", "answer": "2 1 0 0 1 0 1 1\n2 1 0 1 1 0 1 0\n3 2 1 2 1 1 1 1\n4 3 2 1 0 1 0 0\n3 3 2 1 1 1 0 1\n2 2 1 0 1 0 0 1\n1 1 0 0 1 1 0 1\n0 0 0 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 226, "matrix": [[1, 1, 0, 0, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 0, 1], [0, 0, 0, 0, 1, 1, 0, 1]], "solution": [[2, 1, 0, 0, 1, 0, 1, 1], [2, 1, 0, 1, 1, 0, 1, 0], [3, 2, 1, 2, 1, 1, 1, 1], [4, 3, 2, 1, 0, 1, 0, 0], [3, 3, 2, 1, 1, 1, 0, 1], [2, 2, 1, 0, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 0, 1], [0, 0, 0, 0, 1, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 0 1\n1 0 0\n", "answer": "2 1 2\n1 0 1\n1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 227, "matrix": [[1, 1, 1], [1, 0, 1], [1, 0, 0]], "solution": [[2, 1, 2], [1, 0, 1], [1, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 0 1 1 1\n1 0 0 1 1\n1 1 1 1 1\n1 0 1 0 1\n", "answer": "2 1 2 3 4\n1 0 1 2 3\n1 0 0 1 2\n2 1 1 1 2\n1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 228, "matrix": [[1, 1, 1, 1, 1], [1, 0, 1, 1, 1], [1, 0, 0, 1, 1], [1, 1, 1, 1, 1], [1, 0, 1, 0, 1]], "solution": [[2, 1, 2, 3, 4], [1, 0, 1, 2, 3], [1, 0, 0, 1, 2], [2, 1, 1, 1, 2], [1, 0, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0 1 0\n0 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 0 1 1 0 1 1 1 0\n1 0 0 0 1 0 0 0 1 1\n1 1 0 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 1 0 1\n0 0 0 0 1 1 1 0 1 1\n1 1 1 1 0 0 0 0 0 0\n1 1 0 1 1 1 1 1 1 1\n", "answer": "1 2 3 4 3 2 1 0 1 0\n0 1 2 3 3 2 2 1 2 1\n1 2 1 2 2 1 2 2 2 1\n2 1 0 1 1 0 1 1 1 0\n1 0 0 0 1 0 0 0 1 1\n2 1 0 1 2 1 1 1 1 2\n1 1 1 0 1 2 2 1 0 1\n0 0 0 0 1 1 1 0 1 1\n1 1 1 1 0 0 0 0 0 0\n2 1 0 1 1 1 1 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 229, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 0], [1, 0, 0, 0, 1, 0, 0, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1], [0, 0, 0, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 2, 3, 4, 3, 2, 1, 0, 1, 0], [0, 1, 2, 3, 3, 2, 2, 1, 2, 1], [1, 2, 1, 2, 2, 1, 2, 2, 2, 1], [2, 1, 0, 1, 1, 0, 1, 1, 1, 0], [1, 0, 0, 0, 1, 0, 0, 0, 1, 1], [2, 1, 0, 1, 2, 1, 1, 1, 1, 2], [1, 1, 1, 0, 1, 2, 2, 1, 0, 1], [0, 0, 0, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [2, 1, 0, 1, 1, 1, 1, 1, 1, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 1 0 1 1\n1 0 1 0 1 0 1 0 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 0 1 0 1 1 0 0 1\n1 1 1 1 0 0 0 0 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1 1\n0 1 1 1 1 1 1 0 1 1\n1 1 1 1 0 1 0 0 0 1\n1 0 1 1 1 1 1 1 1 1\n", "answer": "0 1 0 1 2 1 1 0 1 2\n1 0 1 0 1 0 1 0 1 2\n2 1 1 1 1 1 2 1 1 2\n2 1 0 1 0 1 1 0 0 1\n3 2 1 1 0 0 0 0 1 2\n2 3 2 2 1 1 1 1 2 3\n1 2 3 3 2 1 0 1 2 3\n0 1 2 2 1 2 1 0 1 2\n1 1 2 1 0 1 0 0 0 1\n1 0 1 2 1 2 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 230, "matrix": [[0, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 0, 1, 2, 1, 1, 0, 1, 2], [1, 0, 1, 0, 1, 0, 1, 0, 1, 2], [2, 1, 1, 1, 1, 1, 2, 1, 1, 2], [2, 1, 0, 1, 0, 1, 1, 0, 0, 1], [3, 2, 1, 1, 0, 0, 0, 0, 1, 2], [2, 3, 2, 2, 1, 1, 1, 1, 2, 3], [1, 2, 3, 3, 2, 1, 0, 1, 2, 3], [0, 1, 2, 2, 1, 2, 1, 0, 1, 2], [1, 1, 2, 1, 0, 1, 0, 0, 0, 1], [1, 0, 1, 2, 1, 2, 1, 1, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0 1 1\n1 0 1 1 0 1\n0 1 0 0 1 1\n1 1 1 1 1 1\n0 1 1 1 1 1\n1 1 1 1 1 0\n", "answer": "1 0 0 0 1 2\n1 0 1 1 0 1\n0 1 0 0 1 2\n1 2 1 1 2 2\n0 1 2 2 2 1\n1 2 3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 231, "matrix": [[1, 0, 0, 0, 1, 1], [1, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0]], "solution": [[1, 0, 0, 0, 1, 2], [1, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 2], [1, 2, 1, 1, 2, 2], [0, 1, 2, 2, 2, 1], [1, 2, 3, 2, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1\n1 1 1 1 0\n1 1 1 1 1\n1 1 0 1 1\n1 1 1 0 1\n", "answer": "2 1 0 0 1\n3 2 1 1 0\n3 2 1 2 1\n2 1 0 1 2\n3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 232, "matrix": [[1, 1, 0, 0, 1], [1, 1, 1, 1, 0], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 0, 1]], "solution": [[2, 1, 0, 0, 1], [3, 2, 1, 1, 0], [3, 2, 1, 2, 1], [2, 1, 0, 1, 2], [3, 2, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0\n1 1 1 1\n1 1 1 1\n1 1 1 1\n", "answer": "0 1 0 0\n1 2 1 1\n2 3 2 2\n3 4 3 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 233, "matrix": [[0, 1, 0, 0], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], "solution": [[0, 1, 0, 0], [1, 2, 1, 1], [2, 3, 2, 2], [3, 4, 3, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 1 1\n0 1 1 1 1 0 1 1\n0 1 1 1 0 0 1 1\n1 0 1 0 1 0 1 1\n1 1 1 1 1 1 1 1\n1 1 1 0 0 0 1 1\n1 0 1 1 1 0 1 1\n1 0 1 1 0 0 1 1\n", "answer": "1 2 1 0 1 0 1 2\n0 1 2 1 1 0 1 2\n0 1 2 1 0 0 1 2\n1 0 1 0 1 0 1 2\n2 1 2 1 1 1 2 3\n2 1 1 0 0 0 1 2\n1 0 1 1 1 0 1 2\n1 0 1 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 234, "matrix": [[1, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 0, 1, 1]], "solution": [[1, 2, 1, 0, 1, 0, 1, 2], [0, 1, 2, 1, 1, 0, 1, 2], [0, 1, 2, 1, 0, 0, 1, 2], [1, 0, 1, 0, 1, 0, 1, 2], [2, 1, 2, 1, 1, 1, 2, 3], [2, 1, 1, 0, 0, 0, 1, 2], [1, 0, 1, 1, 1, 0, 1, 2], [1, 0, 1, 1, 0, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 0 0 0\n0 1 1 0\n1 1 1 1\n", "answer": "2 1 1 0\n1 0 0 0\n0 1 1 0\n1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 235, "matrix": [[1, 1, 1, 0], [1, 0, 0, 0], [0, 1, 1, 0], [1, 1, 1, 1]], "solution": [[2, 1, 1, 0], [1, 0, 0, 0], [0, 1, 1, 0], [1, 2, 2, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0\n0 1 1 1 1 1 1\n1 1 1 0 1 1 1\n1 0 1 1 1 1 1\n0 0 1 1 1 1 1\n1 1 0 1 1 1 1\n0 1 1 1 1 1 0\n", "answer": "1 2 2 1 0 1 0\n0 1 2 1 1 2 1\n1 1 1 0 1 2 2\n1 0 1 1 2 3 3\n0 0 1 2 3 3 2\n1 1 0 1 2 2 1\n0 1 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 236, "matrix": [[1, 1, 1, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0]], "solution": [[1, 2, 2, 1, 0, 1, 0], [0, 1, 2, 1, 1, 2, 1], [1, 1, 1, 0, 1, 2, 2], [1, 0, 1, 1, 2, 3, 3], [0, 0, 1, 2, 3, 3, 2], [1, 1, 0, 1, 2, 2, 1], [0, 1, 1, 2, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1 1\n0 1 1 0 1 0 1 1 1\n0 1 0 1 1 1 1 0 0\n1 1 0 1 1 1 1 0 1\n0 1 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 0 1\n1 1 0 0 0 1 0 1 1\n1 1 0 1 0 1 1 1 0\n1 0 0 0 1 1 1 1 1\n", "answer": "1 2 1 0 1 1 2 2 2\n0 1 1 0 1 0 1 1 1\n0 1 0 1 2 1 1 0 0\n1 1 0 1 2 2 1 0 1\n0 1 1 0 1 2 2 1 2\n1 2 1 1 1 2 1 0 1\n2 1 0 0 0 1 0 1 1\n2 1 0 1 0 1 1 1 0\n1 0 0 0 1 2 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 237, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 0, 0, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 0], [1, 0, 0, 0, 1, 1, 1, 1, 1]], "solution": [[1, 2, 1, 0, 1, 1, 2, 2, 2], [0, 1, 1, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 2, 1, 1, 0, 0], [1, 1, 0, 1, 2, 2, 1, 0, 1], [0, 1, 1, 0, 1, 2, 2, 1, 2], [1, 2, 1, 1, 1, 2, 1, 0, 1], [2, 1, 0, 0, 0, 1, 0, 1, 1], [2, 1, 0, 1, 0, 1, 1, 1, 0], [1, 0, 0, 0, 1, 2, 2, 2, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1\n0 0 1 1 1 1 0\n1 1 1 1 1 1 1\n1 1 1 1 1 0 1\n0 1 0 0 1 1 1\n1 1 1 1 1 1 0\n1 1 1 1 1 0 1\n", "answer": "1 1 2 1 0 1 1\n0 0 1 2 1 1 0\n1 1 2 2 2 1 1\n1 2 1 1 1 0 1\n0 1 0 0 1 1 1\n1 2 1 1 2 1 0\n2 3 2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 238, "matrix": [[1, 1, 1, 1, 0, 1, 1], [0, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [0, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1]], "solution": [[1, 1, 2, 1, 0, 1, 1], [0, 0, 1, 2, 1, 1, 0], [1, 1, 2, 2, 2, 1, 1], [1, 2, 1, 1, 1, 0, 1], [0, 1, 0, 0, 1, 1, 1], [1, 2, 1, 1, 2, 1, 0], [2, 3, 2, 2, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 1\n0 0 1\n", "answer": "0 1 2\n1 1 2\n0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 239, "matrix": [[0, 1, 1], [1, 1, 1], [0, 0, 1]], "solution": [[0, 1, 2], [1, 1, 2], [0, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n0 1 1\n0 1 1\n", "answer": "0 1 2\n0 1 2\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 240, "matrix": [[0, 1, 1], [0, 1, 1], [0, 1, 1]], "solution": [[0, 1, 2], [0, 1, 2], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n0 1 0\n1 1 1\n", "answer": "1 2 1\n0 1 0\n1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 241, "matrix": [[1, 1, 1], [0, 1, 0], [1, 1, 1]], "solution": [[1, 2, 1], [0, 1, 0], [1, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n0 1 1\n0 1 1\n", "answer": "0 1 0\n0 1 1\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 242, "matrix": [[0, 1, 0], [0, 1, 1], [0, 1, 1]], "solution": [[0, 1, 0], [0, 1, 1], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0\n1 0 0 1 1 1 1\n1 1 1 1 0 1 1\n1 0 0 1 1 1 1\n1 0 0 1 1 1 0\n1 0 1 0 1 1 0\n1 1 0 0 1 1 1\n", "answer": "2 1 1 2 2 1 0\n1 0 0 1 1 2 1\n2 1 1 1 0 1 2\n1 0 0 1 1 2 1\n1 0 0 1 2 1 0\n1 0 1 0 1 1 0\n2 1 0 0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 243, "matrix": [[1, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1]], "solution": [[2, 1, 1, 2, 2, 1, 0], [1, 0, 0, 1, 1, 2, 1], [2, 1, 1, 1, 0, 1, 2], [1, 0, 0, 1, 1, 2, 1], [1, 0, 0, 1, 2, 1, 0], [1, 0, 1, 0, 1, 1, 0], [2, 1, 0, 0, 1, 2, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 0 1 1 1\n0 1 0 1 0 1 0 1 0 1\n1 0 0 0 0 1 1 1 1 1\n1 1 1 1 1 0 1 0 1 0\n1 1 0 0 0 1 1 1 1 1\n1 1 0 0 1 1 1 0 0 0\n1 1 1 0 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 1 0\n1 0 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 0 1\n", "answer": "0 0 1 2 1 1 0 1 1 2\n0 1 0 1 0 1 0 1 0 1\n1 0 0 0 0 1 1 1 1 1\n2 1 1 1 1 0 1 0 1 0\n2 1 0 0 0 1 2 1 1 1\n2 1 0 0 1 2 1 0 0 0\n3 2 1 0 1 1 2 1 1 1\n2 1 2 1 1 0 1 1 1 0\n1 0 1 2 2 1 1 0 1 1\n2 1 2 3 3 2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 244, "matrix": [[0, 0, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 0, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1, 0], [1, 1, 0, 0, 0, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1]], "solution": [[0, 0, 1, 2, 1, 1, 0, 1, 1, 2], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 0, 0, 0, 1, 1, 1, 1, 1], [2, 1, 1, 1, 1, 0, 1, 0, 1, 0], [2, 1, 0, 0, 0, 1, 2, 1, 1, 1], [2, 1, 0, 0, 1, 2, 1, 0, 0, 0], [3, 2, 1, 0, 1, 1, 2, 1, 1, 1], [2, 1, 2, 1, 1, 0, 1, 1, 1, 0], [1, 0, 1, 2, 2, 1, 1, 0, 1, 1], [2, 1, 2, 3, 3, 2, 2, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 0 1\n0 0 1\n", "answer": "0 1 2\n1 0 1\n0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 245, "matrix": [[0, 1, 1], [1, 0, 1], [0, 0, 1]], "solution": [[0, 1, 2], [1, 0, 1], [0, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1 0\n1 1 1 1 1 1 1\n1 1 0 1 1 1 1\n1 0 1 1 1 0 0\n0 1 0 1 0 1 1\n1 1 1 1 1 1 1\n0 1 1 1 0 1 0\n", "answer": "1 0 1 0 1 1 0\n2 1 1 1 2 2 1\n2 1 0 1 2 1 1\n1 0 1 2 1 0 0\n0 1 0 1 0 1 1\n1 2 1 2 1 2 1\n0 1 2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 246, "matrix": [[1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 0]], "solution": [[1, 0, 1, 0, 1, 1, 0], [2, 1, 1, 1, 2, 2, 1], [2, 1, 0, 1, 2, 1, 1], [1, 0, 1, 2, 1, 0, 0], [0, 1, 0, 1, 0, 1, 1], [1, 2, 1, 2, 1, 2, 1], [0, 1, 2, 1, 0, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 0 1\n0 0 1 0 1 1 1\n1 1 0 0 1 1 0\n1 0 1 0 1 1 1\n0 1 1 1 1 0 0\n1 1 1 1 0 0 1\n1 1 1 1 0 1 1\n", "answer": "1 0 1 0 1 0 1\n0 0 1 0 1 1 1\n1 1 0 0 1 1 0\n1 0 1 0 1 1 1\n0 1 2 1 1 0 0\n1 2 2 1 0 0 1\n2 3 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 247, "matrix": [[1, 0, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 0], [1, 0, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1]], "solution": [[1, 0, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 0], [1, 0, 1, 0, 1, 1, 1], [0, 1, 2, 1, 1, 0, 0], [1, 2, 2, 1, 0, 0, 1], [2, 3, 2, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 1 1 1\n1 1 1 1 1 1 0 1\n1 1 1 1 1 0 1 1\n1 1 1 1 1 0 1 1\n1 1 1 1 1 0 1 1\n0 1 1 0 1 1 1 1\n1 1 1 1 0 0 1 1\n0 1 1 1 0 1 0 1\n", "answer": "1 0 0 1 2 2 1 2\n2 1 1 2 2 1 0 1\n3 2 2 2 1 0 1 2\n2 3 3 2 1 0 1 2\n1 2 2 1 1 0 1 2\n0 1 1 0 1 1 2 3\n1 2 2 1 0 0 1 2\n0 1 2 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 248, "matrix": [[1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1]], "solution": [[1, 0, 0, 1, 2, 2, 1, 2], [2, 1, 1, 2, 2, 1, 0, 1], [3, 2, 2, 2, 1, 0, 1, 2], [2, 3, 3, 2, 1, 0, 1, 2], [1, 2, 2, 1, 1, 0, 1, 2], [0, 1, 1, 0, 1, 1, 2, 3], [1, 2, 2, 1, 0, 0, 1, 2], [0, 1, 2, 1, 0, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1 0 1 0\n1 1 1 1 1 1 1 0 1 1\n1 1 1 0 1 1 0 1 1 1\n1 1 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 1 1\n1 0 1 1 1 0 0 1 0 0\n1 0 1 1 1 1 1 0 1 0\n0 1 1 0 1 1 1 1 1 1\n1 0 0 1 1 0 1 1 1 1\n1 1 1 1 1 1 1 1 0 1\n", "answer": "1 0 1 1 0 1 1 0 1 0\n2 1 2 1 1 2 1 0 1 1\n2 2 1 0 1 1 0 1 2 2\n1 2 2 1 2 2 1 2 2 2\n0 1 2 2 2 1 1 2 1 1\n1 0 1 2 1 0 0 1 0 0\n1 0 1 1 2 1 1 0 1 0\n0 1 1 0 1 1 2 1 2 1\n1 0 0 1 1 0 1 2 1 2\n2 1 1 2 2 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 249, "matrix": [[1, 0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1, 0, 1, 0], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1]], "solution": [[1, 0, 1, 1, 0, 1, 1, 0, 1, 0], [2, 1, 2, 1, 1, 2, 1, 0, 1, 1], [2, 2, 1, 0, 1, 1, 0, 1, 2, 2], [1, 2, 2, 1, 2, 2, 1, 2, 2, 2], [0, 1, 2, 2, 2, 1, 1, 2, 1, 1], [1, 0, 1, 2, 1, 0, 0, 1, 0, 0], [1, 0, 1, 1, 2, 1, 1, 0, 1, 0], [0, 1, 1, 0, 1, 1, 2, 1, 2, 1], [1, 0, 0, 1, 1, 0, 1, 2, 1, 2], [2, 1, 1, 2, 2, 1, 2, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1\n1 0 1 1 1\n1 1 1 0 1\n0 1 1 0 1\n1 1 1 1 0\n", "answer": "0 1 1 0 1\n1 0 1 1 2\n1 1 1 0 1\n0 1 1 0 1\n1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 250, "matrix": [[0, 1, 1, 0, 1], [1, 0, 1, 1, 1], [1, 1, 1, 0, 1], [0, 1, 1, 0, 1], [1, 1, 1, 1, 0]], "solution": [[0, 1, 1, 0, 1], [1, 0, 1, 1, 2], [1, 1, 1, 0, 1], [0, 1, 1, 0, 1], [1, 2, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 0 1 1 1 1\n1 1 0 1 1 1 0 1 1 1\n0 0 1 1 1 0 0 0 0 0\n0 1 1 1 1 0 1 0 1 1\n1 1 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 0 0 1 0\n1 1 1 1 1 1 1 1 1 0\n0 1 1 1 1 1 1 0 1 1\n1 0 1 1 0 0 0 1 0 1\n0 0 0 1 1 1 0 1 0 1\n", "answer": "0 1 1 1 0 0 1 2 2 2\n1 1 0 1 1 1 0 1 1 1\n0 0 1 2 1 0 0 0 0 0\n0 1 2 2 1 0 1 0 1 1\n1 2 3 3 2 1 1 1 1 0\n2 3 4 3 2 1 0 0 1 0\n1 2 3 3 2 2 1 1 1 0\n0 1 2 2 1 1 1 0 1 1\n1 0 1 1 0 0 0 1 0 1\n0 0 0 1 1 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 251, "matrix": [[0, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 0, 0, 1, 0, 1], [0, 0, 0, 1, 1, 1, 0, 1, 0, 1]], "solution": [[0, 1, 1, 1, 0, 0, 1, 2, 2, 2], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 2, 1, 0, 0, 0, 0, 0], [0, 1, 2, 2, 1, 0, 1, 0, 1, 1], [1, 2, 3, 3, 2, 1, 1, 1, 1, 0], [2, 3, 4, 3, 2, 1, 0, 0, 1, 0], [1, 2, 3, 3, 2, 2, 1, 1, 1, 0], [0, 1, 2, 2, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 0, 0, 1, 0, 1], [0, 0, 0, 1, 1, 1, 0, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1\n1 0 1 0 1\n1 1 1 0 1\n1 1 1 1 1\n1 0 1 0 1\n", "answer": "2 1 0 1 2\n1 0 1 0 1\n2 1 1 0 1\n2 1 2 1 2\n1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 252, "matrix": [[1, 1, 0, 1, 1], [1, 0, 1, 0, 1], [1, 1, 1, 0, 1], [1, 1, 1, 1, 1], [1, 0, 1, 0, 1]], "solution": [[2, 1, 0, 1, 2], [1, 0, 1, 0, 1], [2, 1, 1, 0, 1], [2, 1, 2, 1, 2], [1, 0, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 0 0 0\n1 0 0 1 1 1 1\n1 1 1 1 1 1 1\n0 0 1 1 1 1 0\n0 1 0 1 1 1 1\n1 1 1 1 1 1 1\n0 1 0 0 0 1 1\n", "answer": "1 0 1 0 0 0 0\n1 0 0 1 1 1 1\n1 1 1 2 2 2 1\n0 0 1 2 2 1 0\n0 1 0 1 2 2 1\n1 2 1 1 1 2 2\n0 1 0 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 253, "matrix": [[1, 0, 1, 0, 0, 0, 0], [1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 0, 1, 1]], "solution": [[1, 0, 1, 0, 0, 0, 0], [1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 2, 2, 2, 1], [0, 0, 1, 2, 2, 1, 0], [0, 1, 0, 1, 2, 2, 1], [1, 2, 1, 1, 1, 2, 2], [0, 1, 0, 0, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1\n1 1 0 1\n1 1 1 1\n1 1 1 1\n", "answer": "0 0 1 2\n1 1 0 1\n2 2 1 2\n3 3 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 254, "matrix": [[0, 0, 1, 1], [1, 1, 0, 1], [1, 1, 1, 1], [1, 1, 1, 1]], "solution": [[0, 0, 1, 2], [1, 1, 0, 1], [2, 2, 1, 2], [3, 3, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 0\n1 0 1 1 0 1 1 1\n1 1 1 1 1 1 0 1\n0 0 1 0 1 1 1 1\n0 1 0 1 1 0 1 1\n0 1 1 1 0 1 1 1\n1 1 1 1 0 1 1 0\n1 1 1 1 1 1 1 1\n", "answer": "2 1 2 2 1 1 0 0\n1 0 1 1 0 1 1 1\n1 1 2 1 1 1 0 1\n0 0 1 0 1 1 1 2\n0 1 0 1 1 0 1 2\n0 1 1 1 0 1 2 1\n1 2 2 1 0 1 1 0\n2 3 3 2 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 255, "matrix": [[1, 1, 1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 2, 2, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 2, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 1, 1, 2], [0, 1, 0, 1, 1, 0, 1, 2], [0, 1, 1, 1, 0, 1, 2, 1], [1, 2, 2, 1, 0, 1, 1, 0], [2, 3, 3, 2, 1, 2, 2, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 1 1 1 0\n1 1 1 1 0 1\n1 1 1 0 1 1\n1 0 0 1 1 1\n0 1 1 1 0 1\n", "answer": "5 4 4 3 2 1\n4 3 3 2 1 0\n3 2 2 1 0 1\n2 1 1 0 1 2\n1 0 0 1 1 2\n0 1 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 256, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 0, 1]], "solution": [[5, 4, 4, 3, 2, 1], [4, 3, 3, 2, 1, 0], [3, 2, 2, 1, 0, 1], [2, 1, 1, 0, 1, 2], [1, 0, 0, 1, 1, 2], [0, 1, 1, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 0\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0\n0 1 1 0 1 1 1 1\n1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 0\n1 1 1 1 1 1 0 1\n1 1 1 1 1 1 0 1\n", "answer": "3 3 2 1 0 1 1 0\n2 3 3 2 1 2 2 1\n1 2 2 1 2 2 1 0\n0 1 1 0 1 2 2 1\n1 0 1 1 2 3 2 1\n2 1 2 2 3 2 1 0\n3 2 3 3 2 1 0 1\n4 3 4 3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 257, "matrix": [[1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1]], "solution": [[3, 3, 2, 1, 0, 1, 1, 0], [2, 3, 3, 2, 1, 2, 2, 1], [1, 2, 2, 1, 2, 2, 1, 0], [0, 1, 1, 0, 1, 2, 2, 1], [1, 0, 1, 1, 2, 3, 2, 1], [2, 1, 2, 2, 3, 2, 1, 0], [3, 2, 3, 3, 2, 1, 0, 1], [4, 3, 4, 3, 2, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1\n1 1 0 0 1 1 1 1\n0 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 0\n0 1 1 1 1 0 1 0\n0 1 1 0 0 1 1 1\n0 1 1 1 1 1 0 1\n1 0 0 1 0 1 1 1\n", "answer": "2 2 1 1 2 3 4 3\n1 1 0 0 1 2 3 2\n0 1 1 1 2 2 2 1\n0 1 2 2 2 1 1 0\n0 1 2 1 1 0 1 0\n0 1 1 0 0 1 1 1\n0 1 1 1 1 1 0 1\n1 0 0 1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 258, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1, 0], [0, 1, 1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1], [1, 0, 0, 1, 0, 1, 1, 1]], "solution": [[2, 2, 1, 1, 2, 3, 4, 3], [1, 1, 0, 0, 1, 2, 3, 2], [0, 1, 1, 1, 2, 2, 2, 1], [0, 1, 2, 2, 2, 1, 1, 0], [0, 1, 2, 1, 1, 0, 1, 0], [0, 1, 1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1], [1, 0, 0, 1, 0, 1, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1 1\n0 1 0 1 1 1 1 1 1\n0 1 1 1 0 1 1 0 1\n1 0 1 1 0 0 1 1 1\n1 1 1 1 0 0 1 1 1\n1 1 1 0 0 1 1 1 1\n1 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 0\n1 1 0 1 1 1 0 0 1\n", "answer": "1 1 0 1 2 3 3 2 3\n0 1 0 1 1 2 2 1 2\n0 1 1 1 0 1 1 0 1\n1 0 1 1 0 0 1 1 2\n2 1 2 1 0 0 1 2 3\n2 1 1 0 0 1 2 3 2\n1 0 1 1 1 2 2 2 1\n2 1 1 2 2 2 1 1 0\n2 1 0 1 2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 259, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 0, 0, 1]], "solution": [[1, 1, 0, 1, 2, 3, 3, 2, 3], [0, 1, 0, 1, 1, 2, 2, 1, 2], [0, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1, 1, 2], [2, 1, 2, 1, 0, 0, 1, 2, 3], [2, 1, 1, 0, 0, 1, 2, 3, 2], [1, 0, 1, 1, 1, 2, 2, 2, 1], [2, 1, 1, 2, 2, 2, 1, 1, 0], [2, 1, 0, 1, 2, 1, 0, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1 0\n1 1 1 1 1 1 1 0 1\n1 1 0 1 1 1 0 0 1\n0 1 0 0 1 0 1 0 1\n1 0 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n0 1 1 0 1 1 1 0 1\n1 0 0 1 1 1 1 1 1\n1 0 0 0 1 0 1 1 1\n", "answer": "3 3 2 2 1 0 1 1 0\n2 2 1 2 2 1 1 0 1\n1 1 0 1 2 1 0 0 1\n0 1 0 0 1 0 1 0 1\n1 0 1 0 1 1 2 1 2\n1 1 2 1 2 2 2 1 2\n0 1 1 0 1 2 1 0 1\n1 0 0 1 2 1 2 1 2\n1 0 0 0 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 260, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 0, 0, 1], [0, 1, 0, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 1, 0, 1, 1, 1]], "solution": [[3, 3, 2, 2, 1, 0, 1, 1, 0], [2, 2, 1, 2, 2, 1, 1, 0, 1], [1, 1, 0, 1, 2, 1, 0, 0, 1], [0, 1, 0, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 1, 2, 1, 2], [1, 1, 2, 1, 2, 2, 2, 1, 2], [0, 1, 1, 0, 1, 2, 1, 0, 1], [1, 0, 0, 1, 2, 1, 2, 1, 2], [1, 0, 0, 0, 1, 0, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1\n0 1 1\n1 0 1\n", "answer": "0 0 1\n0 1 2\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 261, "matrix": [[0, 0, 1], [0, 1, 1], [1, 0, 1]], "solution": [[0, 0, 1], [0, 1, 2], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1\n1 0 0 0 1\n1 0 1 1 0\n1 1 1 0 1\n1 1 1 1 1\n", "answer": "0 0 1 1 2\n1 0 0 0 1\n1 0 1 1 0\n2 1 1 0 1\n3 2 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 262, "matrix": [[0, 0, 1, 1, 1], [1, 0, 0, 0, 1], [1, 0, 1, 1, 0], [1, 1, 1, 0, 1], [1, 1, 1, 1, 1]], "solution": [[0, 0, 1, 1, 2], [1, 0, 0, 0, 1], [1, 0, 1, 1, 0], [2, 1, 1, 0, 1], [3, 2, 2, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0 0\n1 1 1 0 1\n1 1 0 0 1\n1 1 1 1 0\n1 1 1 0 1\n", "answer": "0 1 0 0 0\n1 2 1 0 1\n2 1 0 0 1\n3 2 1 1 0\n3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 263, "matrix": [[0, 1, 0, 0, 0], [1, 1, 1, 0, 1], [1, 1, 0, 0, 1], [1, 1, 1, 1, 0], [1, 1, 1, 0, 1]], "solution": [[0, 1, 0, 0, 0], [1, 2, 1, 0, 1], [2, 1, 0, 0, 1], [3, 2, 1, 1, 0], [3, 2, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 1\n1 1 1 1 0 1 0 1 1\n1 1 1 1 1 0 1 1 1\n1 1 1 1 0 1 0 1 0\n1 1 1 1 0 1 1 1 1\n1 1 1 1 0 1 1 1 1\n1 1 1 1 0 1 1 1 0\n1 1 0 1 0 0 1 1 0\n", "answer": "1 0 1 2 2 1 2 3 4\n2 1 2 2 1 0 1 2 3\n3 2 2 1 0 1 0 1 2\n4 3 3 2 1 0 1 2 1\n4 3 2 1 0 1 0 1 0\n4 3 2 1 0 1 1 2 1\n4 3 2 1 0 1 2 2 1\n3 2 1 1 0 1 2 1 0\n2 1 0 1 0 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 264, "matrix": [[1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 1, 0, 0, 1, 1, 0]], "solution": [[1, 0, 1, 2, 2, 1, 2, 3, 4], [2, 1, 2, 2, 1, 0, 1, 2, 3], [3, 2, 2, 1, 0, 1, 0, 1, 2], [4, 3, 3, 2, 1, 0, 1, 2, 1], [4, 3, 2, 1, 0, 1, 0, 1, 0], [4, 3, 2, 1, 0, 1, 1, 2, 1], [4, 3, 2, 1, 0, 1, 2, 2, 1], [3, 2, 1, 1, 0, 1, 2, 1, 0], [2, 1, 0, 1, 0, 0, 1, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0\n1 1 1 1 0 0 0\n1 1 0 1 0 1 1\n1 0 1 1 1 1 1\n1 0 0 1 1 1 0\n1 0 1 0 1 1 0\n1 1 1 1 1 0 0\n", "answer": "4 3 2 1 0 1 0\n3 2 1 1 0 0 0\n2 1 0 1 0 1 1\n1 0 1 2 1 2 1\n1 0 0 1 2 1 0\n1 0 1 0 1 1 0\n2 1 2 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 265, "matrix": [[1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 0]], "solution": [[4, 3, 2, 1, 0, 1, 0], [3, 2, 1, 1, 0, 0, 0], [2, 1, 0, 1, 0, 1, 1], [1, 0, 1, 2, 1, 2, 1], [1, 0, 0, 1, 2, 1, 0], [1, 0, 1, 0, 1, 1, 0], [2, 1, 2, 1, 1, 0, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1\n0 0 1 0 1\n0 0 1 1 1\n1 1 1 1 1\n1 1 1 0 1\n", "answer": "1 0 0 1 2\n0 0 1 0 1\n0 0 1 1 2\n1 1 2 1 2\n2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 266, "matrix": [[1, 0, 0, 1, 1], [0, 0, 1, 0, 1], [0, 0, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 0, 1]], "solution": [[1, 0, 0, 1, 2], [0, 0, 1, 0, 1], [0, 0, 1, 1, 2], [1, 1, 2, 1, 2], [2, 2, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0\n1 1 0 0\n1 0 1 1\n1 0 1 0\n", "answer": "1 0 1 0\n2 1 0 0\n1 0 1 1\n1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 267, "matrix": [[1, 0, 1, 0], [1, 1, 0, 0], [1, 0, 1, 1], [1, 0, 1, 0]], "solution": [[1, 0, 1, 0], [2, 1, 0, 0], [1, 0, 1, 1], [1, 0, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0\n1 1 1 0\n1 0 1 1\n1 1 0 1\n", "answer": "2 1 0 0\n2 1 1 0\n1 0 1 1\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 268, "matrix": [[1, 1, 0, 0], [1, 1, 1, 0], [1, 0, 1, 1], [1, 1, 0, 1]], "solution": [[2, 1, 0, 0], [2, 1, 1, 0], [1, 0, 1, 1], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0\n1 1 0 0 1 1 1\n1 1 0 1 1 0 1\n1 0 1 1 1 1 1\n1 1 0 1 1 1 1\n0 1 1 0 0 1 1\n1 1 1 1 0 1 1\n", "answer": "3 2 1 1 2 1 0\n2 1 0 0 1 1 1\n2 1 0 1 1 0 1\n1 0 1 2 2 1 2\n1 1 0 1 1 2 3\n0 1 1 0 0 1 2\n1 2 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 269, "matrix": [[1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1]], "solution": [[3, 2, 1, 1, 2, 1, 0], [2, 1, 0, 0, 1, 1, 1], [2, 1, 0, 1, 1, 0, 1], [1, 0, 1, 2, 2, 1, 2], [1, 1, 0, 1, 1, 2, 3], [0, 1, 1, 0, 0, 1, 2], [1, 2, 2, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1\n1 1 0 0 1\n0 0 0 1 1\n0 1 1 1 0\n1 1 1 1 0\n", "answer": "2 2 1 0 1\n1 1 0 0 1\n0 0 0 1 1\n0 1 1 1 0\n1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 270, "matrix": [[1, 1, 1, 0, 1], [1, 1, 0, 0, 1], [0, 0, 0, 1, 1], [0, 1, 1, 1, 0], [1, 1, 1, 1, 0]], "solution": [[2, 2, 1, 0, 1], [1, 1, 0, 0, 1], [0, 0, 0, 1, 1], [0, 1, 1, 1, 0], [1, 2, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1\n1 1 1 1 1\n1 1 1 0 1\n0 0 0 0 1\n1 1 1 0 0\n", "answer": "0 1 0 1 2\n1 2 1 1 2\n1 1 1 0 1\n0 0 0 0 1\n1 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 271, "matrix": [[0, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 0, 1], [0, 0, 0, 0, 1], [1, 1, 1, 0, 0]], "solution": [[0, 1, 0, 1, 2], [1, 2, 1, 1, 2], [1, 1, 1, 0, 1], [0, 0, 0, 0, 1], [1, 1, 1, 0, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 0 1 1\n1 0 0 1 1 1\n0 1 1 0 1 0\n1 1 1 1 1 0\n", "answer": "4 3 3 2 3 4\n3 2 2 1 2 3\n2 1 1 0 1 2\n1 0 0 1 2 1\n0 1 1 0 1 0\n1 2 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 272, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1], [0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 0]], "solution": [[4, 3, 3, 2, 3, 4], [3, 2, 2, 1, 2, 3], [2, 1, 1, 0, 1, 2], [1, 0, 0, 1, 2, 1], [0, 1, 1, 0, 1, 0], [1, 2, 2, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 1 1 1\n1 0 1 1 0 1 0 1 1\n1 1 1 1 0 0 1 1 1\n1 1 1 0 1 1 0 1 1\n0 0 1 0 0 1 1 1 1\n1 1 1 0 1 1 1 1 1\n0 1 1 0 0 0 1 0 0\n0 1 1 0 1 1 1 1 1\n1 1 1 1 0 1 1 1 1\n", "answer": "2 1 2 1 0 0 1 2 3\n1 0 1 1 0 1 0 1 2\n2 1 2 1 0 0 1 2 3\n1 1 1 0 1 1 0 1 2\n0 0 1 0 0 1 1 2 2\n1 1 1 0 1 1 2 1 1\n0 1 1 0 0 0 1 0 0\n0 1 1 0 1 1 2 1 1\n1 2 2 1 0 1 2 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 273, "matrix": [[1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1], [0, 0, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 0, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1]], "solution": [[2, 1, 2, 1, 0, 0, 1, 2, 3], [1, 0, 1, 1, 0, 1, 0, 1, 2], [2, 1, 2, 1, 0, 0, 1, 2, 3], [1, 1, 1, 0, 1, 1, 0, 1, 2], [0, 0, 1, 0, 0, 1, 1, 2, 2], [1, 1, 1, 0, 1, 1, 2, 1, 1], [0, 1, 1, 0, 0, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1, 2, 1, 1], [1, 2, 2, 1, 0, 1, 2, 2, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n0 1 1\n1 1 0\n", "answer": "1 1 0\n0 1 1\n1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 274, "matrix": [[1, 1, 0], [0, 1, 1], [1, 1, 0]], "solution": [[1, 1, 0], [0, 1, 1], [1, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 0 1 1 1\n1 1 1 0 0 0 0 1 1 1\n1 0 1 1 1 1 1 0 1 0\n0 1 1 0 1 1 1 1 0 1\n0 1 1 1 0 1 1 1 1 1\n1 0 1 1 1 0 1 1 1 1\n1 1 1 0 1 0 1 1 1 0\n0 1 1 1 1 1 1 1 1 0\n1 0 1 1 1 1 1 0 1 1\n1 0 1 0 1 1 0 1 1 1\n", "answer": "2 1 0 0 1 1 0 1 2 2\n2 1 1 0 0 0 0 1 2 1\n1 0 1 1 1 1 1 0 1 0\n0 1 1 0 1 2 2 1 0 1\n0 1 2 1 0 1 2 2 1 2\n1 0 1 1 1 0 1 2 2 1\n1 1 1 0 1 0 1 2 1 0\n0 1 2 1 2 1 2 1 1 0\n1 0 1 1 2 2 1 0 1 1\n1 0 1 0 1 1 0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 275, "matrix": [[1, 1, 0, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1, 0], [0, 1, 1, 0, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 0, 1, 1, 1]], "solution": [[2, 1, 0, 0, 1, 1, 0, 1, 2, 2], [2, 1, 1, 0, 0, 0, 0, 1, 2, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1, 0], [0, 1, 1, 0, 1, 2, 2, 1, 0, 1], [0, 1, 2, 1, 0, 1, 2, 2, 1, 2], [1, 0, 1, 1, 1, 0, 1, 2, 2, 1], [1, 1, 1, 0, 1, 0, 1, 2, 1, 0], [0, 1, 2, 1, 2, 1, 2, 1, 1, 0], [1, 0, 1, 1, 2, 2, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 0, 1, 2, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 0 1\n1 1 0\n", "answer": "2 1 2\n1 0 1\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 276, "matrix": [[1, 1, 1], [1, 0, 1], [1, 1, 0]], "solution": [[2, 1, 2], [1, 0, 1], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0\n1 1 1 1 1\n1 1 1 1 1\n0 1 1 1 1\n1 1 1 0 1\n", "answer": "0 1 1 0 0\n1 2 2 1 1\n1 2 3 2 2\n0 1 2 1 2\n1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 277, "matrix": [[0, 1, 1, 0, 0], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 1, 0, 1]], "solution": [[0, 1, 1, 0, 0], [1, 2, 2, 1, 1], [1, 2, 3, 2, 2], [0, 1, 2, 1, 2], [1, 2, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1 0\n1 1 1 1 1 1 0 1 1 1\n1 1 1 0 1 0 1 1 1 1\n1 1 1 1 0 1 1 0 1 1\n1 1 0 1 1 0 1 1 1 1\n1 1 1 0 0 1 0 1 1 0\n1 0 0 1 0 1 0 1 1 0\n1 1 1 1 0 1 0 1 1 1\n1 1 1 1 1 1 1 0 1 1\n", "answer": "2 1 0 1 2 2 1 2 2 1\n3 2 1 2 2 1 0 1 1 0\n4 3 2 1 2 1 0 1 2 1\n3 2 1 0 1 0 1 1 2 2\n3 2 1 1 0 1 1 0 1 2\n2 1 0 1 1 0 1 1 2 1\n2 1 1 0 0 1 0 1 1 0\n1 0 0 1 0 1 0 1 1 0\n2 1 1 1 0 1 0 1 2 1\n3 2 2 2 1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 278, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 0, 1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[2, 1, 0, 1, 2, 2, 1, 2, 2, 1], [3, 2, 1, 2, 2, 1, 0, 1, 1, 0], [4, 3, 2, 1, 2, 1, 0, 1, 2, 1], [3, 2, 1, 0, 1, 0, 1, 1, 2, 2], [3, 2, 1, 1, 0, 1, 1, 0, 1, 2], [2, 1, 0, 1, 1, 0, 1, 1, 2, 1], [2, 1, 1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 0, 1, 0, 1, 0, 1, 1, 0], [2, 1, 1, 1, 0, 1, 0, 1, 2, 1], [3, 2, 2, 2, 1, 2, 1, 0, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1\n0 1 1 0 0 1 0\n1 1 1 1 1 1 0\n0 1 1 1 1 1 1\n1 0 1 0 1 1 1\n1 1 1 1 1 0 1\n1 0 1 0 1 1 1\n", "answer": "1 2 2 1 1 0 1\n0 1 1 0 0 1 0\n1 2 2 1 1 1 0\n0 1 2 1 2 2 1\n1 0 1 0 1 1 2\n2 1 2 1 1 0 1\n1 0 1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 279, "matrix": [[1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1]], "solution": [[1, 2, 2, 1, 1, 0, 1], [0, 1, 1, 0, 0, 1, 0], [1, 2, 2, 1, 1, 1, 0], [0, 1, 2, 1, 2, 2, 1], [1, 0, 1, 0, 1, 1, 2], [2, 1, 2, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1\n0 1 1 1 0 1 0 1 1\n0 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 0\n1 1 1 0 0 0 0 1 1\n1 1 1 0 0 0 1 1 0\n1 0 1 1 1 1 1 1 1\n0 0 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 1\n", "answer": "1 2 3 2 1 2 1 2 3\n0 1 2 1 0 1 0 1 2\n0 1 2 2 1 1 1 2 1\n1 2 2 1 1 0 1 1 0\n2 2 1 0 0 0 0 1 1\n2 1 1 0 0 0 1 1 0\n1 0 1 1 1 1 2 2 1\n0 0 1 2 2 2 3 3 2\n1 1 0 1 2 3 4 4 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 280, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0, 0, 1, 1], [1, 1, 1, 0, 0, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1]], "solution": [[1, 2, 3, 2, 1, 2, 1, 2, 3], [0, 1, 2, 1, 0, 1, 0, 1, 2], [0, 1, 2, 2, 1, 1, 1, 2, 1], [1, 2, 2, 1, 1, 0, 1, 1, 0], [2, 2, 1, 0, 0, 0, 0, 1, 1], [2, 1, 1, 0, 0, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1, 2, 2, 1], [0, 0, 1, 2, 2, 2, 3, 3, 2], [1, 1, 0, 1, 2, 3, 4, 4, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n0 1 1 1\n1 1 0 0\n1 1 0 1\n", "answer": "1 0 1 2\n0 1 1 1\n1 1 0 0\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 281, "matrix": [[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 0, 0], [1, 1, 0, 1]], "solution": [[1, 0, 1, 2], [0, 1, 1, 1], [1, 1, 0, 0], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0\n1 1 1 1 0\n1 1 1 1 1\n1 1 0 0 1\n1 0 1 0 1\n", "answer": "1 0 1 1 0\n2 1 2 1 0\n3 2 1 1 1\n2 1 0 0 1\n1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 282, "matrix": [[1, 0, 1, 1, 0], [1, 1, 1, 1, 0], [1, 1, 1, 1, 1], [1, 1, 0, 0, 1], [1, 0, 1, 0, 1]], "solution": [[1, 0, 1, 1, 0], [2, 1, 2, 1, 0], [3, 2, 1, 1, 1], [2, 1, 0, 0, 1], [1, 0, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1\n1 1 1 1 1\n1 0 0 1 0\n0 0 1 1 0\n1 0 0 1 1\n", "answer": "0 1 0 1 2\n1 1 1 2 1\n1 0 0 1 0\n0 0 1 1 0\n1 0 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 283, "matrix": [[0, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 0, 0, 1, 0], [0, 0, 1, 1, 0], [1, 0, 0, 1, 1]], "solution": [[0, 1, 0, 1, 2], [1, 1, 1, 2, 1], [1, 0, 0, 1, 0], [0, 0, 1, 1, 0], [1, 0, 0, 1, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n0 0 0 0\n0 0 1 1\n0 1 1 1\n", "answer": "1 0 1 1\n0 0 0 0\n0 0 1 1\n0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 284, "matrix": [[1, 0, 1, 1], [0, 0, 0, 0], [0, 0, 1, 1], [0, 1, 1, 1]], "solution": [[1, 0, 1, 1], [0, 0, 0, 0], [0, 0, 1, 1], [0, 1, 2, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 0 1\n1 1 1\n", "answer": "0 1 0\n1 0 1\n2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 285, "matrix": [[0, 1, 0], [1, 0, 1], [1, 1, 1]], "solution": [[0, 1, 0], [1, 0, 1], [2, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 1\n1 0 1 0 1 0 0 1\n0 0 1 0 1 1 1 1\n0 1 1 1 1 0 1 1\n0 1 1 1 1 0 1 0\n1 0 0 0 1 1 1 1\n1 1 1 0 0 1 1 1\n0 1 1 1 1 1 1 0\n", "answer": "1 0 1 1 2 1 1 2\n1 0 1 0 1 0 0 1\n0 0 1 0 1 1 1 2\n0 1 2 1 1 0 1 1\n0 1 1 1 1 0 1 0\n1 0 0 0 1 1 2 1\n1 1 1 0 0 1 2 1\n0 1 2 1 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 286, "matrix": [[1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 0, 1], [0, 0, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1, 0], [1, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0]], "solution": [[1, 0, 1, 1, 2, 1, 1, 2], [1, 0, 1, 0, 1, 0, 0, 1], [0, 0, 1, 0, 1, 1, 1, 2], [0, 1, 2, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1, 0], [1, 0, 0, 0, 1, 1, 2, 1], [1, 1, 1, 0, 0, 1, 2, 1], [0, 1, 2, 1, 1, 2, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 0 1 1 0\n1 0 1 1 1 0 1 1 1 1\n1 1 0 0 1 1 0 1 1 1\n0 1 0 1 1 1 1 0 0 0\n0 0 1 1 1 0 1 1 0 1\n1 1 0 0 0 1 0 1 0 1\n1 1 0 1 0 1 0 1 1 0\n1 0 0 1 1 1 1 0 1 1\n1 1 1 1 1 1 0 1 0 1\n1 1 0 0 0 1 0 1 1 1\n", "answer": "0 1 2 2 2 1 0 1 1 0\n1 0 1 1 1 0 1 2 2 1\n1 1 0 0 1 1 0 1 1 1\n0 1 0 1 2 1 1 0 0 0\n0 0 1 1 1 0 1 1 0 1\n1 1 0 0 0 1 0 1 0 1\n2 1 0 1 0 1 0 1 1 0\n1 0 0 1 1 2 1 0 1 1\n2 1 1 1 1 1 0 1 0 1\n2 1 0 0 0 1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 287, "matrix": [[0, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 0, 0, 0], [0, 0, 1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 0, 0, 1, 0, 1, 0, 1], [1, 1, 0, 1, 0, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 0, 0, 0, 1, 0, 1, 1, 1]], "solution": [[0, 1, 2, 2, 2, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1, 2, 2, 1], [1, 1, 0, 0, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 2, 1, 1, 0, 0, 0], [0, 0, 1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 0, 0, 1, 0, 1, 0, 1], [2, 1, 0, 1, 0, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 2, 1, 0, 1, 1], [2, 1, 1, 1, 1, 1, 0, 1, 0, 1], [2, 1, 0, 0, 0, 1, 0, 1, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0\n1 1 1 1\n0 1 0 1\n1 0 1 1\n", "answer": "1 0 0 0\n1 1 1 1\n0 1 0 1\n1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 288, "matrix": [[1, 0, 0, 0], [1, 1, 1, 1], [0, 1, 0, 1], [1, 0, 1, 1]], "solution": [[1, 0, 0, 0], [1, 1, 1, 1], [0, 1, 0, 1], [1, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 0 0\n1 1 1 1 1 0 1 1\n1 1 1 1 0 1 1 1\n1 1 1 1 0 1 1 1\n1 1 1 1 1 1 0 1\n1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 0\n1 1 1 0 0 0 1 0\n", "answer": "2 1 0 1 0 1 0 0\n3 2 1 2 1 0 1 1\n4 3 2 1 0 1 2 2\n4 3 2 1 0 1 1 2\n5 4 3 2 1 1 0 1\n5 4 3 2 1 2 1 1\n4 3 2 1 0 1 1 0\n3 2 1 0 0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 289, "matrix": [[1, 1, 0, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0, 1, 0]], "solution": [[2, 1, 0, 1, 0, 1, 0, 0], [3, 2, 1, 2, 1, 0, 1, 1], [4, 3, 2, 1, 0, 1, 2, 2], [4, 3, 2, 1, 0, 1, 1, 2], [5, 4, 3, 2, 1, 1, 0, 1], [5, 4, 3, 2, 1, 2, 1, 1], [4, 3, 2, 1, 0, 1, 1, 0], [3, 2, 1, 0, 0, 0, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0\n1 1 0 1 0 0\n1 1 1 0 1 1\n0 0 1 1 1 1\n0 1 1 0 1 1\n1 1 1 1 1 1\n", "answer": "2 1 0 1 1 0\n2 1 0 1 0 0\n1 1 1 0 1 1\n0 0 1 1 2 2\n0 1 1 0 1 2\n1 2 2 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 290, "matrix": [[1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 0, 0], [1, 1, 1, 0, 1, 1], [0, 0, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 1, 0], [2, 1, 0, 1, 0, 0], [1, 1, 1, 0, 1, 1], [0, 0, 1, 1, 2, 2], [0, 1, 1, 0, 1, 2], [1, 2, 2, 1, 2, 3]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 0 1 1\n1 1 1 1 0 1 1 0\n1 1 1 1 1 0 0 0\n1 0 1 1 0 1 1 1\n1 1 1 1 1 1 0 1\n0 1 1 1 1 1 1 1\n1 0 0 1 0 1 1 0\n1 1 1 0 1 1 1 1\n", "answer": "0 1 1 0 1 0 1 1\n1 2 2 1 0 1 1 0\n2 1 2 2 1 0 0 0\n1 0 1 1 0 1 1 1\n1 1 2 2 1 1 0 1\n0 1 1 2 1 2 1 1\n1 0 0 1 0 1 1 0\n2 1 1 0 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 291, "matrix": [[0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1]], "solution": [[0, 1, 1, 0, 1, 0, 1, 1], [1, 2, 2, 1, 0, 1, 1, 0], [2, 1, 2, 2, 1, 0, 0, 0], [1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 2, 2, 1, 1, 0, 1], [0, 1, 1, 2, 1, 2, 1, 1], [1, 0, 0, 1, 0, 1, 1, 0], [2, 1, 1, 0, 1, 2, 2, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0\n1 1 0 1 1 0\n1 1 1 1 0 1\n1 1 0 1 0 1\n0 1 1 1 1 0\n1 1 0 1 1 0\n", "answer": "2 1 0 1 1 0\n2 1 0 1 1 0\n2 2 1 1 0 1\n1 1 0 1 0 1\n0 1 1 2 1 0\n1 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 292, "matrix": [[1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 0]], "solution": [[2, 1, 0, 1, 1, 0], [2, 1, 0, 1, 1, 0], [2, 2, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1], [0, 1, 1, 2, 1, 0], [1, 1, 0, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 0\n1 1 1 1 1\n1 1 1 1 1\n1 0 1 1 1\n0 0 1 0 1\n", "answer": "3 2 1 0 0\n3 2 2 1 1\n2 1 2 2 2\n1 0 1 1 2\n0 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 293, "matrix": [[1, 1, 1, 0, 0], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 0, 1, 1, 1], [0, 0, 1, 0, 1]], "solution": [[3, 2, 1, 0, 0], [3, 2, 2, 1, 1], [2, 1, 2, 2, 2], [1, 0, 1, 1, 2], [0, 0, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n0 1 1\n1 0 0\n", "answer": "1 2 2\n0 1 1\n1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 294, "matrix": [[1, 1, 1], [0, 1, 1], [1, 0, 0]], "solution": [[1, 2, 2], [0, 1, 1], [1, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0 1 0\n1 1 0 0 1 0\n0 1 1 1 1 1\n1 1 1 0 1 1\n0 1 0 1 1 1\n1 1 1 0 1 1\n", "answer": "1 0 0 0 1 0\n1 1 0 0 1 0\n0 1 1 1 2 1\n1 2 1 0 1 2\n0 1 0 1 2 3\n1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 295, "matrix": [[1, 0, 0, 0, 1, 0], [1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1]], "solution": [[1, 0, 0, 0, 1, 0], [1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 2, 1], [1, 2, 1, 0, 1, 2], [0, 1, 0, 1, 2, 3], [1, 2, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1\n0 1 0 0\n0 0 1 1\n0 1 1 1\n", "answer": "0 1 1 1\n0 1 0 0\n0 0 1 1\n0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 296, "matrix": [[0, 1, 1, 1], [0, 1, 0, 0], [0, 0, 1, 1], [0, 1, 1, 1]], "solution": [[0, 1, 1, 1], [0, 1, 0, 0], [0, 0, 1, 1], [0, 1, 2, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 0\n1 1 0 1 1\n1 1 0 1 1\n1 1 1 1 1\n1 1 0 0 1\n", "answer": "1 0 0 1 0\n2 1 0 1 1\n2 1 0 1 2\n3 2 1 1 2\n2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 297, "matrix": [[1, 0, 0, 1, 0], [1, 1, 0, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 1, 0, 0, 1]], "solution": [[1, 0, 0, 1, 0], [2, 1, 0, 1, 1], [2, 1, 0, 1, 2], [3, 2, 1, 1, 2], [2, 1, 0, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 0 0 1 1\n0 1 1 1 1 0 1 0 0\n0 1 1 1 0 1 1 1 1\n1 0 1 0 0 0 1 0 1\n1 1 1 1 1 0 0 0 1\n1 0 0 0 1 1 0 1 1\n1 1 0 1 1 1 0 1 1\n1 0 1 1 1 0 1 1 0\n1 0 0 0 0 1 1 0 1\n", "answer": "1 0 1 2 1 0 0 1 1\n0 1 2 2 1 0 1 0 0\n0 1 2 1 0 1 2 1 1\n1 0 1 0 0 0 1 0 1\n2 1 1 1 1 0 0 0 1\n1 0 0 0 1 1 0 1 2\n2 1 0 1 2 1 0 1 1\n1 0 1 1 1 0 1 1 0\n1 0 0 0 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 298, "matrix": [[1, 0, 1, 1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1, 0, 0], [0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 0, 0, 1], [1, 0, 0, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 0], [1, 0, 0, 0, 0, 1, 1, 0, 1]], "solution": [[1, 0, 1, 2, 1, 0, 0, 1, 1], [0, 1, 2, 2, 1, 0, 1, 0, 0], [0, 1, 2, 1, 0, 1, 2, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 1], [2, 1, 1, 1, 1, 0, 0, 0, 1], [1, 0, 0, 0, 1, 1, 0, 1, 2], [2, 1, 0, 1, 2, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 0], [1, 0, 0, 0, 0, 1, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 0\n1 0 1 1 0 1 1\n1 1 1 1 0 0 1\n1 0 1 1 1 1 1\n1 1 0 0 0 1 0\n1 1 0 1 1 1 1\n1 1 1 1 1 1 1\n", "answer": "0 1 2 2 1 1 0\n1 0 1 1 0 1 1\n2 1 2 1 0 0 1\n1 0 1 1 1 1 1\n2 1 0 0 0 1 0\n2 1 0 1 1 2 1\n3 2 1 2 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 299, "matrix": [[0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0], [1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 2, 2, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1], [2, 1, 2, 1, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1], [2, 1, 0, 0, 0, 1, 0], [2, 1, 0, 1, 1, 2, 1], [3, 2, 1, 2, 2, 3, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1\n1 0 0 1\n1 1 0 1\n0 1 1 0\n", "answer": "0 1 1 2\n1 0 0 1\n1 1 0 1\n0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 300, "matrix": [[0, 1, 1, 1], [1, 0, 0, 1], [1, 1, 0, 1], [0, 1, 1, 0]], "solution": [[0, 1, 1, 2], [1, 0, 0, 1], [1, 1, 0, 1], [0, 1, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1\n1 1 0 1 0 1\n1 0 0 1 0 0\n1 0 1 0 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n", "answer": "1 0 1 2 1 2\n2 1 0 1 0 1\n1 0 0 1 0 0\n1 0 1 0 1 1\n2 1 2 1 2 2\n3 2 3 2 3 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 301, "matrix": [[1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1], [1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 2, 1, 2], [2, 1, 0, 1, 0, 1], [1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 1, 1], [2, 1, 2, 1, 2, 2], [3, 2, 3, 2, 3, 3]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 0 0 1\n0 0 1 0 1 1 1 1 1\n1 1 0 1 1 1 0 1 1\n1 1 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n1 0 1 1 1 0 1 1 1\n1 1 1 0 0 1 1 1 1\n1 1 0 1 1 1 0 1 1\n1 1 1 1 1 1 0 1 1\n", "answer": "1 0 1 1 2 1 0 0 1\n0 0 1 0 1 2 1 1 2\n1 1 0 1 2 1 0 1 2\n2 2 1 0 1 2 1 2 3\n2 1 2 1 2 1 2 3 4\n1 0 1 1 1 0 1 2 3\n2 1 1 0 0 1 1 2 3\n2 1 0 1 1 1 0 1 2\n3 2 1 2 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 302, "matrix": [[1, 0, 1, 1, 1, 1, 0, 0, 1], [0, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[1, 0, 1, 1, 2, 1, 0, 0, 1], [0, 0, 1, 0, 1, 2, 1, 1, 2], [1, 1, 0, 1, 2, 1, 0, 1, 2], [2, 2, 1, 0, 1, 2, 1, 2, 3], [2, 1, 2, 1, 2, 1, 2, 3, 4], [1, 0, 1, 1, 1, 0, 1, 2, 3], [2, 1, 1, 0, 0, 1, 1, 2, 3], [2, 1, 0, 1, 1, 1, 0, 1, 2], [3, 2, 1, 2, 2, 1, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1\n1 1 0 1 1 1 1\n1 1 0 1 0 1 1\n1 1 1 1 1 0 1\n1 1 1 1 1 1 1\n1 0 1 0 1 0 1\n1 1 0 1 1 1 1\n", "answer": "1 0 1 2 2 3 4\n2 1 0 1 1 2 3\n2 1 0 1 0 1 2\n3 2 1 2 1 0 1\n2 1 2 1 2 1 2\n1 0 1 0 1 0 1\n2 1 0 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 303, "matrix": [[1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1]], "solution": [[1, 0, 1, 2, 2, 3, 4], [2, 1, 0, 1, 1, 2, 3], [2, 1, 0, 1, 0, 1, 2], [3, 2, 1, 2, 1, 0, 1], [2, 1, 2, 1, 2, 1, 2], [1, 0, 1, 0, 1, 0, 1], [2, 1, 0, 1, 2, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 0 1 1 0 1\n1 0 1 1 0 0\n1 1 1 1 0 1\n1 1 1 1 1 1\n1 0 1 1 1 0\n", "answer": "2 1 2 2 1 2\n1 0 1 1 0 1\n1 0 1 1 0 0\n2 1 2 1 0 1\n2 1 2 2 1 1\n1 0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 304, "matrix": [[1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0]], "solution": [[2, 1, 2, 2, 1, 2], [1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0], [2, 1, 2, 1, 0, 1], [2, 1, 2, 2, 1, 1], [1, 0, 1, 2, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1\n0 0 1 0 1 1 1 0\n1 1 1 1 0 0 1 1\n1 0 1 0 1 1 1 1\n1 1 0 0 0 1 0 1\n1 1 0 1 1 0 1 1\n1 1 0 1 0 1 1 0\n", "answer": "0 1 2 2 3 2 1 0\n1 1 2 1 2 2 2 1\n0 0 1 0 1 1 1 0\n1 1 2 1 0 0 1 1\n1 0 1 0 1 1 1 2\n2 1 0 0 0 1 0 1\n2 1 0 1 1 0 1 1\n2 1 0 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 305, "matrix": [[0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0]], "solution": [[0, 1, 2, 2, 3, 2, 1, 0], [1, 1, 2, 1, 2, 2, 2, 1], [0, 0, 1, 0, 1, 1, 1, 0], [1, 1, 2, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 2], [2, 1, 0, 0, 0, 1, 0, 1], [2, 1, 0, 1, 1, 0, 1, 1], [2, 1, 0, 1, 0, 1, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 0 1\n1 0 1 0 1 1 1 1\n0 1 0 1 0 1 0 1\n0 1 1 1 1 1 1 1\n1 0 1 1 0 0 1 1\n1 1 1 0 1 1 1 1\n1 1 0 1 1 1 1 1\n1 0 0 1 0 0 1 1\n", "answer": "2 1 0 1 2 1 0 1\n1 0 1 0 1 2 1 2\n0 1 0 1 0 1 0 1\n0 1 1 2 1 1 1 2\n1 0 1 1 0 0 1 2\n2 1 1 0 1 1 2 3\n2 1 0 1 1 1 2 3\n1 0 0 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 306, "matrix": [[1, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 0, 1, 1]], "solution": [[2, 1, 0, 1, 2, 1, 0, 1], [1, 0, 1, 0, 1, 2, 1, 2], [0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 1, 2, 1, 1, 1, 2], [1, 0, 1, 1, 0, 0, 1, 2], [2, 1, 1, 0, 1, 1, 2, 3], [2, 1, 0, 1, 1, 1, 2, 3], [1, 0, 0, 1, 0, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1 1 1\n1 1 1 1 1 1 1 1 0\n0 1 1 1 0 0 1 1 0\n0 1 1 1 1 1 1 1 1\n0 1 0 0 0 1 1 1 1\n1 1 1 1 0 1 0 0 0\n0 1 1 0 1 1 1 1 1\n1 1 0 1 1 1 0 0 1\n1 1 1 1 1 1 0 1 1\n", "answer": "2 1 0 0 1 2 3 2 1\n1 2 1 1 1 1 2 1 0\n0 1 2 1 0 0 1 1 0\n0 1 1 1 1 1 2 2 1\n0 1 0 0 0 1 1 1 1\n1 2 1 1 0 1 0 0 0\n0 1 1 0 1 2 1 1 1\n1 1 0 1 2 1 0 0 1\n2 2 1 2 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 307, "matrix": [[1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0, 0], [0, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[2, 1, 0, 0, 1, 2, 3, 2, 1], [1, 2, 1, 1, 1, 1, 2, 1, 0], [0, 1, 2, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1, 2, 2, 1], [0, 1, 0, 0, 0, 1, 1, 1, 1], [1, 2, 1, 1, 0, 1, 0, 0, 0], [0, 1, 1, 0, 1, 2, 1, 1, 1], [1, 1, 0, 1, 2, 1, 0, 0, 1], [2, 2, 1, 2, 2, 1, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0\n1 1 1 1 1 0 0 1\n1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 0\n1 0 1 0 0 1 1 1\n1 1 1 1 0 1 1 1\n0 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n", "answer": "5 4 3 3 2 1 1 0\n4 3 2 2 1 0 0 1\n3 2 1 2 2 1 1 1\n2 1 0 1 1 2 1 0\n1 0 1 0 0 1 2 1\n1 1 2 1 0 1 2 2\n0 0 1 2 1 2 3 3\n1 1 2 3 2 3 4 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 308, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0], [1, 0, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[5, 4, 3, 3, 2, 1, 1, 0], [4, 3, 2, 2, 1, 0, 0, 1], [3, 2, 1, 2, 2, 1, 1, 1], [2, 1, 0, 1, 1, 2, 1, 0], [1, 0, 1, 0, 0, 1, 2, 1], [1, 1, 2, 1, 0, 1, 2, 2], [0, 0, 1, 2, 1, 2, 3, 3], [1, 1, 2, 3, 2, 3, 4, 4]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0\n0 1 0 1 1 1 1 0\n1 1 1 1 1 0 1 0\n1 1 1 1 1 1 1 0\n0 1 1 1 1 0 1 1\n0 0 0 1 1 1 1 1\n1 0 1 1 0 0 0 1\n1 1 1 1 0 1 1 1\n", "answer": "1 2 1 2 3 2 1 0\n0 1 0 1 2 1 1 0\n1 2 1 2 1 0 1 0\n1 2 2 3 2 1 1 0\n0 1 1 2 1 0 1 1\n0 0 0 1 1 1 1 2\n1 0 1 1 0 0 0 1\n2 1 2 1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 309, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1]], "solution": [[1, 2, 1, 2, 3, 2, 1, 0], [0, 1, 0, 1, 2, 1, 1, 0], [1, 2, 1, 2, 1, 0, 1, 0], [1, 2, 2, 3, 2, 1, 1, 0], [0, 1, 1, 2, 1, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1, 2], [1, 0, 1, 1, 0, 0, 0, 1], [2, 1, 2, 1, 0, 1, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1\n1 1 0 1 0 0 1\n1 1 1 1 1 1 1\n1 1 1 1 0 0 0\n1 1 1 1 1 1 1\n0 1 1 1 1 0 1\n0 1 0 0 0 1 1\n", "answer": "2 1 0 1 1 1 2\n2 1 0 1 0 0 1\n3 2 1 2 1 1 1\n2 3 2 1 0 0 0\n1 2 2 2 1 1 1\n0 1 1 1 1 0 1\n0 1 0 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 310, "matrix": [[1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1], [0, 1, 0, 0, 0, 1, 1]], "solution": [[2, 1, 0, 1, 1, 1, 2], [2, 1, 0, 1, 0, 0, 1], [3, 2, 1, 2, 1, 1, 1], [2, 3, 2, 1, 0, 0, 0], [1, 2, 2, 2, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1], [0, 1, 0, 0, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0\n1 1 0 1\n1 1 1 1\n0 1 1 1\n", "answer": "0 1 0 0\n1 1 0 1\n1 2 1 2\n0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 311, "matrix": [[0, 1, 0, 0], [1, 1, 0, 1], [1, 1, 1, 1], [0, 1, 1, 1]], "solution": [[0, 1, 0, 0], [1, 1, 0, 1], [1, 2, 1, 2], [0, 1, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 0\n0 0 1 1 1 1\n1 1 0 1 1 1\n1 1 1 1 1 1\n1 0 1 1 1 1\n1 1 1 1 1 1\n", "answer": "1 0 1 2 1 0\n0 0 1 2 2 1\n1 1 0 1 2 2\n2 1 1 2 3 3\n1 0 1 2 3 4\n2 1 2 3 4 5", "metadata": {"source_dataset": "binary_matrix", "source_index": 312, "matrix": [[1, 0, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 2, 1, 0], [0, 0, 1, 2, 2, 1], [1, 1, 0, 1, 2, 2], [2, 1, 1, 2, 3, 3], [1, 0, 1, 2, 3, 4], [2, 1, 2, 3, 4, 5]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1\n1 0 1 1 1\n1 1 0 1 1\n1 1 1 1 0\n0 1 1 1 0\n", "answer": "0 1 0 1 2\n1 0 1 2 2\n2 1 0 1 1\n1 2 1 1 0\n0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 313, "matrix": [[0, 1, 0, 1, 1], [1, 0, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 0], [0, 1, 1, 1, 0]], "solution": [[0, 1, 0, 1, 2], [1, 0, 1, 2, 2], [2, 1, 0, 1, 1], [1, 2, 1, 1, 0], [0, 1, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 1\n1 1 0\n", "answer": "0 1 2\n1 2 1\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 314, "matrix": [[0, 1, 1], [1, 1, 1], [1, 1, 0]], "solution": [[0, 1, 2], [1, 2, 1], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0\n1 1 1 1 1\n1 0 1 1 1\n0 1 0 0 1\n0 1 1 1 1\n", "answer": "3 2 2 1 0\n2 1 2 2 1\n1 0 1 1 2\n0 1 0 0 1\n0 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 315, "matrix": [[1, 1, 1, 1, 0], [1, 1, 1, 1, 1], [1, 0, 1, 1, 1], [0, 1, 0, 0, 1], [0, 1, 1, 1, 1]], "solution": [[3, 2, 2, 1, 0], [2, 1, 2, 2, 1], [1, 0, 1, 1, 2], [0, 1, 0, 0, 1], [0, 1, 1, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 0\n0 1 1 1 1 1\n1 1 1 1 1 0\n0 1 1 0 0 1\n1 1 0 0 0 1\n0 0 0 1 0 1\n", "answer": "1 1 0 0 1 0\n0 1 1 1 2 1\n1 2 2 1 1 0\n0 1 1 0 0 1\n1 1 0 0 0 1\n0 0 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 316, "matrix": [[1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 0, 1], [0, 0, 0, 1, 0, 1]], "solution": [[1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 2, 1], [1, 2, 2, 1, 1, 0], [0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 0, 1], [0, 0, 0, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n1 1 1 1\n1 1 0 1\n1 1 0 1\n", "answer": "1 0 1 2\n2 1 1 2\n2 1 0 1\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 317, "matrix": [[1, 0, 1, 1], [1, 1, 1, 1], [1, 1, 0, 1], [1, 1, 0, 1]], "solution": [[1, 0, 1, 2], [2, 1, 1, 2], [2, 1, 0, 1], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1\n1 1 0 0 1 0\n1 1 0 1 0 1\n1 1 1 1 1 0\n1 1 0 1 0 0\n1 1 1 0 0 1\n", "answer": "0 1 0 1 2 1\n1 1 0 0 1 0\n2 1 0 1 0 1\n3 2 1 2 1 0\n2 1 0 1 0 0\n3 2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 318, "matrix": [[0, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 0], [1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 0, 0], [1, 1, 1, 0, 0, 1]], "solution": [[0, 1, 0, 1, 2, 1], [1, 1, 0, 0, 1, 0], [2, 1, 0, 1, 0, 1], [3, 2, 1, 2, 1, 0], [2, 1, 0, 1, 0, 0], [3, 2, 1, 0, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 0 1 1\n1 1 0 1 0\n0 1 1 1 0\n1 1 1 0 1\n", "answer": "3 2 1 2 2\n2 1 0 1 1\n1 1 0 1 0\n0 1 1 1 0\n1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 319, "matrix": [[1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 0, 1, 0], [0, 1, 1, 1, 0], [1, 1, 1, 0, 1]], "solution": [[3, 2, 1, 2, 2], [2, 1, 0, 1, 1], [1, 1, 0, 1, 0], [0, 1, 1, 1, 0], [1, 2, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0\n1 0 1 1 1 1 0 1\n0 1 1 1 1 0 1 1\n1 1 1 1 1 1 0 1\n0 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1\n0 1 0 0 1 1 1 0\n1 1 1 0 1 1 0 1\n", "answer": "2 1 2 3 3 2 1 0\n1 0 1 2 2 1 0 1\n0 1 2 2 1 0 1 2\n1 2 3 3 2 1 0 1\n0 1 2 2 3 2 1 0\n1 2 1 1 2 3 2 1\n0 1 0 0 1 2 1 0\n1 2 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 320, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 0, 1]], "solution": [[2, 1, 2, 3, 3, 2, 1, 0], [1, 0, 1, 2, 2, 1, 0, 1], [0, 1, 2, 2, 1, 0, 1, 2], [1, 2, 3, 3, 2, 1, 0, 1], [0, 1, 2, 2, 3, 2, 1, 0], [1, 2, 1, 1, 2, 3, 2, 1], [0, 1, 0, 0, 1, 2, 1, 0], [1, 2, 1, 0, 1, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1\n1 1 1 1 0\n0 1 0 1 1\n1 1 1 1 1\n1 1 0 1 0\n", "answer": "1 0 1 0 1\n1 1 1 1 0\n0 1 0 1 1\n1 2 1 2 1\n2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 321, "matrix": [[1, 0, 1, 0, 1], [1, 1, 1, 1, 0], [0, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 1, 0, 1, 0]], "solution": [[1, 0, 1, 0, 1], [1, 1, 1, 1, 0], [0, 1, 0, 1, 1], [1, 2, 1, 2, 1], [2, 1, 0, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 0 0\n0 0 1\n", "answer": "0 1 1\n1 0 0\n0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 322, "matrix": [[0, 1, 1], [1, 0, 0], [0, 0, 1]], "solution": [[0, 1, 1], [1, 0, 0], [0, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 0 1\n0 1 0 1 0 1 1\n0 1 1 0 1 0 1\n1 1 1 1 0 1 1\n1 1 1 1 1 1 1\n0 1 1 0 1 0 0\n1 1 0 0 1 1 1\n", "answer": "1 0 1 2 1 0 1\n0 1 0 1 0 1 2\n0 1 1 0 1 0 1\n1 2 2 1 0 1 2\n1 2 2 1 1 1 1\n0 1 1 0 1 0 0\n1 1 0 0 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 323, "matrix": [[1, 0, 1, 1, 1, 0, 1], [0, 1, 0, 1, 0, 1, 1], [0, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0, 0], [1, 1, 0, 0, 1, 1, 1]], "solution": [[1, 0, 1, 2, 1, 0, 1], [0, 1, 0, 1, 0, 1, 2], [0, 1, 1, 0, 1, 0, 1], [1, 2, 2, 1, 0, 1, 2], [1, 2, 2, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0, 0], [1, 1, 0, 0, 1, 1, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 1 0 1\n1 0 1 1\n0 0 1 1\n", "answer": "2 1 0 1\n2 1 0 1\n1 0 1 2\n0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 324, "matrix": [[1, 1, 0, 1], [1, 1, 0, 1], [1, 0, 1, 1], [0, 0, 1, 1]], "solution": [[2, 1, 0, 1], [2, 1, 0, 1], [1, 0, 1, 2], [0, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n0 1 1\n1 1 0\n", "answer": "1 2 2\n0 1 1\n1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 325, "matrix": [[1, 1, 1], [0, 1, 1], [1, 1, 0]], "solution": [[1, 2, 2], [0, 1, 1], [1, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 1 1 1 1\n1 1 1 1 1 1 1 0 1 1\n1 1 1 0 1 1 1 1 0 1\n1 1 1 1 1 0 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 1 1 1\n1 1 0 1 1 0 1 1 1 0\n0 1 1 1 1 0 1 0 1 1\n1 1 0 1 0 1 1 1 1 1\n1 1 1 1 1 1 0 1 1 0\n", "answer": "3 2 1 0 1 0 1 1 2 3\n4 3 2 1 2 1 1 0 1 2\n3 2 1 0 1 1 2 1 0 1\n4 3 2 1 1 0 1 2 1 2\n3 3 2 1 2 1 2 3 2 2\n2 2 1 0 1 1 2 2 2 1\n1 1 0 1 1 0 1 1 1 0\n0 1 1 2 1 0 1 0 1 1\n1 1 0 1 0 1 1 1 2 1\n2 2 1 2 1 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 326, "matrix": [[1, 1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 0]], "solution": [[3, 2, 1, 0, 1, 0, 1, 1, 2, 3], [4, 3, 2, 1, 2, 1, 1, 0, 1, 2], [3, 2, 1, 0, 1, 1, 2, 1, 0, 1], [4, 3, 2, 1, 1, 0, 1, 2, 1, 2], [3, 3, 2, 1, 2, 1, 2, 3, 2, 2], [2, 2, 1, 0, 1, 1, 2, 2, 2, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 2, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 2, 1], [2, 2, 1, 2, 1, 1, 0, 1, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0\n0 1 1 1 1 1 0 0\n1 1 1 1 1 1 1 1\n0 1 0 1 1 1 0 1\n1 1 0 1 1 1 1 1\n1 1 1 1 1 1 0 0\n0 1 0 1 1 1 1 1\n1 1 0 1 0 1 1 1\n", "answer": "1 2 3 4 3 2 1 0\n0 1 2 3 2 1 0 0\n1 2 1 2 3 2 1 1\n0 1 0 1 2 1 0 1\n1 1 0 1 2 2 1 1\n1 2 1 2 2 1 0 0\n0 1 0 1 1 2 1 1\n1 1 0 1 0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 327, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1]], "solution": [[1, 2, 3, 4, 3, 2, 1, 0], [0, 1, 2, 3, 2, 1, 0, 0], [1, 2, 1, 2, 3, 2, 1, 1], [0, 1, 0, 1, 2, 1, 0, 1], [1, 1, 0, 1, 2, 2, 1, 1], [1, 2, 1, 2, 2, 1, 0, 0], [0, 1, 0, 1, 1, 2, 1, 1], [1, 1, 0, 1, 0, 1, 2, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n0 1 0 1\n1 0 1 1\n1 1 1 1\n", "answer": "1 2 1 0\n0 1 0 1\n1 0 1 2\n2 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 328, "matrix": [[1, 1, 1, 0], [0, 1, 0, 1], [1, 0, 1, 1], [1, 1, 1, 1]], "solution": [[1, 2, 1, 0], [0, 1, 0, 1], [1, 0, 1, 2], [2, 1, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1\n1 1 1 0 1 0 0\n1 1 1 1 1 0 1\n1 1 1 0 1 1 1\n0 0 1 1 1 0 0\n0 1 1 1 1 0 1\n1 0 0 1 1 0 0\n", "answer": "1 0 1 1 2 1 1\n2 1 1 0 1 0 0\n2 2 2 1 1 0 1\n1 1 1 0 1 1 1\n0 0 1 1 1 0 0\n0 1 1 2 1 0 1\n1 0 0 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 329, "matrix": [[1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 0, 0]], "solution": [[1, 0, 1, 1, 2, 1, 1], [2, 1, 1, 0, 1, 0, 0], [2, 2, 2, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0], [0, 1, 1, 2, 1, 0, 1], [1, 0, 0, 1, 1, 0, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 0 0 0\n1 0 0 0\n0 1 1 1\n", "answer": "2 1 1 1\n1 0 0 0\n1 0 0 0\n0 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 330, "matrix": [[1, 1, 1, 1], [1, 0, 0, 0], [1, 0, 0, 0], [0, 1, 1, 1]], "solution": [[2, 1, 1, 1], [1, 0, 0, 0], [1, 0, 0, 0], [0, 1, 1, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n0 1 0\n1 1 1\n", "answer": "1 1 0\n0 1 0\n1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 331, "matrix": [[1, 1, 0], [0, 1, 0], [1, 1, 1]], "solution": [[1, 1, 0], [0, 1, 0], [1, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1 1 1\n1 0 0 1 1 0 1 1\n1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 1\n1 1 1 1 1 0 0 1\n1 1 1 0 1 0 0 0\n0 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 0\n", "answer": "0 1 1 1 0 1 2 3\n1 0 0 1 1 0 1 2\n2 1 1 1 2 1 2 3\n3 2 1 0 1 1 1 2\n2 3 2 1 1 0 0 1\n1 2 1 0 1 0 0 0\n0 1 0 1 2 1 1 1\n1 2 1 2 3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 332, "matrix": [[0, 1, 1, 1, 0, 1, 1, 1], [1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 1, 1, 0, 1, 2, 3], [1, 0, 0, 1, 1, 0, 1, 2], [2, 1, 1, 1, 2, 1, 2, 3], [3, 2, 1, 0, 1, 1, 1, 2], [2, 3, 2, 1, 1, 0, 0, 1], [1, 2, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 2, 1, 1, 1], [1, 2, 1, 2, 3, 2, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1\n1 0 1 1 1 1\n0 1 0 0 1 0\n1 1 1 1 0 0\n1 1 1 0 0 0\n1 0 1 0 1 0\n", "answer": "2 1 1 0 1 2\n1 0 1 1 2 1\n0 1 0 0 1 0\n1 2 1 1 0 0\n2 1 1 0 0 0\n1 0 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 333, "matrix": [[1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1], [0, 1, 0, 0, 1, 0], [1, 1, 1, 1, 0, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 0, 1, 0]], "solution": [[2, 1, 1, 0, 1, 2], [1, 0, 1, 1, 2, 1], [0, 1, 0, 0, 1, 0], [1, 2, 1, 1, 0, 0], [2, 1, 1, 0, 0, 0], [1, 0, 1, 0, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1 1\n1 1 0 1 1 0 1 1 1\n1 0 1 1 1 1 1 0 1\n0 1 0 1 1 1 1 1 0\n1 0 1 0 1 0 1 0 1\n0 1 1 1 0 1 1 1 1\n1 0 1 0 1 1 0 0 0\n1 0 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 0\n", "answer": "3 2 1 2 1 0 1 2 3\n2 1 0 1 1 0 1 1 2\n1 0 1 2 2 1 1 0 1\n0 1 0 1 2 1 2 1 0\n1 0 1 0 1 0 1 0 1\n0 1 2 1 0 1 1 1 1\n1 0 1 0 1 1 0 0 0\n1 0 1 1 2 1 0 1 1\n2 1 2 2 3 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 334, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[3, 2, 1, 2, 1, 0, 1, 2, 3], [2, 1, 0, 1, 1, 0, 1, 1, 2], [1, 0, 1, 2, 2, 1, 1, 0, 1], [0, 1, 0, 1, 2, 1, 2, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 2, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0, 0, 0], [1, 0, 1, 1, 2, 1, 0, 1, 1], [2, 1, 2, 2, 3, 2, 1, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0\n1 0 1 1 0 1\n0 1 1 1 0 1\n1 1 1 1 1 1\n1 0 1 1 0 1\n0 1 1 0 1 1\n", "answer": "0 1 2 2 1 0\n1 0 1 1 0 1\n0 1 2 1 0 1\n1 1 2 2 1 2\n1 0 1 1 0 1\n0 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 335, "matrix": [[0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1]], "solution": [[0, 1, 2, 2, 1, 0], [1, 0, 1, 1, 0, 1], [0, 1, 2, 1, 0, 1], [1, 1, 2, 2, 1, 2], [1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n0 1 0\n1 1 1\n", "answer": "1 2 1\n0 1 0\n1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 336, "matrix": [[1, 1, 1], [0, 1, 0], [1, 1, 1]], "solution": [[1, 2, 1], [0, 1, 0], [1, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 0 1\n1 1 1\n", "answer": "0 1 2\n1 0 1\n2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 337, "matrix": [[0, 1, 1], [1, 0, 1], [1, 1, 1]], "solution": [[0, 1, 2], [1, 0, 1], [2, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 1 1 1\n1 1 0 1 1\n1 1 1 1 1\n1 0 1 1 1\n", "answer": "4 3 2 3 4\n3 2 1 2 3\n2 1 0 1 2\n2 1 1 2 3\n1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 338, "matrix": [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 0, 1, 1, 1]], "solution": [[4, 3, 2, 3, 4], [3, 2, 1, 2, 3], [2, 1, 0, 1, 2], [2, 1, 1, 2, 3], [1, 0, 1, 2, 3]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 0 0 1 0\n0 0 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 0 0 0 1\n1 1 1 1 1 1 0 0 1 0\n1 1 1 1 1 1 0 1 1 1\n1 1 1 0 1 0 1 1 1 1\n0 1 1 1 1 1 1 1 0 0\n1 0 1 1 1 1 1 1 1 1\n1 0 0 1 0 1 1 1 0 0\n", "answer": "2 2 3 3 2 1 1 1 2 1\n1 1 2 2 1 0 0 0 1 0\n0 0 1 1 2 1 1 1 1 1\n1 1 1 0 1 1 0 0 0 1\n2 2 2 1 2 1 0 0 1 0\n2 3 2 1 2 1 0 1 2 1\n1 2 1 0 1 0 1 2 1 1\n0 1 2 1 2 1 2 1 0 0\n1 0 1 2 1 2 3 2 1 1\n1 0 0 1 0 1 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 339, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 0, 1, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1, 1, 1, 0, 0]], "solution": [[2, 2, 3, 3, 2, 1, 1, 1, 2, 1], [1, 1, 2, 2, 1, 0, 0, 0, 1, 0], [0, 0, 1, 1, 2, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [2, 2, 2, 1, 2, 1, 0, 0, 1, 0], [2, 3, 2, 1, 2, 1, 0, 1, 2, 1], [1, 2, 1, 0, 1, 0, 1, 2, 1, 1], [0, 1, 2, 1, 2, 1, 2, 1, 0, 0], [1, 0, 1, 2, 1, 2, 3, 2, 1, 1], [1, 0, 0, 1, 0, 1, 2, 1, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n1 0 1\n1 1 1\n", "answer": "2 1 0\n1 0 1\n2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 340, "matrix": [[1, 1, 0], [1, 0, 1], [1, 1, 1]], "solution": [[2, 1, 0], [1, 0, 1], [2, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 0 1 0\n1 0 0 1 1 1 1 1 0\n1 1 1 0 1 0 1 1 0\n1 1 1 1 1 1 1 1 1\n1 0 1 1 0 1 0 1 1\n0 0 1 1 1 1 0 0 1\n1 0 1 1 1 1 1 0 1\n1 1 1 1 1 1 1 1 0\n1 1 0 0 1 1 1 1 1\n", "answer": "2 1 0 1 0 1 0 1 0\n1 0 0 1 1 1 1 1 0\n2 1 1 0 1 0 1 1 0\n2 1 2 1 1 1 1 2 1\n1 0 1 1 0 1 0 1 2\n0 0 1 2 1 1 0 0 1\n1 0 1 2 2 2 1 0 1\n2 1 1 1 2 3 2 1 0\n2 1 0 0 1 2 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 341, "matrix": [[1, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1, 1], [0, 0, 1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 0, 1, 1, 1, 1, 1, 0], [2, 1, 1, 0, 1, 0, 1, 1, 0], [2, 1, 2, 1, 1, 1, 1, 2, 1], [1, 0, 1, 1, 0, 1, 0, 1, 2], [0, 0, 1, 2, 1, 1, 0, 0, 1], [1, 0, 1, 2, 2, 2, 1, 0, 1], [2, 1, 1, 1, 2, 3, 2, 1, 0], [2, 1, 0, 0, 1, 2, 3, 2, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1 1 1 1\n1 1 0 1 1 0 1 0 0\n0 1 1 0 1 1 1 1 1\n1 0 1 1 1 1 1 0 1\n1 1 1 1 1 1 0 1 1\n1 0 0 0 1 1 1 1 1\n1 1 0 0 0 0 1 1 1\n1 1 0 0 1 1 1 1 0\n1 0 1 1 0 0 1 1 0\n", "answer": "1 0 1 0 1 1 2 1 1\n1 1 0 1 1 0 1 0 0\n0 1 1 0 1 1 2 1 1\n1 0 1 1 2 2 1 0 1\n2 1 1 1 2 1 0 1 2\n1 0 0 0 1 1 1 2 2\n2 1 0 0 0 0 1 2 1\n2 1 0 0 1 1 2 1 0\n1 0 1 1 0 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 342, "matrix": [[1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 0, 0, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 1, 0]], "solution": [[1, 0, 1, 0, 1, 1, 2, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1, 2, 1, 1], [1, 0, 1, 1, 2, 2, 1, 0, 1], [2, 1, 1, 1, 2, 1, 0, 1, 2], [1, 0, 0, 0, 1, 1, 1, 2, 2], [2, 1, 0, 0, 0, 0, 1, 2, 1], [2, 1, 0, 0, 1, 1, 2, 1, 0], [1, 0, 1, 1, 0, 0, 1, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0\n0 1 1 1\n1 0 1 1\n1 0 1 0\n", "answer": "1 0 1 0\n0 1 2 1\n1 0 1 1\n1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 343, "matrix": [[1, 0, 1, 0], [0, 1, 1, 1], [1, 0, 1, 1], [1, 0, 1, 0]], "solution": [[1, 0, 1, 0], [0, 1, 2, 1], [1, 0, 1, 1], [1, 0, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 1 0 0 1 1 1\n1 1 0 1 1 0 0\n1 0 1 1 1 1 0\n1 1 1 0 0 0 1\n0 1 1 0 1 1 1\n1 0 0 1 0 1 0\n", "answer": "3 2 1 1 2 2 2\n2 1 0 0 1 1 1\n2 1 0 1 1 0 0\n1 0 1 1 1 1 0\n1 1 1 0 0 0 1\n0 1 1 0 1 1 1\n1 0 0 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 344, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 0, 1], [0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 1, 0, 1, 0]], "solution": [[3, 2, 1, 1, 2, 2, 2], [2, 1, 0, 0, 1, 1, 1], [2, 1, 0, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 0, 1], [0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 1, 0, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1 1 1 0 0\n1 1 0 1 1 1 0 0 1 1\n1 1 1 0 1 1 0 0 0 1\n1 0 1 0 1 0 1 0 0 1\n0 1 0 1 1 1 1 0 1 1\n0 0 1 1 0 0 1 1 1 1\n1 1 1 1 1 1 1 0 0 1\n1 0 1 1 1 0 1 1 1 0\n1 1 1 1 1 1 1 1 0 1\n1 1 0 1 1 0 1 1 1 1\n", "answer": "1 0 1 0 1 2 1 1 0 0\n2 1 0 1 2 1 0 0 1 1\n2 1 1 0 1 1 0 0 0 1\n1 0 1 0 1 0 1 0 0 1\n0 1 0 1 1 1 1 0 1 2\n0 0 1 1 0 0 1 1 1 2\n1 1 2 2 1 1 1 0 0 1\n1 0 1 2 1 0 1 1 1 0\n2 1 1 2 2 1 2 1 0 1\n2 1 0 1 1 0 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 345, "matrix": [[1, 0, 1, 0, 1, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 0, 1], [0, 1, 0, 1, 1, 1, 1, 0, 1, 1], [0, 0, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1]], "solution": [[1, 0, 1, 0, 1, 2, 1, 1, 0, 0], [2, 1, 0, 1, 2, 1, 0, 0, 1, 1], [2, 1, 1, 0, 1, 1, 0, 0, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 0, 1], [0, 1, 0, 1, 1, 1, 1, 0, 1, 2], [0, 0, 1, 1, 0, 0, 1, 1, 1, 2], [1, 1, 2, 2, 1, 1, 1, 0, 0, 1], [1, 0, 1, 2, 1, 0, 1, 1, 1, 0], [2, 1, 1, 2, 2, 1, 2, 1, 0, 1], [2, 1, 0, 1, 1, 0, 1, 2, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n0 0 1 1 1 0 0 0\n0 1 0 1 1 1 0 0\n1 0 1 1 0 1 1 0\n0 1 0 1 0 1 1 1\n0 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1\n", "answer": "2 2 3 4 3 2 2 2\n1 1 2 3 2 1 1 1\n0 0 1 2 1 0 0 0\n0 1 0 1 1 1 0 0\n1 0 1 1 0 1 1 0\n0 1 0 1 0 1 2 1\n0 1 1 2 1 2 3 2\n0 1 2 3 2 3 4 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 346, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1, 0], [0, 1, 0, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 2, 3, 4, 3, 2, 2, 2], [1, 1, 2, 3, 2, 1, 1, 1], [0, 0, 1, 2, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1, 0], [0, 1, 0, 1, 0, 1, 2, 1], [0, 1, 1, 2, 1, 2, 3, 2], [0, 1, 2, 3, 2, 3, 4, 3]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 1 1\n1 1 1 0 1 1 1 1\n0 1 1 0 1 1 1 0\n1 1 0 0 1 0 1 1\n1 0 1 1 1 1 1 0\n1 1 1 0 0 1 0 0\n1 1 0 0 1 1 0 1\n0 1 1 0 1 1 0 0\n", "answer": "0 1 2 1 1 0 1 2\n1 2 1 0 1 1 2 1\n0 1 1 0 1 1 1 0\n1 1 0 0 1 0 1 1\n1 0 1 1 1 1 1 0\n2 1 1 0 0 1 0 0\n1 1 0 0 1 1 0 1\n0 1 1 0 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 347, "matrix": [[0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 1, 0, 0], [1, 1, 0, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 0, 0]], "solution": [[0, 1, 2, 1, 1, 0, 1, 2], [1, 2, 1, 0, 1, 1, 2, 1], [0, 1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0], [2, 1, 1, 0, 0, 1, 0, 0], [1, 1, 0, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 0, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n0 1 1 0\n1 1 0 1\n1 1 1 1\n", "answer": "1 2 2 1\n0 1 1 0\n1 1 0 1\n2 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 348, "matrix": [[1, 1, 1, 1], [0, 1, 1, 0], [1, 1, 0, 1], [1, 1, 1, 1]], "solution": [[1, 2, 2, 1], [0, 1, 1, 0], [1, 1, 0, 1], [2, 2, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1 0 0 1\n1 1 0 1 1 1 1 1 0 1\n0 1 1 1 1 1 1 1 1 1\n0 1 1 0 1 1 0 1 1 0\n1 1 1 1 1 0 1 1 1 1\n1 1 1 0 1 1 1 1 1 1\n1 1 0 0 1 1 0 1 1 1\n1 0 1 0 1 0 1 1 1 1\n0 1 1 1 1 0 0 1 0 1\n0 0 1 0 1 1 1 1 0 0\n", "answer": "1 0 1 1 0 1 1 0 0 1\n1 1 0 1 1 2 2 1 0 1\n0 1 1 1 2 2 1 2 1 1\n0 1 1 0 1 1 0 1 1 0\n1 2 2 1 1 0 1 2 2 1\n2 2 1 0 1 1 1 2 3 2\n2 1 0 0 1 1 0 1 2 3\n1 0 1 0 1 0 1 2 1 2\n0 1 2 1 1 0 0 1 0 1\n0 0 1 0 1 1 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 349, "matrix": [[1, 0, 1, 1, 0, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 0, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 1, 1, 1, 1, 0, 0]], "solution": [[1, 0, 1, 1, 0, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 2, 2, 1, 0, 1], [0, 1, 1, 1, 2, 2, 1, 2, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1, 1, 0], [1, 2, 2, 1, 1, 0, 1, 2, 2, 1], [2, 2, 1, 0, 1, 1, 1, 2, 3, 2], [2, 1, 0, 0, 1, 1, 0, 1, 2, 3], [1, 0, 1, 0, 1, 0, 1, 2, 1, 2], [0, 1, 2, 1, 1, 0, 0, 1, 0, 1], [0, 0, 1, 0, 1, 1, 1, 1, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 1 0\n1 0 1 1 1 1 1 0 1 0\n1 0 1 0 1 1 0 1 1 1\n1 1 1 1 0 0 1 0 1 0\n0 1 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 1 0\n0 0 1 0 1 0 1 1 1 0\n1 0 1 1 0 1 0 1 1 1\n1 0 1 1 0 1 1 1 1 1\n", "answer": "0 0 1 2 3 2 1 0 1 1\n1 1 2 2 3 3 2 1 1 0\n1 0 1 1 2 2 1 0 1 0\n1 0 1 0 1 1 0 1 2 1\n1 1 2 1 0 0 1 0 1 0\n0 1 2 2 1 1 2 1 2 1\n1 1 2 1 0 1 2 2 1 0\n0 0 1 0 1 0 1 2 1 0\n1 0 1 1 0 1 0 1 2 1\n1 0 1 1 0 1 1 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 350, "matrix": [[0, 0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 0, 1, 0], [1, 0, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 0], [0, 0, 1, 0, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[0, 0, 1, 2, 3, 2, 1, 0, 1, 1], [1, 1, 2, 2, 3, 3, 2, 1, 1, 0], [1, 0, 1, 1, 2, 2, 1, 0, 1, 0], [1, 0, 1, 0, 1, 1, 0, 1, 2, 1], [1, 1, 2, 1, 0, 0, 1, 0, 1, 0], [0, 1, 2, 2, 1, 1, 2, 1, 2, 1], [1, 1, 2, 1, 0, 1, 2, 2, 1, 0], [0, 0, 1, 0, 1, 0, 1, 2, 1, 0], [1, 0, 1, 1, 0, 1, 0, 1, 2, 1], [1, 0, 1, 1, 0, 1, 1, 2, 3, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0 1\n0 1 1 1 0 1 1 0\n0 1 0 0 1 0 1 1\n1 1 1 1 1 0 1 0\n1 1 1 1 0 0 1 1\n1 1 0 1 0 1 1 0\n0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0\n", "answer": "1 2 2 1 0 1 0 1\n0 1 1 1 0 1 1 0\n0 1 0 0 1 0 1 1\n1 2 1 1 1 0 1 0\n2 2 1 1 0 0 1 1\n1 1 0 1 0 1 1 0\n0 1 1 2 1 2 2 1\n1 2 2 3 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 351, "matrix": [[1, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[1, 2, 2, 1, 0, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1, 1], [1, 2, 1, 1, 1, 0, 1, 0], [2, 2, 1, 1, 0, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0], [0, 1, 1, 2, 1, 2, 2, 1], [1, 2, 2, 3, 2, 2, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0\n1 1 1 1 1 0\n1 1 0 1 1 1\n1 1 1 1 1 1\n0 1 1 1 1 0\n1 1 1 1 1 0\n", "answer": "2 1 0 1 1 0\n3 2 1 2 1 0\n2 1 0 1 2 1\n1 2 1 2 2 1\n0 1 2 2 1 0\n1 2 3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 352, "matrix": [[1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0]], "solution": [[2, 1, 0, 1, 1, 0], [3, 2, 1, 2, 1, 0], [2, 1, 0, 1, 2, 1], [1, 2, 1, 2, 2, 1], [0, 1, 2, 2, 1, 0], [1, 2, 3, 2, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1\n1 1 1 0 1 0 0 1\n1 1 1 1 0 0 1 1\n1 1 0 1 0 1 1 0\n1 1 1 0 1 1 1 1\n0 1 1 0 1 0 1 1\n1 1 1 0 1 1 0 0\n", "answer": "0 1 1 2 3 2 2 3\n1 1 0 1 2 1 1 2\n2 2 1 0 1 0 0 1\n3 2 1 1 0 0 1 1\n2 1 0 1 0 1 1 0\n1 2 1 0 1 1 2 1\n0 1 1 0 1 0 1 1\n1 2 1 0 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 353, "matrix": [[0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0]], "solution": [[0, 1, 1, 2, 3, 2, 2, 3], [1, 1, 0, 1, 2, 1, 1, 2], [2, 2, 1, 0, 1, 0, 0, 1], [3, 2, 1, 1, 0, 0, 1, 1], [2, 1, 0, 1, 0, 1, 1, 0], [1, 2, 1, 0, 1, 1, 2, 1], [0, 1, 1, 0, 1, 0, 1, 1], [1, 2, 1, 0, 1, 1, 0, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1\n1 1 1\n1 1 1\n", "answer": "0 0 1\n1 1 2\n2 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 354, "matrix": [[0, 0, 1], [1, 1, 1], [1, 1, 1]], "solution": [[0, 0, 1], [1, 1, 2], [2, 2, 3]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1\n1 1 0 1\n1 0 1 1\n0 1 1 1\n", "answer": "0 1 1 2\n1 1 0 1\n1 0 1 2\n0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 355, "matrix": [[0, 1, 1, 1], [1, 1, 0, 1], [1, 0, 1, 1], [0, 1, 1, 1]], "solution": [[0, 1, 1, 2], [1, 1, 0, 1], [1, 0, 1, 2], [0, 1, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1 1\n0 1 1 1 1 1 1 0 1\n1 1 1 1 0 0 0 1 0\n1 1 1 1 1 0 1 1 1\n0 1 1 1 1 1 1 0 1\n1 0 1 1 0 1 1 1 0\n1 1 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1 1\n1 1 1 1 0 0 1 1 1\n", "answer": "1 1 0 1 2 2 2 1 2\n0 1 1 2 1 1 1 0 1\n1 2 2 1 0 0 0 1 0\n1 2 3 2 1 0 1 1 1\n0 1 2 2 1 1 1 0 1\n1 0 1 1 0 1 2 1 0\n2 1 2 2 1 2 3 2 1\n1 0 1 2 1 1 2 3 2\n2 1 2 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 356, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 0, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1]], "solution": [[1, 1, 0, 1, 2, 2, 2, 1, 2], [0, 1, 1, 2, 1, 1, 1, 0, 1], [1, 2, 2, 1, 0, 0, 0, 1, 0], [1, 2, 3, 2, 1, 0, 1, 1, 1], [0, 1, 2, 2, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 1, 2, 1, 0], [2, 1, 2, 2, 1, 2, 3, 2, 1], [1, 0, 1, 2, 1, 1, 2, 3, 2], [2, 1, 2, 1, 0, 0, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n0 0 1\n0 1 1\n", "answer": "1 0 1\n0 0 1\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 357, "matrix": [[1, 0, 1], [0, 0, 1], [0, 1, 1]], "solution": [[1, 0, 1], [0, 0, 1], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 0 0\n0 1 1 1 1 1 1\n0 0 1 0 1 1 1\n0 1 0 1 1 0 0\n1 1 1 1 0 0 1\n1 1 1 1 1 1 1\n1 0 1 1 1 1 1\n", "answer": "0 1 2 1 0 0 0\n0 1 2 1 1 1 1\n0 0 1 0 1 1 1\n0 1 0 1 1 0 0\n1 2 1 1 0 0 1\n2 1 2 2 1 1 2\n1 0 1 2 2 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 358, "matrix": [[0, 1, 1, 1, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1]], "solution": [[0, 1, 2, 1, 0, 0, 0], [0, 1, 2, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 0, 0], [1, 2, 1, 1, 0, 0, 1], [2, 1, 2, 2, 1, 1, 2], [1, 0, 1, 2, 2, 2, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 0 1\n1 0 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 1 1\n1 0 1 1 1 1 1 1 0 1\n1 0 1 0 1 1 1 1 1 1\n1 1 1 1 0 1 1 0 1 0\n1 0 0 1 1 0 1 1 1 1\n0 1 0 1 1 1 1 1 0 1\n1 0 1 0 1 1 1 0 1 0\n", "answer": "0 1 1 2 3 4 3 2 1 2\n1 1 0 1 2 3 2 1 0 1\n1 0 1 2 1 2 3 2 1 2\n2 1 2 1 0 1 2 2 1 2\n1 0 1 1 1 2 2 1 0 1\n1 0 1 0 1 2 2 1 1 1\n2 1 1 1 0 1 1 0 1 0\n1 0 0 1 1 0 1 1 1 1\n0 1 0 1 2 1 2 1 0 1\n1 0 1 0 1 2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 359, "matrix": [[0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1, 0], [1, 0, 0, 1, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1, 0, 1, 0]], "solution": [[0, 1, 1, 2, 3, 4, 3, 2, 1, 2], [1, 1, 0, 1, 2, 3, 2, 1, 0, 1], [1, 0, 1, 2, 1, 2, 3, 2, 1, 2], [2, 1, 2, 1, 0, 1, 2, 2, 1, 2], [1, 0, 1, 1, 1, 2, 2, 1, 0, 1], [1, 0, 1, 0, 1, 2, 2, 1, 1, 1], [2, 1, 1, 1, 0, 1, 1, 0, 1, 0], [1, 0, 0, 1, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 2, 1, 2, 1, 0, 1], [1, 0, 1, 0, 1, 2, 1, 0, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0 1 1 1 1 1 1\n1 1 0 1 1 0 1 1 1 0\n0 1 1 0 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 0 1\n1 1 1 1 0 1 1 0 1 0\n1 1 1 0 0 1 0 1 1 1\n1 1 1 1 0 0 1 0 0 0\n1 1 0 1 1 1 1 1 1 1\n1 1 1 1 0 1 0 0 1 0\n", "answer": "0 0 1 0 1 1 2 3 2 1\n1 1 0 1 1 0 1 2 1 0\n0 1 1 0 1 1 2 3 2 1\n0 1 2 1 2 2 1 2 1 2\n1 2 3 2 1 1 0 1 0 1\n2 3 2 1 0 1 1 0 1 0\n3 2 1 0 0 1 0 1 1 1\n3 2 1 1 0 0 1 0 0 0\n2 1 0 1 1 1 1 1 1 1\n3 2 1 1 0 1 0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 360, "matrix": [[0, 0, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0, 0, 0], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0, 1, 0]], "solution": [[0, 0, 1, 0, 1, 1, 2, 3, 2, 1], [1, 1, 0, 1, 1, 0, 1, 2, 1, 0], [0, 1, 1, 0, 1, 1, 2, 3, 2, 1], [0, 1, 2, 1, 2, 2, 1, 2, 1, 2], [1, 2, 3, 2, 1, 1, 0, 1, 0, 1], [2, 3, 2, 1, 0, 1, 1, 0, 1, 0], [3, 2, 1, 0, 0, 1, 0, 1, 1, 1], [3, 2, 1, 1, 0, 0, 1, 0, 0, 0], [2, 1, 0, 1, 1, 1, 1, 1, 1, 1], [3, 2, 1, 1, 0, 1, 0, 0, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0\n1 1 0 1 1 0\n1 1 1 0 1 0\n1 1 0 1 1 1\n0 0 0 0 1 0\n1 1 0 1 1 1\n", "answer": "0 1 1 2 1 0\n1 1 0 1 1 0\n2 2 1 0 1 0\n1 1 0 1 2 1\n0 0 0 0 1 0\n1 1 0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 361, "matrix": [[0, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1], [0, 0, 0, 0, 1, 0], [1, 1, 0, 1, 1, 1]], "solution": [[0, 1, 1, 2, 1, 0], [1, 1, 0, 1, 1, 0], [2, 2, 1, 0, 1, 0], [1, 1, 0, 1, 2, 1], [0, 0, 0, 0, 1, 0], [1, 1, 0, 1, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n1 1 0 0\n1 1 1 1\n0 0 1 0\n", "answer": "1 0 1 1\n2 1 0 0\n1 1 1 1\n0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 362, "matrix": [[1, 0, 1, 1], [1, 1, 0, 0], [1, 1, 1, 1], [0, 0, 1, 0]], "solution": [[1, 0, 1, 1], [2, 1, 0, 0], [1, 1, 1, 1], [0, 0, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n1 1 0\n1 1 0\n", "answer": "2 1 0\n2 1 0\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 363, "matrix": [[1, 1, 0], [1, 1, 0], [1, 1, 0]], "solution": [[2, 1, 0], [2, 1, 0], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 0 1 0 1\n0 0 0 0 0 0 1 1 1\n1 1 0 0 1 0 1 1 0\n1 1 0 1 0 1 1 1 1\n1 1 1 1 0 1 0 0 1\n1 0 1 1 0 1 1 1 1\n0 0 0 1 0 0 1 1 1\n1 1 1 1 1 1 1 0 1\n0 0 1 1 0 0 1 1 1\n", "answer": "1 0 1 0 1 0 1 0 1\n0 0 0 0 0 0 1 1 1\n1 1 0 0 1 0 1 1 0\n2 1 0 1 0 1 1 1 1\n2 1 1 1 0 1 0 0 1\n1 0 1 1 0 1 1 1 2\n0 0 0 1 0 0 1 1 2\n1 1 1 2 1 1 1 0 1\n0 0 1 1 0 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 364, "matrix": [[1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 0, 1, 1, 1, 1], [0, 0, 0, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 0, 1, 1, 0, 0, 1, 1, 1]], "solution": [[1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 1, 0, 1, 1, 0], [2, 1, 0, 1, 0, 1, 1, 1, 1], [2, 1, 1, 1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 0, 1, 1, 1, 2], [0, 0, 0, 1, 0, 0, 1, 1, 2], [1, 1, 1, 2, 1, 1, 1, 0, 1], [0, 0, 1, 1, 0, 0, 1, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1\n1 1 1 1\n1 1 1 1\n1 1 0 0\n", "answer": "0 1 2 3\n1 2 2 2\n2 2 1 1\n2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 365, "matrix": [[0, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 0, 0]], "solution": [[0, 1, 2, 3], [1, 2, 2, 2], [2, 2, 1, 1], [2, 1, 0, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 1 0 1 1\n1 0 0 1 1 0 1 1 0 1\n1 1 0 0 1 1 0 1 0 1\n1 1 1 1 1 0 1 1 1 1\n1 1 0 1 1 1 0 1 1 1\n1 0 1 1 1 1 0 1 1 0\n1 0 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 0 1 1 1\n1 1 1 1 1 1 1 1 0 0\n1 0 1 1 0 0 0 1 1 1\n", "answer": "2 1 0 1 0 1 1 0 1 2\n1 0 0 1 1 0 1 1 0 1\n2 1 0 0 1 1 0 1 0 1\n3 2 1 1 1 0 1 2 1 2\n2 1 0 1 2 1 0 1 2 1\n1 0 1 2 2 1 0 1 1 0\n1 0 1 2 3 2 1 2 2 1\n0 1 2 3 2 1 0 1 1 1\n1 1 2 2 1 1 1 1 0 0\n1 0 1 1 0 0 0 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 366, "matrix": [[1, 1, 0, 1, 0, 1, 1, 0, 1, 1], [1, 0, 0, 1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 0, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 0, 0, 1, 1, 1]], "solution": [[2, 1, 0, 1, 0, 1, 1, 0, 1, 2], [1, 0, 0, 1, 1, 0, 1, 1, 0, 1], [2, 1, 0, 0, 1, 1, 0, 1, 0, 1], [3, 2, 1, 1, 1, 0, 1, 2, 1, 2], [2, 1, 0, 1, 2, 1, 0, 1, 2, 1], [1, 0, 1, 2, 2, 1, 0, 1, 1, 0], [1, 0, 1, 2, 3, 2, 1, 2, 2, 1], [0, 1, 2, 3, 2, 1, 0, 1, 1, 1], [1, 1, 2, 2, 1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 0, 0, 1, 1, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 0 0 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 1 1\n0 0 1 0 0 1 1 1 0 0\n1 1 0 1 1 1 1 1 1 1\n0 0 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1 1\n1 1 0 1 1 1 0 0 0 1\n1 1 0 1 1 1 1 1 1 0\n", "answer": "0 1 0 1 1 0 0 1 2 3\n1 2 1 2 1 1 1 2 2 2\n1 1 2 1 0 1 2 2 1 1\n0 0 1 0 0 1 2 1 0 0\n1 1 0 1 1 2 2 1 1 1\n0 0 1 2 2 2 1 0 1 2\n1 1 2 3 3 2 1 1 2 3\n2 2 1 2 2 1 0 1 1 2\n2 1 0 1 2 1 0 0 0 1\n2 1 0 1 2 2 1 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 367, "matrix": [[0, 1, 0, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 0, 0, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 0, 1, 1, 0, 0, 1, 2, 3], [1, 2, 1, 2, 1, 1, 1, 2, 2, 2], [1, 1, 2, 1, 0, 1, 2, 2, 1, 1], [0, 0, 1, 0, 0, 1, 2, 1, 0, 0], [1, 1, 0, 1, 1, 2, 2, 1, 1, 1], [0, 0, 1, 2, 2, 2, 1, 0, 1, 2], [1, 1, 2, 3, 3, 2, 1, 1, 2, 3], [2, 2, 1, 2, 2, 1, 0, 1, 1, 2], [2, 1, 0, 1, 2, 1, 0, 0, 0, 1], [2, 1, 0, 1, 2, 2, 1, 1, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1\n1 1 1 0 1\n1 1 1 1 0\n1 1 0 1 1\n0 1 1 1 0\n", "answer": "1 0 0 1 2\n2 1 1 0 1\n2 2 1 1 0\n1 1 0 1 1\n0 1 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 368, "matrix": [[1, 0, 0, 1, 1], [1, 1, 1, 0, 1], [1, 1, 1, 1, 0], [1, 1, 0, 1, 1], [0, 1, 1, 1, 0]], "solution": [[1, 0, 0, 1, 2], [2, 1, 1, 0, 1], [2, 2, 1, 1, 0], [1, 1, 0, 1, 1], [0, 1, 1, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1\n0 1 1 1 1 1\n1 1 1 0 0 0\n1 0 1 0 0 1\n0 0 1 1 0 0\n1 1 0 0 1 1\n", "answer": "1 0 1 2 2 2\n0 1 2 1 1 1\n1 1 1 0 0 0\n1 0 1 0 0 1\n0 0 1 1 0 0\n1 1 0 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 369, "matrix": [[1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0], [1, 0, 1, 0, 0, 1], [0, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1]], "solution": [[1, 0, 1, 2, 2, 2], [0, 1, 2, 1, 1, 1], [1, 1, 1, 0, 0, 0], [1, 0, 1, 0, 0, 1], [0, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1\n1 0 1 1 0 1 1\n1 1 0 0 1 1 0\n1 1 1 1 1 1 0\n1 1 1 1 1 1 1\n1 1 0 0 0 1 1\n0 1 1 1 1 0 1\n", "answer": "0 1 2 2 1 2 2\n1 0 1 1 0 1 1\n2 1 0 0 1 1 0\n3 2 1 1 2 1 0\n2 2 1 1 1 2 1\n1 1 0 0 0 1 2\n0 1 1 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 370, "matrix": [[0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1]], "solution": [[0, 1, 2, 2, 1, 2, 2], [1, 0, 1, 1, 0, 1, 1], [2, 1, 0, 0, 1, 1, 0], [3, 2, 1, 1, 2, 1, 0], [2, 2, 1, 1, 1, 2, 1], [1, 1, 0, 0, 0, 1, 2], [0, 1, 1, 1, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1 1 1\n1 1 1 0 0 1 1 0 1 1\n1 1 1 0 1 0 0 1 0 1\n1 0 1 1 1 1 0 1 1 0\n1 0 1 1 1 1 0 1 1 0\n1 1 1 1 1 1 1 1 1 1\n0 1 1 0 1 1 1 1 1 0\n0 0 1 1 1 1 0 1 0 1\n1 1 1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n", "answer": "3 2 1 0 1 2 2 1 2 3\n3 2 1 0 0 1 1 0 1 2\n2 1 1 0 1 0 0 1 0 1\n1 0 1 1 2 1 0 1 1 0\n1 0 1 2 2 1 0 1 1 0\n1 1 2 1 2 2 1 2 2 1\n0 1 1 0 1 2 1 2 1 0\n0 0 1 1 2 1 0 1 0 1\n1 1 1 0 1 2 1 2 1 2\n2 2 2 1 2 3 2 3 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 371, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[3, 2, 1, 0, 1, 2, 2, 1, 2, 3], [3, 2, 1, 0, 0, 1, 1, 0, 1, 2], [2, 1, 1, 0, 1, 0, 0, 1, 0, 1], [1, 0, 1, 1, 2, 1, 0, 1, 1, 0], [1, 0, 1, 2, 2, 1, 0, 1, 1, 0], [1, 1, 2, 1, 2, 2, 1, 2, 2, 1], [0, 1, 1, 0, 1, 2, 1, 2, 1, 0], [0, 0, 1, 1, 2, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 2, 1, 2, 1, 2], [2, 2, 2, 1, 2, 3, 2, 3, 2, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1 0 1\n1 0 1 1 1 0 1 1 1\n1 1 1 1 1 1 1 1 1\n1 1 0 1 1 0 1 1 1\n0 1 1 1 0 1 1 1 0\n1 1 1 1 0 1 1 0 0\n0 1 1 1 1 1 1 1 1\n1 0 1 1 0 1 0 1 1\n0 1 1 1 0 0 1 1 1\n", "answer": "1 0 1 1 0 1 1 0 1\n1 0 1 2 1 0 1 1 2\n2 1 1 2 2 1 2 2 2\n1 1 0 1 1 0 1 2 1\n0 1 1 1 0 1 2 1 0\n1 2 2 1 0 1 1 0 0\n0 1 2 2 1 2 1 1 1\n1 0 1 1 0 1 0 1 2\n0 1 2 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 372, "matrix": [[1, 0, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 0, 0, 1, 1, 1]], "solution": [[1, 0, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 2, 1, 0, 1, 1, 2], [2, 1, 1, 2, 2, 1, 2, 2, 2], [1, 1, 0, 1, 1, 0, 1, 2, 1], [0, 1, 1, 1, 0, 1, 2, 1, 0], [1, 2, 2, 1, 0, 1, 1, 0, 0], [0, 1, 2, 2, 1, 2, 1, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1, 2], [0, 1, 2, 1, 0, 0, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 0 0 1\n0 1 1 1 1 1 0 1\n1 0 1 1 1 1 1 0\n1 1 1 1 0 1 1 1\n1 1 1 1 1 1 0 1\n1 1 1 1 0 0 1 1\n0 1 1 1 0 0 1 1\n0 0 1 0 0 1 1 1\n", "answer": "0 1 1 0 1 0 0 1\n0 1 2 1 2 1 0 1\n1 0 1 2 1 2 1 0\n2 1 2 1 0 1 1 1\n2 2 3 2 1 1 0 1\n1 2 2 1 0 0 1 2\n0 1 2 1 0 0 1 2\n0 0 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 373, "matrix": [[0, 1, 1, 0, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 0, 0, 1, 1], [0, 0, 1, 0, 0, 1, 1, 1]], "solution": [[0, 1, 1, 0, 1, 0, 0, 1], [0, 1, 2, 1, 2, 1, 0, 1], [1, 0, 1, 2, 1, 2, 1, 0], [2, 1, 2, 1, 0, 1, 1, 1], [2, 2, 3, 2, 1, 1, 0, 1], [1, 2, 2, 1, 0, 0, 1, 2], [0, 1, 2, 1, 0, 0, 1, 2], [0, 0, 1, 0, 0, 1, 2, 3]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 0 1 1 1 1 1\n1 1 1 1 1 1 0\n1 1 1 1 1 1 1\n1 1 1 0 1 1 1\n1 1 0 1 0 0 1\n1 0 1 1 1 1 0\n", "answer": "2 1 2 3 4 3 2\n1 0 1 2 3 2 1\n2 1 2 2 2 1 0\n3 2 2 1 2 2 1\n3 2 1 0 1 1 2\n2 1 0 1 0 0 1\n1 0 1 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 374, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 1, 1, 0]], "solution": [[2, 1, 2, 3, 4, 3, 2], [1, 0, 1, 2, 3, 2, 1], [2, 1, 2, 2, 2, 1, 0], [3, 2, 2, 1, 2, 2, 1], [3, 2, 1, 0, 1, 1, 2], [2, 1, 0, 1, 0, 0, 1], [1, 0, 1, 2, 1, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n0 1 0 0\n1 0 0 0\n1 1 1 0\n", "answer": "1 2 1 1\n0 1 0 0\n1 0 0 0\n2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 375, "matrix": [[1, 1, 1, 1], [0, 1, 0, 0], [1, 0, 0, 0], [1, 1, 1, 0]], "solution": [[1, 2, 1, 1], [0, 1, 0, 0], [1, 0, 0, 0], [2, 1, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1\n0 1 0 1 1 0 1 0\n0 1 0 1 1 1 1 1\n1 1 0 1 1 1 1 1\n0 1 1 0 1 0 1 1\n0 1 1 1 1 1 1 1\n1 1 1 0 0 1 1 1\n0 1 1 0 0 1 1 1\n", "answer": "1 2 1 2 2 1 2 1\n0 1 0 1 1 0 1 0\n0 1 0 1 2 1 2 1\n1 1 0 1 2 1 2 2\n0 1 1 0 1 0 1 2\n0 1 2 1 1 1 2 3\n1 2 1 0 0 1 2 3\n0 1 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 376, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1, 1]], "solution": [[1, 2, 1, 2, 2, 1, 2, 1], [0, 1, 0, 1, 1, 0, 1, 0], [0, 1, 0, 1, 2, 1, 2, 1], [1, 1, 0, 1, 2, 1, 2, 2], [0, 1, 1, 0, 1, 0, 1, 2], [0, 1, 2, 1, 1, 1, 2, 3], [1, 2, 1, 0, 0, 1, 2, 3], [0, 1, 1, 0, 0, 1, 2, 3]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1\n1 1 1 0 1\n0 0 0 1 1\n0 1 0 0 0\n1 0 1 1 1\n", "answer": "2 2 1 0 1\n1 1 1 0 1\n0 0 0 1 1\n0 1 0 0 0\n1 0 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 377, "matrix": [[1, 1, 1, 0, 1], [1, 1, 1, 0, 1], [0, 0, 0, 1, 1], [0, 1, 0, 0, 0], [1, 0, 1, 1, 1]], "solution": [[2, 2, 1, 0, 1], [1, 1, 1, 0, 1], [0, 0, 0, 1, 1], [0, 1, 0, 0, 0], [1, 0, 1, 1, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 1\n1 1 0\n", "answer": "0 1 2\n1 2 1\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 378, "matrix": [[0, 1, 1], [1, 1, 1], [1, 1, 0]], "solution": [[0, 1, 2], [1, 2, 1], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0\n1 0 1 0 1 1 1\n1 1 1 1 1 1 1\n1 1 0 1 1 0 1\n1 1 1 1 1 0 1\n0 1 0 1 1 1 0\n0 1 1 1 1 1 1\n", "answer": "2 1 2 1 0 1 0\n1 0 1 0 1 2 1\n2 1 1 1 2 1 2\n2 1 0 1 1 0 1\n1 2 1 2 1 0 1\n0 1 0 1 2 1 0\n0 1 1 2 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 379, "matrix": [[1, 1, 1, 1, 0, 1, 0], [1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 2, 1, 0, 1, 0], [1, 0, 1, 0, 1, 2, 1], [2, 1, 1, 1, 2, 1, 2], [2, 1, 0, 1, 1, 0, 1], [1, 2, 1, 2, 1, 0, 1], [0, 1, 0, 1, 2, 1, 0], [0, 1, 1, 2, 3, 2, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 0 1 1 0\n1 1 1 0 0 1 0 1 1\n0 0 1 0 1 0 1 1 0\n1 1 0 1 1 1 1 0 1\n0 0 0 0 1 0 1 1 1\n0 1 1 1 1 1 1 1 1\n1 1 0 1 1 0 1 1 1\n1 0 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 0 1\n", "answer": "0 0 1 1 0 0 1 1 0\n1 1 1 0 0 1 0 1 1\n0 0 1 0 1 0 1 1 0\n1 1 0 1 2 1 1 0 1\n0 0 0 0 1 0 1 1 2\n0 1 1 1 2 1 2 2 3\n1 1 0 1 1 0 1 2 3\n1 0 1 1 2 1 2 1 2\n2 1 1 0 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 380, "matrix": [[0, 0, 1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1, 0, 1, 1], [0, 0, 1, 0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 0, 1], [0, 0, 0, 0, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1]], "solution": [[0, 0, 1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1, 0, 1, 1], [0, 0, 1, 0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 2, 1, 1, 0, 1], [0, 0, 0, 0, 1, 0, 1, 1, 2], [0, 1, 1, 1, 2, 1, 2, 2, 3], [1, 1, 0, 1, 1, 0, 1, 2, 3], [1, 0, 1, 1, 2, 1, 2, 1, 2], [2, 1, 1, 0, 1, 2, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 0\n1 1 1 1 0 0 0 0\n1 1 0 1 1 0 1 0\n0 0 0 0 1 1 1 1\n1 1 1 0 1 1 1 1\n1 1 1 1 1 0 0 1\n1 1 1 0 1 1 1 1\n1 1 0 1 1 1 0 1\n", "answer": "1 0 1 2 1 1 1 0\n2 1 1 1 0 0 0 0\n1 1 0 1 1 0 1 0\n0 0 0 0 1 1 2 1\n1 1 1 0 1 1 1 2\n2 2 2 1 1 0 0 1\n3 2 1 0 1 1 1 2\n2 1 0 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 381, "matrix": [[1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 0, 1, 1, 0, 1, 0], [0, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1]], "solution": [[1, 0, 1, 2, 1, 1, 1, 0], [2, 1, 1, 1, 0, 0, 0, 0], [1, 1, 0, 1, 1, 0, 1, 0], [0, 0, 0, 0, 1, 1, 2, 1], [1, 1, 1, 0, 1, 1, 1, 2], [2, 2, 2, 1, 1, 0, 0, 1], [3, 2, 1, 0, 1, 1, 1, 2], [2, 1, 0, 1, 2, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 0 0 1\n1 1 0 1 0 1 1 1 0 1\n1 1 1 0 1 1 1 0 1 1\n0 0 1 0 1 1 1 1 1 1\n1 1 1 0 1 0 1 0 0 1\n1 0 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 1 1\n0 1 0 1 1 1 0 1 1 1\n1 0 0 1 1 1 1 0 0 1\n", "answer": "3 2 1 1 0 1 1 0 0 1\n2 1 0 1 0 1 2 1 0 1\n1 1 1 0 1 2 1 0 1 2\n0 0 1 0 1 1 2 1 1 2\n1 1 1 0 1 0 1 0 0 1\n1 0 1 1 2 1 2 1 1 2\n2 1 2 2 1 2 2 2 2 3\n1 2 1 1 0 1 1 2 2 3\n0 1 0 1 1 1 0 1 1 2\n1 0 0 1 2 2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 382, "matrix": [[1, 1, 1, 1, 0, 1, 1, 0, 0, 1], [1, 1, 0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1], [0, 0, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 0, 0, 1]], "solution": [[3, 2, 1, 1, 0, 1, 1, 0, 0, 1], [2, 1, 0, 1, 0, 1, 2, 1, 0, 1], [1, 1, 1, 0, 1, 2, 1, 0, 1, 2], [0, 0, 1, 0, 1, 1, 2, 1, 1, 2], [1, 1, 1, 0, 1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 2, 1, 2, 1, 1, 2], [2, 1, 2, 2, 1, 2, 2, 2, 2, 3], [1, 2, 1, 1, 0, 1, 1, 2, 2, 3], [0, 1, 0, 1, 1, 1, 0, 1, 1, 2], [1, 0, 0, 1, 2, 2, 1, 0, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 0\n1 1 1 1 0 1 1 1 1\n1 1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 0\n1 0 1 0 1 1 1 0 1\n1 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 0 1 1\n1 1 1 0 1 1 1 1 1\n", "answer": "2 1 0 1 2 3 3 2 1\n2 1 0 1 1 2 2 1 0\n3 2 1 1 0 1 2 2 1\n2 1 0 1 1 2 3 2 1\n2 1 1 1 2 3 2 1 0\n1 0 1 0 1 2 1 0 1\n2 1 2 1 2 2 1 1 0\n3 2 2 1 2 1 0 1 1\n3 2 1 0 1 2 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 383, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 2, 3, 3, 2, 1], [2, 1, 0, 1, 1, 2, 2, 1, 0], [3, 2, 1, 1, 0, 1, 2, 2, 1], [2, 1, 0, 1, 1, 2, 3, 2, 1], [2, 1, 1, 1, 2, 3, 2, 1, 0], [1, 0, 1, 0, 1, 2, 1, 0, 1], [2, 1, 2, 1, 2, 2, 1, 1, 0], [3, 2, 2, 1, 2, 1, 0, 1, 1], [3, 2, 1, 0, 1, 2, 1, 2, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 1 0 0\n1 1 0 1 1\n1 1 1 1 0\n1 1 1 0 1\n", "answer": "4 3 2 1 1\n3 2 1 0 0\n2 1 0 1 1\n3 2 1 1 0\n3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 384, "matrix": [[1, 1, 1, 1, 1], [1, 1, 1, 0, 0], [1, 1, 0, 1, 1], [1, 1, 1, 1, 0], [1, 1, 1, 0, 1]], "solution": [[4, 3, 2, 1, 1], [3, 2, 1, 0, 0], [2, 1, 0, 1, 1], [3, 2, 1, 1, 0], [3, 2, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1\n1 1 1 1 1\n0 0 0 1 1\n1 1 1 1 0\n1 1 0 1 0\n", "answer": "2 1 0 1 2\n1 1 1 2 2\n0 0 0 1 1\n1 1 1 1 0\n2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 385, "matrix": [[1, 1, 0, 1, 1], [1, 1, 1, 1, 1], [0, 0, 0, 1, 1], [1, 1, 1, 1, 0], [1, 1, 0, 1, 0]], "solution": [[2, 1, 0, 1, 2], [1, 1, 1, 2, 2], [0, 0, 0, 1, 1], [1, 1, 1, 1, 0], [2, 1, 0, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0 1 1 1\n1 0 1 1 1 1 0\n0 1 0 1 1 1 1\n1 0 1 1 1 1 1\n1 0 1 1 1 0 1\n1 0 1 1 0 1 1\n1 1 1 1 1 1 1\n", "answer": "0 1 0 0 1 2 1\n1 0 1 1 2 1 0\n0 1 0 1 2 2 1\n1 0 1 2 2 1 2\n1 0 1 2 1 0 1\n1 0 1 1 0 1 2\n2 1 2 2 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 386, "matrix": [[0, 1, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 0, 0, 1, 2, 1], [1, 0, 1, 1, 2, 1, 0], [0, 1, 0, 1, 2, 2, 1], [1, 0, 1, 2, 2, 1, 2], [1, 0, 1, 2, 1, 0, 1], [1, 0, 1, 1, 0, 1, 2], [2, 1, 2, 2, 1, 2, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 1 1 0\n0 1 0 0\n1 0 0 1\n", "answer": "2 1 0 1\n1 2 1 0\n0 1 0 0\n1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 387, "matrix": [[1, 1, 0, 1], [1, 1, 1, 0], [0, 1, 0, 0], [1, 0, 0, 1]], "solution": [[2, 1, 0, 1], [1, 2, 1, 0], [0, 1, 0, 0], [1, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0\n1 1 0 1 1 1 1\n1 1 1 1 1 1 1\n0 1 1 1 1 0 1\n1 1 0 0 1 1 0\n1 0 0 0 1 0 0\n1 1 1 1 1 0 1\n", "answer": "3 2 1 1 0 1 0\n2 1 0 1 1 2 1\n1 2 1 2 2 1 2\n0 1 1 1 1 0 1\n1 1 0 0 1 1 0\n1 0 0 0 1 0 0\n2 1 1 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 388, "matrix": [[1, 1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1], [1, 1, 0, 0, 1, 1, 0], [1, 0, 0, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1]], "solution": [[3, 2, 1, 1, 0, 1, 0], [2, 1, 0, 1, 1, 2, 1], [1, 2, 1, 2, 2, 1, 2], [0, 1, 1, 1, 1, 0, 1], [1, 1, 0, 0, 1, 1, 0], [1, 0, 0, 0, 1, 0, 0], [2, 1, 1, 1, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1\n1 1 1 1 1 1 0\n1 1 1 1 1 1 0\n1 1 0 1 1 1 1\n1 1 1 1 1 1 1\n1 0 1 1 1 0 0\n1 0 1 1 1 1 1\n", "answer": "2 1 0 0 1 2 1\n3 2 1 1 2 1 0\n3 2 1 2 2 1 0\n2 1 0 1 2 2 1\n2 1 1 2 2 1 1\n1 0 1 2 1 0 0\n1 0 1 2 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 389, "matrix": [[1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 0, 1, 2, 1], [3, 2, 1, 1, 2, 1, 0], [3, 2, 1, 2, 2, 1, 0], [2, 1, 0, 1, 2, 2, 1], [2, 1, 1, 2, 2, 1, 1], [1, 0, 1, 2, 1, 0, 0], [1, 0, 1, 2, 2, 1, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 0 1 1\n1 1 0 1 1 0 1 0 1 1\n0 1 1 1 0 1 0 1 1 1\n1 1 0 1 1 1 1 1 1 1\n1 1 1 1 1 0 0 1 1 1\n1 0 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 0\n0 1 1 1 0 0 1 1 1 1\n1 1 0 1 1 1 1 1 1 1\n0 1 0 0 1 1 1 1 0 1\n", "answer": "1 0 1 2 2 1 1 0 1 2\n1 1 0 1 1 0 1 0 1 2\n0 1 1 1 0 1 0 1 2 3\n1 1 0 1 1 1 1 2 3 3\n2 1 1 2 1 0 0 1 2 2\n1 0 0 1 2 1 1 2 2 1\n1 1 1 2 1 1 2 2 1 0\n0 1 1 1 0 0 1 2 2 1\n1 1 0 1 1 1 2 2 1 2\n0 1 0 0 1 2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 390, "matrix": [[1, 0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 1, 1, 1, 1, 0, 1]], "solution": [[1, 0, 1, 2, 2, 1, 1, 0, 1, 2], [1, 1, 0, 1, 1, 0, 1, 0, 1, 2], [0, 1, 1, 1, 0, 1, 0, 1, 2, 3], [1, 1, 0, 1, 1, 1, 1, 2, 3, 3], [2, 1, 1, 2, 1, 0, 0, 1, 2, 2], [1, 0, 0, 1, 2, 1, 1, 2, 2, 1], [1, 1, 1, 2, 1, 1, 2, 2, 1, 0], [0, 1, 1, 1, 0, 0, 1, 2, 2, 1], [1, 1, 0, 1, 1, 1, 2, 2, 1, 2], [0, 1, 0, 0, 1, 2, 2, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1\n0 1 1 1 1 1\n0 1 0 1 1 1\n1 1 0 1 0 1\n1 1 1 1 1 1\n1 1 1 0 1 0\n", "answer": "1 0 1 2 3 4\n0 1 1 2 2 3\n0 1 0 1 1 2\n1 1 0 1 0 1\n2 2 1 1 1 1\n3 2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 391, "matrix": [[1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0]], "solution": [[1, 0, 1, 2, 3, 4], [0, 1, 1, 2, 2, 3], [0, 1, 0, 1, 1, 2], [1, 1, 0, 1, 0, 1], [2, 2, 1, 1, 1, 1], [3, 2, 1, 0, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1\n1 0 0 1 1 1 1 1\n1 1 0 1 0 0 1 1\n1 0 1 1 1 1 0 0\n0 1 0 1 0 1 1 0\n1 1 0 1 1 1 1 1\n", "answer": "0 1 2 2 1 0 1 1\n1 2 2 3 2 1 1 0\n2 1 1 2 2 2 2 1\n1 0 0 1 1 1 2 2\n2 1 0 1 0 0 1 1\n1 0 1 2 1 1 0 0\n0 1 0 1 0 1 1 0\n1 1 0 1 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 392, "matrix": [[0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[0, 1, 2, 2, 1, 0, 1, 1], [1, 2, 2, 3, 2, 1, 1, 0], [2, 1, 1, 2, 2, 2, 2, 1], [1, 0, 0, 1, 1, 1, 2, 2], [2, 1, 0, 1, 0, 0, 1, 1], [1, 0, 1, 2, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 2, 2, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 0 1 1 0 1\n1 1 1 1 0 1\n1 1 1 1 1 0\n1 1 1 0 0 0\n", "answer": "3 2 3 3 2 3\n2 1 2 2 1 2\n1 0 1 1 0 1\n2 1 2 1 0 1\n3 2 2 1 1 0\n3 2 1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 393, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 0]], "solution": [[3, 2, 3, 3, 2, 3], [2, 1, 2, 2, 1, 2], [1, 0, 1, 1, 0, 1], [2, 1, 2, 1, 0, 1], [3, 2, 2, 1, 1, 0], [3, 2, 1, 0, 0, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 0 1 1 1 1\n1 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 1\n0 1 1 0 1 1 1 1 1\n1 1 1 1 0 1 1 1 0\n0 1 1 1 1 1 0 0 0\n0 0 1 0 0 1 1 0 0\n1 1 1 1 1 0 1 1 0\n", "answer": "3 2 1 0 0 1 2 3 4\n3 2 1 1 1 2 3 4 4\n2 1 0 1 2 1 2 3 3\n1 2 1 1 1 0 1 2 2\n0 1 1 0 1 1 2 2 1\n1 2 2 1 0 1 1 1 0\n0 1 2 1 1 1 0 0 0\n0 0 1 0 0 1 1 0 0\n1 1 2 1 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 394, "matrix": [[1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 1, 0, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1, 1, 0]], "solution": [[3, 2, 1, 0, 0, 1, 2, 3, 4], [3, 2, 1, 1, 1, 2, 3, 4, 4], [2, 1, 0, 1, 2, 1, 2, 3, 3], [1, 2, 1, 1, 1, 0, 1, 2, 2], [0, 1, 1, 0, 1, 1, 2, 2, 1], [1, 2, 2, 1, 0, 1, 1, 1, 0], [0, 1, 2, 1, 1, 1, 0, 0, 0], [0, 0, 1, 0, 0, 1, 1, 0, 0], [1, 1, 2, 1, 1, 0, 1, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0 1 1 1\n1 1 1 1 1 0 0\n1 1 1 0 0 1 1\n1 0 1 1 1 1 0\n1 1 1 0 0 1 1\n1 0 1 1 1 1 1\n1 1 0 1 0 1 1\n", "answer": "1 0 0 0 1 1 1\n2 1 1 1 1 0 0\n2 1 1 0 0 1 1\n1 0 1 1 1 1 0\n2 1 1 0 0 1 1\n1 0 1 1 1 2 2\n2 1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 395, "matrix": [[1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1]], "solution": [[1, 0, 0, 0, 1, 1, 1], [2, 1, 1, 1, 1, 0, 0], [2, 1, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1, 0], [2, 1, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 2, 2], [2, 1, 0, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 1\n0 0 1 0 1 1\n0 1 1 0 0 1\n1 1 0 0 1 1\n1 1 0 1 1 1\n1 1 0 1 1 1\n", "answer": "1 0 0 1 2 3\n0 0 1 0 1 2\n0 1 1 0 0 1\n1 1 0 0 1 2\n2 1 0 1 2 3\n2 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 396, "matrix": [[1, 0, 0, 1, 1, 1], [0, 0, 1, 0, 1, 1], [0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1]], "solution": [[1, 0, 0, 1, 2, 3], [0, 0, 1, 0, 1, 2], [0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 2], [2, 1, 0, 1, 2, 3], [2, 1, 0, 1, 2, 3]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 1 0 0\n1 1 1 1 0 0 1 1 1\n1 1 1 1 1 1 1 1 1\n1 1 0 0 0 1 0 0 0\n0 0 0 0 1 1 0 1 1\n1 0 1 1 0 1 1 1 1\n1 0 1 1 1 1 0 1 1\n1 1 0 1 1 0 1 1 1\n1 1 1 0 1 0 1 0 1\n", "answer": "3 2 1 0 1 0 1 0 0\n3 3 2 1 0 0 1 1 1\n2 2 1 1 1 1 1 1 1\n1 1 0 0 0 1 0 0 0\n0 0 0 0 1 1 0 1 1\n1 0 1 1 0 1 1 2 2\n1 0 1 2 1 1 0 1 2\n2 1 0 1 1 0 1 1 2\n3 2 1 0 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 397, "matrix": [[1, 1, 1, 0, 1, 0, 1, 0, 0], [1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 0, 1]], "solution": [[3, 2, 1, 0, 1, 0, 1, 0, 0], [3, 3, 2, 1, 0, 0, 1, 1, 1], [2, 2, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 1, 2, 2], [1, 0, 1, 2, 1, 1, 0, 1, 2], [2, 1, 0, 1, 1, 0, 1, 1, 2], [3, 2, 1, 0, 1, 0, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 1 1 1\n1 0 0 1\n0 0 1 0\n", "answer": "2 1 0 1\n2 1 1 2\n1 0 0 1\n0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 398, "matrix": [[1, 1, 0, 1], [1, 1, 1, 1], [1, 0, 0, 1], [0, 0, 1, 0]], "solution": [[2, 1, 0, 1], [2, 1, 1, 2], [1, 0, 0, 1], [0, 0, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1\n1 1 0 1 1\n1 0 1 1 1\n1 1 1 0 1\n1 1 1 1 0\n", "answer": "0 0 1 2 3\n1 1 0 1 2\n1 0 1 1 2\n2 1 1 0 1\n3 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 399, "matrix": [[0, 0, 1, 1, 1], [1, 1, 0, 1, 1], [1, 0, 1, 1, 1], [1, 1, 1, 0, 1], [1, 1, 1, 1, 0]], "solution": [[0, 0, 1, 2, 3], [1, 1, 0, 1, 2], [1, 0, 1, 1, 2], [2, 1, 1, 0, 1], [3, 2, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 0 1\n1 0 1 0 1 0 0 0\n0 1 0 1 1 1 1 0\n1 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1\n1 0 1 1 0 1 1 1\n1 1 1 0 0 1 1 1\n", "answer": "2 1 1 0 1 0 0 1\n1 0 1 0 1 0 0 0\n0 1 0 1 2 1 1 0\n1 2 1 2 3 2 1 0\n2 2 2 3 2 1 2 1\n2 1 2 2 1 0 1 2\n1 0 1 1 0 1 2 3\n2 1 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 400, "matrix": [[1, 1, 1, 0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1]], "solution": [[2, 1, 1, 0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 2, 1, 1, 0], [1, 2, 1, 2, 3, 2, 1, 0], [2, 2, 2, 3, 2, 1, 2, 1], [2, 1, 2, 2, 1, 0, 1, 2], [1, 0, 1, 1, 0, 1, 2, 3], [2, 1, 1, 0, 0, 1, 2, 3]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0\n1 1 0 1 1\n1 1 0 1 1\n0 0 1 0 1\n0 1 1 0 1\n", "answer": "0 1 1 1 0\n1 1 0 1 1\n1 1 0 1 2\n0 0 1 0 1\n0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 401, "matrix": [[0, 1, 1, 1, 0], [1, 1, 0, 1, 1], [1, 1, 0, 1, 1], [0, 0, 1, 0, 1], [0, 1, 1, 0, 1]], "solution": [[0, 1, 1, 1, 0], [1, 1, 0, 1, 1], [1, 1, 0, 1, 2], [0, 0, 1, 0, 1], [0, 1, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 1 1 1 1 0 1\n1 0 1 0 0 1 1\n1 1 1 1 1 1 1\n1 1 1 1 1 1 0\n1 0 0 0 0 0 1\n1 1 1 1 0 1 1\n", "answer": "3 2 3 2 2 1 2\n2 1 2 1 1 0 1\n1 0 1 0 0 1 2\n2 1 2 1 1 2 1\n2 1 1 1 1 1 0\n1 0 0 0 0 0 1\n2 1 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 402, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1]], "solution": [[3, 2, 3, 2, 2, 1, 2], [2, 1, 2, 1, 1, 0, 1], [1, 0, 1, 0, 0, 1, 2], [2, 1, 2, 1, 1, 2, 1], [2, 1, 1, 1, 1, 1, 0], [1, 0, 0, 0, 0, 0, 1], [2, 1, 1, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 0 0\n0 1 1 1 1 1 1 0 1\n1 1 1 0 1 1 0 1 1\n1 1 1 1 1 1 1 1 1\n1 0 1 1 0 0 1 1 0\n1 1 1 1 0 1 1 1 1\n0 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 0 1\n", "answer": "2 3 4 3 2 1 0 1 1\n1 2 3 2 3 2 1 0 0\n0 1 2 1 2 2 1 0 1\n1 2 1 0 1 1 0 1 2\n2 1 2 1 1 1 1 2 1\n1 0 1 1 0 0 1 1 0\n1 1 2 1 0 1 1 2 1\n0 1 2 2 1 1 0 1 2\n1 2 3 3 2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 403, "matrix": [[1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1]], "solution": [[2, 3, 4, 3, 2, 1, 0, 1, 1], [1, 2, 3, 2, 3, 2, 1, 0, 0], [0, 1, 2, 1, 2, 2, 1, 0, 1], [1, 2, 1, 0, 1, 1, 0, 1, 2], [2, 1, 2, 1, 1, 1, 1, 2, 1], [1, 0, 1, 1, 0, 0, 1, 1, 0], [1, 1, 2, 1, 0, 1, 1, 2, 1], [0, 1, 2, 2, 1, 1, 0, 1, 2], [1, 2, 3, 3, 2, 2, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 0 0 1 0 1 1\n1 0 1 1 1 1 0 0 1 1\n1 1 0 0 1 1 1 1 1 1\n1 1 1 0 1 0 1 0 1 0\n1 0 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 1 0\n1 1 1 1 0 1 1 1 1 0\n1 1 1 1 1 1 0 1 0 1\n", "answer": "3 2 3 2 1 1 2 1 2 3\n2 1 2 1 0 0 1 0 1 2\n1 0 1 1 1 1 0 0 1 2\n2 1 0 0 1 1 1 1 2 1\n2 1 1 0 1 0 1 0 1 0\n1 0 1 1 2 1 2 1 2 1\n1 1 1 0 1 2 3 2 2 1\n0 1 2 1 1 2 2 2 1 0\n1 2 2 1 0 1 1 2 1 0\n2 3 3 2 1 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 404, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 0, 1]], "solution": [[3, 2, 3, 2, 1, 1, 2, 1, 2, 3], [2, 1, 2, 1, 0, 0, 1, 0, 1, 2], [1, 0, 1, 1, 1, 1, 0, 0, 1, 2], [2, 1, 0, 0, 1, 1, 1, 1, 2, 1], [2, 1, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 2, 1, 2, 1, 2, 1], [1, 1, 1, 0, 1, 2, 3, 2, 2, 1], [0, 1, 2, 1, 1, 2, 2, 2, 1, 0], [1, 2, 2, 1, 0, 1, 1, 2, 1, 0], [2, 3, 3, 2, 1, 1, 0, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1 1 0\n0 1 1 1 0 1 0 1 1\n1 1 1 0 1 1 1 1 1\n1 1 0 1 0 1 1 1 0\n0 1 1 1 1 0 1 1 1\n1 1 0 1 1 1 1 0 1\n1 1 0 1 0 1 1 1 1\n1 1 1 1 0 1 0 1 0\n1 1 0 1 1 1 0 1 1\n", "answer": "1 1 0 0 1 2 1 1 0\n0 1 1 1 0 1 0 1 1\n1 2 1 0 1 2 1 2 1\n1 1 0 1 0 1 2 1 0\n0 1 1 2 1 0 1 1 1\n1 1 0 1 1 1 1 0 1\n2 1 0 1 0 1 1 1 1\n3 2 1 1 0 1 0 1 0\n2 1 0 1 1 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 405, "matrix": [[1, 1, 0, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1, 0, 1, 1]], "solution": [[1, 1, 0, 0, 1, 2, 1, 1, 0], [0, 1, 1, 1, 0, 1, 0, 1, 1], [1, 2, 1, 0, 1, 2, 1, 2, 1], [1, 1, 0, 1, 0, 1, 2, 1, 0], [0, 1, 1, 2, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1], [2, 1, 0, 1, 0, 1, 1, 1, 1], [3, 2, 1, 1, 0, 1, 0, 1, 0], [2, 1, 0, 1, 1, 1, 0, 1, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 1 1 1 1 1 0\n1 0 0 1 1 1 1\n1 0 1 1 1 1 0\n0 1 1 0 1 1 0\n1 1 1 1 0 0 1\n1 1 1 1 1 1 1\n", "answer": "3 2 2 3 3 2 1\n2 1 1 2 2 1 0\n1 0 0 1 2 2 1\n1 0 1 1 2 1 0\n0 1 1 0 1 1 0\n1 2 2 1 0 0 1\n2 3 3 2 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 406, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]], "solution": [[3, 2, 2, 3, 3, 2, 1], [2, 1, 1, 2, 2, 1, 0], [1, 0, 0, 1, 2, 2, 1], [1, 0, 1, 1, 2, 1, 0], [0, 1, 1, 0, 1, 1, 0], [1, 2, 2, 1, 0, 0, 1], [2, 3, 3, 2, 1, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 0 1 0 0\n1 1 0 1 1 1\n0 1 1 0 0 1\n1 1 1 0 1 1\n", "answer": "4 3 2 3 2 2\n3 2 1 2 1 1\n2 1 0 1 0 0\n1 1 0 1 1 1\n0 1 1 0 0 1\n1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 407, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 0], [1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1]], "solution": [[4, 3, 2, 3, 2, 2], [3, 2, 1, 2, 1, 1], [2, 1, 0, 1, 0, 0], [1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 0, 1], [1, 2, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0 0\n1 0 1 1\n1 1 1 1\n0 1 0 1\n", "answer": "0 0 0 0\n1 0 1 1\n1 1 1 2\n0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 408, "matrix": [[0, 0, 0, 0], [1, 0, 1, 1], [1, 1, 1, 1], [0, 1, 0, 1]], "solution": [[0, 0, 0, 0], [1, 0, 1, 1], [1, 1, 1, 2], [0, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 1\n0 1 1\n", "answer": "0 1 2\n1 2 3\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 409, "matrix": [[0, 1, 1], [1, 1, 1], [0, 1, 1]], "solution": [[0, 1, 2], [1, 2, 3], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 0 1\n1 1 1 1 0 1 1 1\n1 1 1 1 0 1 1 1\n0 1 1 0 1 1 1 0\n1 0 1 1 1 0 1 1\n1 1 1 1 0 0 0 1\n1 1 1 0 1 0 1 1\n1 1 0 1 0 1 1 0\n", "answer": "0 1 2 2 1 1 0 1\n1 2 2 1 0 1 1 2\n1 2 2 1 0 1 2 1\n0 1 1 0 1 1 1 0\n1 0 1 1 1 0 1 1\n2 1 2 1 0 0 0 1\n3 2 1 0 1 0 1 1\n2 1 0 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 410, "matrix": [[0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0]], "solution": [[0, 1, 2, 2, 1, 1, 0, 1], [1, 2, 2, 1, 0, 1, 1, 2], [1, 2, 2, 1, 0, 1, 2, 1], [0, 1, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1], [2, 1, 2, 1, 0, 0, 0, 1], [3, 2, 1, 0, 1, 0, 1, 1], [2, 1, 0, 1, 0, 1, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0\n0 1 1 1 1 1\n1 1 0 1 1 1\n0 1 0 1 1 1\n1 0 1 1 1 1\n1 1 1 1 1 1\n", "answer": "0 1 2 2 1 0\n0 1 1 2 2 1\n1 1 0 1 2 2\n0 1 0 1 2 3\n1 0 1 2 3 4\n2 1 2 3 4 5", "metadata": {"source_dataset": "binary_matrix", "source_index": 411, "matrix": [[0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 2, 2, 1, 0], [0, 1, 1, 2, 2, 1], [1, 1, 0, 1, 2, 2], [0, 1, 0, 1, 2, 3], [1, 0, 1, 2, 3, 4], [2, 1, 2, 3, 4, 5]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 0 1 1\n1 0 1 1 1 1 1\n1 1 1 1 0 0 1\n0 1 1 0 1 1 1\n1 1 1 1 0 1 1\n1 1 1 1 0 0 0\n1 0 0 1 0 1 1\n", "answer": "1 0 0 1 0 1 2\n1 0 1 2 1 1 2\n1 1 2 1 0 0 1\n0 1 1 0 1 1 2\n1 2 2 1 0 1 1\n2 1 1 1 0 0 0\n1 0 0 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 412, "matrix": [[1, 0, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1], [0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 0], [1, 0, 0, 1, 0, 1, 1]], "solution": [[1, 0, 0, 1, 0, 1, 2], [1, 0, 1, 2, 1, 1, 2], [1, 1, 2, 1, 0, 0, 1], [0, 1, 1, 0, 1, 1, 2], [1, 2, 2, 1, 0, 1, 1], [2, 1, 1, 1, 0, 0, 0], [1, 0, 0, 1, 0, 1, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0\n1 0 1\n1 1 1\n", "answer": "1 0 0\n1 0 1\n2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 413, "matrix": [[1, 0, 0], [1, 0, 1], [1, 1, 1]], "solution": [[1, 0, 0], [1, 0, 1], [2, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0 0 1 1 1 0\n1 1 1 1 1 1 0 1 0 1\n1 1 0 1 0 1 1 1 0 1\n1 0 1 1 1 0 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1 1 1\n0 1 1 1 1 0 1 0 1 1\n1 0 1 1 0 0 1 0 0 1\n", "answer": "0 1 1 0 0 0 1 2 1 0\n1 2 1 1 1 1 0 1 0 1\n2 1 0 1 0 1 1 1 0 1\n1 0 1 2 1 0 1 2 1 2\n1 1 2 3 2 1 2 3 2 3\n0 1 2 3 3 2 3 3 3 4\n1 0 1 2 3 2 3 2 3 4\n1 0 1 2 2 1 2 1 2 3\n0 1 2 2 1 0 1 0 1 2\n1 0 1 1 0 0 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 414, "matrix": [[0, 1, 1, 0, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 0, 0, 1, 0, 0, 1]], "solution": [[0, 1, 1, 0, 0, 0, 1, 2, 1, 0], [1, 2, 1, 1, 1, 1, 0, 1, 0, 1], [2, 1, 0, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 2, 1, 0, 1, 2, 1, 2], [1, 1, 2, 3, 2, 1, 2, 3, 2, 3], [0, 1, 2, 3, 3, 2, 3, 3, 3, 4], [1, 0, 1, 2, 3, 2, 3, 2, 3, 4], [1, 0, 1, 2, 2, 1, 2, 1, 2, 3], [0, 1, 2, 2, 1, 0, 1, 0, 1, 2], [1, 0, 1, 1, 0, 0, 1, 0, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 0 0 1\n0 1 1 1 1\n0 1 0 1 0\n1 1 1 1 0\n", "answer": "2 2 1 1 2\n1 1 0 0 1\n0 1 1 1 1\n0 1 0 1 0\n1 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 415, "matrix": [[1, 1, 1, 1, 1], [1, 1, 0, 0, 1], [0, 1, 1, 1, 1], [0, 1, 0, 1, 0], [1, 1, 1, 1, 0]], "solution": [[2, 2, 1, 1, 2], [1, 1, 0, 0, 1], [0, 1, 1, 1, 1], [0, 1, 0, 1, 0], [1, 2, 1, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1\n1 0 1 1\n0 1 1 1\n1 1 1 1\n", "answer": "0 1 2 3\n1 0 1 2\n0 1 2 3\n1 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 416, "matrix": [[0, 1, 1, 1], [1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1]], "solution": [[0, 1, 2, 3], [1, 0, 1, 2], [0, 1, 2, 3], [1, 2, 3, 4]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1\n1 1 1 1 1\n0 0 1 1 0\n1 1 1 0 1\n1 1 1 1 1\n", "answer": "1 0 1 2 2\n1 1 2 2 1\n0 0 1 1 0\n1 1 1 0 1\n2 2 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 417, "matrix": [[1, 0, 1, 1, 1], [1, 1, 1, 1, 1], [0, 0, 1, 1, 0], [1, 1, 1, 0, 1], [1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 2, 2], [1, 1, 2, 2, 1], [0, 0, 1, 1, 0], [1, 1, 1, 0, 1], [2, 2, 2, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 1\n1 1 0 1 1 1 1\n1 1 1 1 1 0 1\n0 0 1 1 1 1 0\n1 1 0 1 1 1 1\n0 1 1 1 1 1 1\n1 1 1 1 0 0 1\n", "answer": "2 1 0 1 0 1 2\n2 1 0 1 1 1 2\n1 1 1 2 1 0 1\n0 0 1 2 2 1 0\n1 1 0 1 2 2 1\n0 1 1 2 1 1 2\n1 2 2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 418, "matrix": [[1, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [0, 0, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1]], "solution": [[2, 1, 0, 1, 0, 1, 2], [2, 1, 0, 1, 1, 1, 2], [1, 1, 1, 2, 1, 0, 1], [0, 0, 1, 2, 2, 1, 0], [1, 1, 0, 1, 2, 2, 1], [0, 1, 1, 2, 1, 1, 2], [1, 2, 2, 1, 0, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 0 0\n1 1 1 1 1 1 1 1\n1 1 1 0 1 0 1 1\n1 1 1 1 1 1 1 1\n0 1 0 1 1 1 1 1\n0 1 1 1 0 1 0 0\n1 1 1 1 1 1 1 1\n1 1 1 0 0 0 0 1\n", "answer": "2 1 0 1 2 1 0 0\n3 2 1 1 2 1 1 1\n2 2 1 0 1 0 1 2\n1 2 1 1 2 1 2 2\n0 1 0 1 1 2 1 1\n0 1 1 1 0 1 0 0\n1 2 2 1 1 1 1 1\n2 2 1 0 0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 419, "matrix": [[1, 1, 0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 0, 1]], "solution": [[2, 1, 0, 1, 2, 1, 0, 0], [3, 2, 1, 1, 2, 1, 1, 1], [2, 2, 1, 0, 1, 0, 1, 2], [1, 2, 1, 1, 2, 1, 2, 2], [0, 1, 0, 1, 1, 2, 1, 1], [0, 1, 1, 1, 0, 1, 0, 0], [1, 2, 2, 1, 1, 1, 1, 1], [2, 2, 1, 0, 0, 0, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n0 1 0 1\n1 1 1 1\n0 1 0 1\n", "answer": "1 1 0 1\n0 1 0 1\n1 2 1 2\n0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 420, "matrix": [[1, 1, 0, 1], [0, 1, 0, 1], [1, 1, 1, 1], [0, 1, 0, 1]], "solution": [[1, 1, 0, 1], [0, 1, 0, 1], [1, 2, 1, 2], [0, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 1\n0 1 1 0 1 0\n1 0 1 1 1 1\n0 1 1 1 1 1\n1 1 0 1 1 0\n1 1 0 1 1 1\n", "answer": "1 0 0 1 2 1\n0 1 1 0 1 0\n1 0 1 1 2 1\n0 1 1 2 2 1\n1 1 0 1 1 0\n2 1 0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 421, "matrix": [[1, 0, 0, 1, 1, 1], [0, 1, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1]], "solution": [[1, 0, 0, 1, 2, 1], [0, 1, 1, 0, 1, 0], [1, 0, 1, 1, 2, 1], [0, 1, 1, 2, 2, 1], [1, 1, 0, 1, 1, 0], [2, 1, 0, 1, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 0 1 0 1 1 0\n0 0 1 1 1 1 0\n0 1 1 1 1 1 1\n1 0 1 1 0 1 1\n1 1 1 1 1 0 1\n1 1 0 1 0 1 1\n", "answer": "2 1 2 1 2 2 1\n1 0 1 0 1 1 0\n0 0 1 1 2 1 0\n0 1 2 2 1 2 1\n1 0 1 1 0 1 2\n2 1 1 2 1 0 1\n2 1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 422, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0], [0, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1]], "solution": [[2, 1, 2, 1, 2, 2, 1], [1, 0, 1, 0, 1, 1, 0], [0, 0, 1, 1, 2, 1, 0], [0, 1, 2, 2, 1, 2, 1], [1, 0, 1, 1, 0, 1, 2], [2, 1, 1, 2, 1, 0, 1], [2, 1, 0, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1\n1 0 1 1 1 1\n1 1 0 0 1 0\n0 0 1 0 0 1\n1 1 0 0 1 1\n1 1 1 1 0 1\n", "answer": "1 0 1 2 3 2\n1 0 1 1 2 1\n1 1 0 0 1 0\n0 0 1 0 0 1\n1 1 0 0 1 2\n2 2 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 423, "matrix": [[1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 1, 0], [0, 0, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1]], "solution": [[1, 0, 1, 2, 3, 2], [1, 0, 1, 1, 2, 1], [1, 1, 0, 0, 1, 0], [0, 0, 1, 0, 0, 1], [1, 1, 0, 0, 1, 2], [2, 2, 1, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n0 1 1\n1 0 0\n", "answer": "0 1 0\n0 1 1\n1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 424, "matrix": [[0, 1, 0], [0, 1, 1], [1, 0, 0]], "solution": [[0, 1, 0], [0, 1, 1], [1, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 0\n0 1 0 1 1 0 1\n1 1 1 0 0 1 1\n0 1 1 1 1 0 0\n1 0 0 1 1 1 0\n0 1 0 0 1 1 1\n1 1 0 1 1 1 0\n", "answer": "1 0 1 2 2 1 0\n0 1 0 1 1 0 1\n1 2 1 0 0 1 1\n0 1 1 1 1 0 0\n1 0 0 1 2 1 0\n0 1 0 0 1 2 1\n1 1 0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 425, "matrix": [[1, 0, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 0, 1], [1, 1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 0, 0], [1, 0, 0, 1, 1, 1, 0], [0, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0]], "solution": [[1, 0, 1, 2, 2, 1, 0], [0, 1, 0, 1, 1, 0, 1], [1, 2, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 0, 0], [1, 0, 0, 1, 2, 1, 0], [0, 1, 0, 0, 1, 2, 1], [1, 1, 0, 1, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0\n1 1 0 0 1 1\n0 0 1 1 0 0\n1 1 1 1 1 1\n0 1 0 1 0 0\n1 1 1 0 1 1\n", "answer": "0 1 1 1 1 0\n1 1 0 0 1 1\n0 0 1 1 0 0\n1 1 1 2 1 1\n0 1 0 1 0 0\n1 2 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 426, "matrix": [[0, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1], [0, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 0], [1, 1, 1, 0, 1, 1]], "solution": [[0, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1], [0, 0, 1, 1, 0, 0], [1, 1, 1, 2, 1, 1], [0, 1, 0, 1, 0, 0], [1, 2, 1, 0, 1, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1\n1 1 1 1 1 1 1\n1 1 1 0 1 1 1\n0 1 1 1 1 1 1\n1 1 0 0 0 1 1\n1 1 0 1 1 1 1\n1 1 0 1 0 1 1\n", "answer": "2 1 0 1 2 3 4\n2 2 1 1 2 3 4\n1 2 1 0 1 2 3\n0 1 1 1 1 2 3\n1 1 0 0 0 1 2\n2 1 0 1 1 2 3\n2 1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 427, "matrix": [[1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1]], "solution": [[2, 1, 0, 1, 2, 3, 4], [2, 2, 1, 1, 2, 3, 4], [1, 2, 1, 0, 1, 2, 3], [0, 1, 1, 1, 1, 2, 3], [1, 1, 0, 0, 0, 1, 2], [2, 1, 0, 1, 1, 2, 3], [2, 1, 0, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 0\n0 0 1\n", "answer": "2 2 1\n1 1 0\n0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 428, "matrix": [[1, 1, 1], [1, 1, 0], [0, 0, 1]], "solution": [[2, 2, 1], [1, 1, 0], [0, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 0 1 1\n1 1 1 0\n1 1 1 1\n", "answer": "2 1 2 2\n1 0 1 1\n2 1 1 0\n3 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 429, "matrix": [[1, 1, 1, 1], [1, 0, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1]], "solution": [[2, 1, 2, 2], [1, 0, 1, 1], [2, 1, 1, 0], [3, 2, 2, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 0\n1 1 1 1 1\n1 1 0 1 0\n1 1 0 0 0\n1 1 1 1 1\n", "answer": "2 1 0 0 0\n3 2 1 1 1\n2 1 0 1 0\n2 1 0 0 0\n3 2 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 430, "matrix": [[1, 1, 0, 0, 0], [1, 1, 1, 1, 1], [1, 1, 0, 1, 0], [1, 1, 0, 0, 0], [1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 0, 0], [3, 2, 1, 1, 1], [2, 1, 0, 1, 0], [2, 1, 0, 0, 0], [3, 2, 1, 1, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1\n1 0 1 1 0 0 0 1\n1 0 1 1 0 1 1 1\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 0\n1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1\n", "answer": "2 1 2 2 1 1 1 2\n1 0 1 1 0 0 0 1\n1 0 1 1 0 1 1 2\n2 1 2 2 1 2 1 1\n2 1 2 3 2 1 0 0\n1 0 1 2 3 2 1 1\n2 1 2 3 3 2 1 2\n3 2 3 3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 431, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 0, 0, 1], [1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1]], "solution": [[2, 1, 2, 2, 1, 1, 1, 2], [1, 0, 1, 1, 0, 0, 0, 1], [1, 0, 1, 1, 0, 1, 1, 2], [2, 1, 2, 2, 1, 2, 1, 1], [2, 1, 2, 3, 2, 1, 0, 0], [1, 0, 1, 2, 3, 2, 1, 1], [2, 1, 2, 3, 3, 2, 1, 2], [3, 2, 3, 3, 2, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0\n1 0 1 1\n0 1 1 1\n0 1 1 1\n", "answer": "0 1 0 0\n1 0 1 1\n0 1 2 2\n0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 432, "matrix": [[0, 1, 0, 0], [1, 0, 1, 1], [0, 1, 1, 1], [0, 1, 1, 1]], "solution": [[0, 1, 0, 0], [1, 0, 1, 1], [0, 1, 2, 2], [0, 1, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n0 0 1 1\n1 1 0 1\n0 0 1 1\n", "answer": "1 1 2 3\n0 0 1 2\n1 1 0 1\n0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 433, "matrix": [[1, 1, 1, 1], [0, 0, 1, 1], [1, 1, 0, 1], [0, 0, 1, 1]], "solution": [[1, 1, 2, 3], [0, 0, 1, 2], [1, 1, 0, 1], [0, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1 1 0 1 1\n1 1 1 1 0 1 1 1 0 1\n1 1 1 1 0 0 0 1 0 0\n1 1 0 1 1 1 1 1 0 0\n1 1 1 1 0 0 1 1 1 1\n1 0 1 0 1 0 0 1 1 1\n1 0 1 1 1 1 0 0 1 1\n1 1 1 1 0 1 1 1 1 1\n0 1 1 1 1 0 0 0 1 1\n1 1 0 1 1 1 1 0 1 1\n", "answer": "0 1 2 1 0 1 1 0 1 2\n1 2 2 1 0 1 1 1 0 1\n2 2 1 1 0 0 0 1 0 0\n2 1 0 1 1 1 1 1 0 0\n2 1 1 1 0 0 1 2 1 1\n1 0 1 0 1 0 0 1 2 2\n1 0 1 1 1 1 0 0 1 2\n1 1 2 1 0 1 1 1 2 3\n0 1 1 2 1 0 0 0 1 2\n1 1 0 1 2 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 434, "matrix": [[0, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 0, 1, 0, 0], [1, 1, 0, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1]], "solution": [[0, 1, 2, 1, 0, 1, 1, 0, 1, 2], [1, 2, 2, 1, 0, 1, 1, 1, 0, 1], [2, 2, 1, 1, 0, 0, 0, 1, 0, 0], [2, 1, 0, 1, 1, 1, 1, 1, 0, 0], [2, 1, 1, 1, 0, 0, 1, 2, 1, 1], [1, 0, 1, 0, 1, 0, 0, 1, 2, 2], [1, 0, 1, 1, 1, 1, 0, 0, 1, 2], [1, 1, 2, 1, 0, 1, 1, 1, 2, 3], [0, 1, 1, 2, 1, 0, 0, 0, 1, 2], [1, 1, 0, 1, 2, 1, 1, 0, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 0 1 1 1\n1 0 1 0 1 1 1 1 1\n1 1 0 1 1 1 1 1 1\n1 1 1 0 1 1 1 0 1\n1 0 1 1 1 0 1 1 1\n1 1 1 1 1 1 0 1 1\n1 1 1 1 1 0 1 1 0\n0 0 0 0 1 0 1 1 1\n1 0 1 0 1 0 1 1 1\n", "answer": "1 0 1 1 1 0 1 2 3\n1 0 1 0 1 1 2 2 3\n2 1 0 1 2 2 2 1 2\n2 1 1 0 1 1 1 0 1\n1 0 1 1 1 0 1 1 2\n2 1 2 2 2 1 0 1 1\n1 1 1 1 1 0 1 1 0\n0 0 0 0 1 0 1 2 1\n1 0 1 0 1 0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 435, "matrix": [[1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0], [0, 0, 0, 0, 1, 0, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 1, 1]], "solution": [[1, 0, 1, 1, 1, 0, 1, 2, 3], [1, 0, 1, 0, 1, 1, 2, 2, 3], [2, 1, 0, 1, 2, 2, 2, 1, 2], [2, 1, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 2], [2, 1, 2, 2, 2, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0], [0, 0, 0, 0, 1, 0, 1, 2, 1], [1, 0, 1, 0, 1, 0, 1, 2, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 0 1 1 1\n1 1 0 0 1 1 1 1\n0 1 1 0 0 0 0 1\n1 1 1 1 1 1 0 1\n0 0 0 1 1 0 0 1\n1 1 0 1 1 1 1 1\n0 1 1 0 0 1 1 0\n1 1 0 1 1 1 1 1\n", "answer": "2 1 0 0 0 1 2 3\n1 1 0 0 1 1 1 2\n0 1 1 0 0 0 0 1\n1 1 1 1 1 1 0 1\n0 0 0 1 1 0 0 1\n1 1 0 1 1 1 1 1\n0 1 1 0 0 1 1 0\n1 1 0 1 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 436, "matrix": [[1, 1, 0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1], [0, 1, 1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1], [0, 0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 0, 0, 1, 2, 3], [1, 1, 0, 0, 1, 1, 1, 2], [0, 1, 1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1], [0, 0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1, 0], [1, 1, 0, 1, 1, 2, 2, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 1 1 1\n1 0 1 1 1 1 0 0 1\n0 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 1\n0 1 0 1 0 0 0 0 1\n1 1 1 1 0 1 1 1 1\n0 1 1 1 0 1 0 1 1\n", "answer": "0 1 2 2 1 0 1 1 2\n1 0 1 2 2 1 0 0 1\n0 1 2 3 2 1 0 1 2\n1 2 3 3 2 2 1 2 3\n0 1 2 2 1 2 2 2 3\n1 2 1 1 0 1 1 1 2\n0 1 0 1 0 0 0 0 1\n1 2 1 1 0 1 1 1 2\n0 1 2 1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 437, "matrix": [[0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1]], "solution": [[0, 1, 2, 2, 1, 0, 1, 1, 2], [1, 0, 1, 2, 2, 1, 0, 0, 1], [0, 1, 2, 3, 2, 1, 0, 1, 2], [1, 2, 3, 3, 2, 2, 1, 2, 3], [0, 1, 2, 2, 1, 2, 2, 2, 3], [1, 2, 1, 1, 0, 1, 1, 1, 2], [0, 1, 0, 1, 0, 0, 0, 0, 1], [1, 2, 1, 1, 0, 1, 1, 1, 2], [0, 1, 2, 1, 0, 1, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0 1 1\n0 0 0 1 1 1 1 0 1\n0 0 1 0 1 1 0 1 1\n1 1 1 1 1 1 0 1 1\n1 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1\n1 1 0 1 1 1 0 1 1\n1 1 0 0 1 0 1 1 1\n1 1 1 1 1 1 1 0 0\n", "answer": "1 1 1 1 0 1 0 1 2\n0 0 0 1 1 2 1 0 1\n0 0 1 0 1 1 0 1 2\n1 1 2 1 2 1 0 1 2\n1 0 1 2 3 2 1 2 3\n2 1 1 2 2 1 0 1 2\n2 1 0 1 2 1 0 1 2\n2 1 0 0 1 0 1 1 1\n3 2 1 1 2 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 438, "matrix": [[1, 1, 1, 1, 0, 1, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0]], "solution": [[1, 1, 1, 1, 0, 1, 0, 1, 2], [0, 0, 0, 1, 1, 2, 1, 0, 1], [0, 0, 1, 0, 1, 1, 0, 1, 2], [1, 1, 2, 1, 2, 1, 0, 1, 2], [1, 0, 1, 2, 3, 2, 1, 2, 3], [2, 1, 1, 2, 2, 1, 0, 1, 2], [2, 1, 0, 1, 2, 1, 0, 1, 2], [2, 1, 0, 0, 1, 0, 1, 1, 1], [3, 2, 1, 1, 2, 1, 1, 0, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 1 0 1\n1 1 1 1 1 1 0 0 1 1\n1 1 1 1 1 0 1 1 1 1\n1 0 0 1 1 1 1 1 0 1\n0 1 0 1 1 1 1 1 1 1\n1 0 1 0 1 1 0 1 0 1\n1 1 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 0 1 1 1\n1 0 1 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 0 0 1\n", "answer": "1 0 1 2 3 2 1 1 0 1\n2 1 2 3 2 1 0 0 1 2\n2 1 1 2 1 0 1 1 1 2\n1 0 0 1 2 1 2 1 0 1\n0 1 0 1 2 2 1 2 1 2\n1 0 1 0 1 1 0 1 0 1\n2 1 2 1 2 2 1 0 1 2\n2 1 2 2 1 1 0 1 2 3\n1 0 1 1 0 1 1 1 1 2\n2 1 2 2 1 2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 439, "matrix": [[1, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 1]], "solution": [[1, 0, 1, 2, 3, 2, 1, 1, 0, 1], [2, 1, 2, 3, 2, 1, 0, 0, 1, 2], [2, 1, 1, 2, 1, 0, 1, 1, 1, 2], [1, 0, 0, 1, 2, 1, 2, 1, 0, 1], [0, 1, 0, 1, 2, 2, 1, 2, 1, 2], [1, 0, 1, 0, 1, 1, 0, 1, 0, 1], [2, 1, 2, 1, 2, 2, 1, 0, 1, 2], [2, 1, 2, 2, 1, 1, 0, 1, 2, 3], [1, 0, 1, 1, 0, 1, 1, 1, 1, 2], [2, 1, 2, 2, 1, 2, 1, 0, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0\n1 1 1 1 0 1 1\n1 1 1 0 0 1 1\n1 0 1 0 1 1 1\n1 1 1 1 1 1 0\n0 1 1 1 0 0 0\n1 0 1 1 1 1 1\n", "answer": "4 3 2 1 0 1 0\n3 2 2 1 0 1 1\n2 1 1 0 0 1 2\n1 0 1 0 1 2 1\n1 1 2 1 1 1 0\n0 1 2 1 0 0 0\n1 0 1 2 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 440, "matrix": [[1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 1, 1]], "solution": [[4, 3, 2, 1, 0, 1, 0], [3, 2, 2, 1, 0, 1, 1], [2, 1, 1, 0, 0, 1, 2], [1, 0, 1, 0, 1, 2, 1], [1, 1, 2, 1, 1, 1, 0], [0, 1, 2, 1, 0, 0, 0], [1, 0, 1, 2, 1, 1, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0 1 1\n1 1 1 0 1 0 0 1\n1 1 1 0 0 1 0 1\n1 1 0 1 0 0 1 1\n1 1 0 0 0 0 1 1\n1 1 1 1 1 1 1 1\n0 0 0 1 1 0 1 1\n0 1 1 0 0 1 1 1\n", "answer": "2 1 0 1 1 0 1 2\n3 2 1 0 1 0 0 1\n3 2 1 0 0 1 0 1\n2 1 0 1 0 0 1 2\n2 1 0 0 0 0 1 2\n1 1 1 1 1 1 2 3\n0 0 0 1 1 0 1 2\n0 1 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 441, "matrix": [[1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1], [1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 0, 1, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 0, 1, 1], [0, 1, 1, 0, 0, 1, 1, 1]], "solution": [[2, 1, 0, 1, 1, 0, 1, 2], [3, 2, 1, 0, 1, 0, 0, 1], [3, 2, 1, 0, 0, 1, 0, 1], [2, 1, 0, 1, 0, 0, 1, 2], [2, 1, 0, 0, 0, 0, 1, 2], [1, 1, 1, 1, 1, 1, 2, 3], [0, 0, 0, 1, 1, 0, 1, 2], [0, 1, 1, 0, 0, 1, 2, 3]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1\n1 1 1 1 0\n1 0 1 1 1\n1 1 1 1 1\n1 1 0 1 1\n", "answer": "2 1 0 0 1\n2 1 1 1 0\n1 0 1 2 1\n2 1 1 2 2\n2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 442, "matrix": [[1, 1, 0, 0, 1], [1, 1, 1, 1, 0], [1, 0, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1]], "solution": [[2, 1, 0, 0, 1], [2, 1, 1, 1, 0], [1, 0, 1, 2, 1], [2, 1, 1, 2, 2], [2, 1, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1\n1 1 1 1 0\n0 1 1 1 1\n0 1 0 0 1\n1 0 1 1 1\n", "answer": "0 1 0 1 1\n1 2 1 1 0\n0 1 1 1 1\n0 1 0 0 1\n1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 443, "matrix": [[0, 1, 0, 1, 1], [1, 1, 1, 1, 0], [0, 1, 1, 1, 1], [0, 1, 0, 0, 1], [1, 0, 1, 1, 1]], "solution": [[0, 1, 0, 1, 1], [1, 2, 1, 1, 0], [0, 1, 1, 1, 1], [0, 1, 0, 0, 1], [1, 0, 1, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1\n1 1 1 1 1\n0 1 1 1 1\n1 1 0 1 0\n1 0 1 1 1\n", "answer": "0 1 2 3 3\n1 2 2 3 2\n0 1 1 2 1\n1 1 0 1 0\n1 0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 444, "matrix": [[0, 1, 1, 1, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 0, 1, 0], [1, 0, 1, 1, 1]], "solution": [[0, 1, 2, 3, 3], [1, 2, 2, 3, 2], [0, 1, 1, 2, 1], [1, 1, 0, 1, 0], [1, 0, 1, 2, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 1 1 1\n1 1 1 1 1 1 1 0\n1 0 1 0 0 1 1 1\n0 0 1 1 1 0 0 0\n0 1 1 1 1 1 1 1\n1 1 1 0 0 1 0 0\n1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n", "answer": "1 0 0 1 2 3 2 1\n2 1 1 1 1 2 1 0\n1 0 1 0 0 1 1 1\n0 0 1 1 1 0 0 0\n0 1 2 1 1 1 1 1\n1 1 1 0 0 1 0 0\n1 0 1 1 1 2 1 1\n2 1 2 2 2 3 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 445, "matrix": [[1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 0, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 0, 1, 2, 3, 2, 1], [2, 1, 1, 1, 1, 2, 1, 0], [1, 0, 1, 0, 0, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0, 0], [0, 1, 2, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 0, 0], [1, 0, 1, 1, 1, 2, 1, 1], [2, 1, 2, 2, 2, 3, 2, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 0 1 1\n0 1 1 1\n1 1 1 0\n", "answer": "2 1 1 0\n1 0 1 1\n0 1 2 1\n1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 446, "matrix": [[1, 1, 1, 0], [1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 0]], "solution": [[2, 1, 1, 0], [1, 0, 1, 1], [0, 1, 2, 1], [1, 2, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1\n0 0 1 1 1\n1 0 0 0 1\n0 1 0 1 0\n1 0 1 1 1\n", "answer": "0 1 2 2 3\n0 0 1 1 2\n1 0 0 0 1\n0 1 0 1 0\n1 0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 447, "matrix": [[0, 1, 1, 1, 1], [0, 0, 1, 1, 1], [1, 0, 0, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 1, 1]], "solution": [[0, 1, 2, 2, 3], [0, 0, 1, 1, 2], [1, 0, 0, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 2, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1 0 0 0 0\n0 1 1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0 1 1\n1 1 1 1 0 1 0 1 1 1\n1 1 1 1 1 0 1 0 1 1\n1 1 1 1 1 1 1 0 1 0\n1 0 1 1 1 1 1 1 1 0\n1 1 1 0 1 0 1 0 1 1\n", "answer": "0 1 2 1 0 1 0 0 0 0\n0 1 1 0 1 2 1 1 1 1\n1 2 2 1 2 3 2 2 1 0\n2 3 3 2 2 3 2 1 2 1\n3 4 3 2 1 2 1 0 1 2\n4 3 2 1 0 1 0 1 2 2\n3 2 3 2 1 0 1 0 1 1\n2 1 2 2 2 1 1 0 1 0\n1 0 1 1 2 1 2 1 1 0\n2 1 1 0 1 0 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 448, "matrix": [[0, 1, 1, 1, 0, 1, 0, 0, 0, 0], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 1, 0, 1, 1]], "solution": [[0, 1, 2, 1, 0, 1, 0, 0, 0, 0], [0, 1, 1, 0, 1, 2, 1, 1, 1, 1], [1, 2, 2, 1, 2, 3, 2, 2, 1, 0], [2, 3, 3, 2, 2, 3, 2, 1, 2, 1], [3, 4, 3, 2, 1, 2, 1, 0, 1, 2], [4, 3, 2, 1, 0, 1, 0, 1, 2, 2], [3, 2, 3, 2, 1, 0, 1, 0, 1, 1], [2, 1, 2, 2, 2, 1, 1, 0, 1, 0], [1, 0, 1, 1, 2, 1, 2, 1, 1, 0], [2, 1, 1, 0, 1, 0, 1, 0, 1, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1 1 1\n0 1 0 1 1 1 1 0 1 1\n1 1 1 1 0 1 0 1 0 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0 1 1\n1 1 1 0 1 1 0 1 0 0\n1 0 1 1 1 0 1 1 1 1\n1 0 1 1 1 1 1 1 0 1\n1 1 0 1 1 1 1 1 1 1\n0 1 1 1 1 0 1 0 1 1\n", "answer": "1 2 1 0 1 2 2 1 2 3\n0 1 0 1 1 2 1 0 1 2\n1 2 1 1 0 1 0 1 0 1\n2 3 2 2 1 2 1 1 1 2\n3 2 2 1 2 2 1 0 1 1\n2 1 1 0 1 1 0 1 0 0\n1 0 1 1 1 0 1 2 1 1\n1 0 1 2 2 1 2 1 0 1\n1 1 0 1 2 1 2 1 1 2\n0 1 1 2 1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 449, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1, 1]], "solution": [[1, 2, 1, 0, 1, 2, 2, 1, 2, 3], [0, 1, 0, 1, 1, 2, 1, 0, 1, 2], [1, 2, 1, 1, 0, 1, 0, 1, 0, 1], [2, 3, 2, 2, 1, 2, 1, 1, 1, 2], [3, 2, 2, 1, 2, 2, 1, 0, 1, 1], [2, 1, 1, 0, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0, 1, 2, 1, 1], [1, 0, 1, 2, 2, 1, 2, 1, 0, 1], [1, 1, 0, 1, 2, 1, 2, 1, 1, 2], [0, 1, 1, 2, 1, 0, 1, 0, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n0 1 1 0\n0 1 1 1\n0 0 1 1\n", "answer": "1 0 1 1\n0 1 1 0\n0 1 2 1\n0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 450, "matrix": [[1, 0, 1, 1], [0, 1, 1, 0], [0, 1, 1, 1], [0, 0, 1, 1]], "solution": [[1, 0, 1, 1], [0, 1, 1, 0], [0, 1, 2, 1], [0, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1\n0 0 1 1 0 1 1\n0 1 0 0 1 1 1\n1 0 0 1 1 1 1\n1 1 1 1 0 1 1\n1 1 1 1 1 1 1\n1 1 1 1 1 1 1\n", "answer": "1 1 0 0 1 2 3\n0 0 1 1 0 1 2\n0 1 0 0 1 2 3\n1 0 0 1 1 2 3\n2 1 1 1 0 1 2\n3 2 2 2 1 2 3\n4 3 3 3 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 451, "matrix": [[1, 1, 0, 0, 1, 1, 1], [0, 0, 1, 1, 0, 1, 1], [0, 1, 0, 0, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 1, 0, 0, 1, 2, 3], [0, 0, 1, 1, 0, 1, 2], [0, 1, 0, 0, 1, 2, 3], [1, 0, 0, 1, 1, 2, 3], [2, 1, 1, 1, 0, 1, 2], [3, 2, 2, 2, 1, 2, 3], [4, 3, 3, 3, 2, 3, 4]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0\n1 1 1 1 0\n1 1 1 0 1\n1 1 0 0 1\n1 1 1 1 1\n", "answer": "4 3 2 1 0\n4 3 2 1 0\n3 2 1 0 1\n2 1 0 0 1\n3 2 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 452, "matrix": [[1, 1, 1, 1, 0], [1, 1, 1, 1, 0], [1, 1, 1, 0, 1], [1, 1, 0, 0, 1], [1, 1, 1, 1, 1]], "solution": [[4, 3, 2, 1, 0], [4, 3, 2, 1, 0], [3, 2, 1, 0, 1], [2, 1, 0, 0, 1], [3, 2, 1, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1\n0 1 1 1 1\n0 0 1 1 1\n0 0 1 1 1\n1 1 1 0 0\n", "answer": "1 0 1 2 3\n0 1 2 3 3\n0 0 1 2 2\n0 0 1 1 1\n1 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 453, "matrix": [[1, 0, 1, 1, 1], [0, 1, 1, 1, 1], [0, 0, 1, 1, 1], [0, 0, 1, 1, 1], [1, 1, 1, 0, 0]], "solution": [[1, 0, 1, 2, 3], [0, 1, 2, 3, 3], [0, 0, 1, 2, 2], [0, 0, 1, 1, 1], [1, 1, 1, 0, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 1 1 1 1\n0 1 1 1 0 1 1 1 1 1\n0 0 1 0 1 1 0 1 1 0\n1 1 1 0 1 1 1 1 1 1\n1 0 0 0 1 0 1 0 0 1\n1 0 1 1 1 0 1 1 0 1\n1 1 0 1 1 1 1 0 1 1\n1 1 0 0 0 1 1 1 1 1\n1 1 1 1 1 1 1 1 0 1\n1 1 1 1 0 1 0 1 1 1\n", "answer": "0 1 0 1 1 2 2 3 3 2\n0 1 1 1 0 1 1 2 2 1\n0 0 1 0 1 1 0 1 1 0\n1 1 1 0 1 1 1 1 1 1\n1 0 0 0 1 0 1 0 0 1\n1 0 1 1 1 0 1 1 0 1\n2 1 0 1 1 1 1 0 1 2\n2 1 0 0 0 1 2 1 1 2\n3 2 1 1 1 2 1 1 0 1\n4 3 2 1 0 1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 454, "matrix": [[0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1]], "solution": [[0, 1, 0, 1, 1, 2, 2, 3, 3, 2], [0, 1, 1, 1, 0, 1, 1, 2, 2, 1], [0, 0, 1, 0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 0, 1], [2, 1, 0, 1, 1, 1, 1, 0, 1, 2], [2, 1, 0, 0, 0, 1, 2, 1, 1, 2], [3, 2, 1, 1, 1, 2, 1, 1, 0, 1], [4, 3, 2, 1, 0, 1, 0, 1, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 0 0\n1 1 1 1 0 1 1\n1 0 1 1 1 1 1\n1 0 1 1 1 1 1\n1 0 0 1 0 0 1\n1 1 0 0 1 1 1\n1 1 0 1 1 0 1\n", "answer": "0 1 0 1 1 0 0\n1 1 1 1 0 1 1\n1 0 1 2 1 2 2\n1 0 1 2 1 1 2\n1 0 0 1 0 0 1\n2 1 0 0 1 1 2\n2 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 455, "matrix": [[0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1]], "solution": [[0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 2, 1, 2, 2], [1, 0, 1, 2, 1, 1, 2], [1, 0, 0, 1, 0, 0, 1], [2, 1, 0, 0, 1, 1, 2], [2, 1, 0, 1, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 0 1 0 1\n1 0 1 1 1 1 1 1 1 1\n1 0 1 0 1 0 0 1 0 1\n1 0 0 1 1 1 0 1 1 1\n1 1 0 1 1 0 1 0 1 0\n1 0 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 0 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 0 0 1 0\n1 1 1 0 1 1 1 1 1 1\n", "answer": "2 1 0 1 2 1 0 1 0 1\n1 0 1 1 2 1 1 2 1 2\n1 0 1 0 1 0 0 1 0 1\n1 0 0 1 2 1 0 1 1 1\n2 1 0 1 1 0 1 0 1 0\n1 0 1 2 2 1 1 0 1 1\n2 1 2 2 3 2 2 1 0 1\n3 2 2 1 2 2 1 1 1 1\n3 2 1 0 1 1 0 0 1 0\n3 2 1 0 1 2 1 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 456, "matrix": [[1, 1, 0, 1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 0, 1, 0, 1], [1, 0, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 2, 1, 0, 1, 0, 1], [1, 0, 1, 1, 2, 1, 1, 2, 1, 2], [1, 0, 1, 0, 1, 0, 0, 1, 0, 1], [1, 0, 0, 1, 2, 1, 0, 1, 1, 1], [2, 1, 0, 1, 1, 0, 1, 0, 1, 0], [1, 0, 1, 2, 2, 1, 1, 0, 1, 1], [2, 1, 2, 2, 3, 2, 2, 1, 0, 1], [3, 2, 2, 1, 2, 2, 1, 1, 1, 1], [3, 2, 1, 0, 1, 1, 0, 0, 1, 0], [3, 2, 1, 0, 1, 2, 1, 1, 2, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 0 1 1\n1 0 1 1\n1 1 1 1\n", "answer": "2 1 0 1\n1 0 1 2\n1 0 1 2\n2 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 457, "matrix": [[1, 1, 0, 1], [1, 0, 1, 1], [1, 0, 1, 1], [1, 1, 1, 1]], "solution": [[2, 1, 0, 1], [1, 0, 1, 2], [1, 0, 1, 2], [2, 1, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1 1\n1 0 0 1 0 1 1 1 0 1\n1 1 0 0 1 1 1 1 1 1\n1 0 1 1 1 1 0 1 1 1\n0 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0 1 0\n0 1 1 1 1 1 1 1 0 0\n1 1 1 1 1 0 1 0 1 1\n1 0 1 1 0 1 1 1 1 0\n1 1 1 0 1 1 1 1 0 0\n", "answer": "2 1 1 2 1 2 3 2 1 2\n1 0 0 1 0 1 2 1 0 1\n2 1 0 0 1 2 1 2 1 2\n1 0 1 1 2 1 0 1 2 2\n0 1 2 2 3 2 1 1 2 1\n1 2 3 3 3 2 1 0 1 0\n0 1 2 3 2 1 2 1 0 0\n1 1 2 2 1 0 1 0 1 1\n1 0 1 1 0 1 2 1 1 0\n2 1 1 0 1 2 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 458, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1, 0, 0]], "solution": [[2, 1, 1, 2, 1, 2, 3, 2, 1, 2], [1, 0, 0, 1, 0, 1, 2, 1, 0, 1], [2, 1, 0, 0, 1, 2, 1, 2, 1, 2], [1, 0, 1, 1, 2, 1, 0, 1, 2, 2], [0, 1, 2, 2, 3, 2, 1, 1, 2, 1], [1, 2, 3, 3, 3, 2, 1, 0, 1, 0], [0, 1, 2, 3, 2, 1, 2, 1, 0, 0], [1, 1, 2, 2, 1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 2, 1, 1, 0], [2, 1, 1, 0, 1, 2, 2, 1, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n0 1 1 1 1 1 1\n1 1 1 0 1 0 0\n0 1 1 0 1 1 1\n1 1 1 1 0 0 1\n1 0 0 1 0 1 1\n0 1 1 1 1 1 0\n", "answer": "1 2 3 2 3 2 2\n0 1 2 1 2 1 1\n1 2 1 0 1 0 0\n0 1 1 0 1 1 1\n1 1 1 1 0 0 1\n1 0 0 1 0 1 1\n0 1 1 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 459, "matrix": [[1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0]], "solution": [[1, 2, 3, 2, 3, 2, 2], [0, 1, 2, 1, 2, 1, 1], [1, 2, 1, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1, 1], [0, 1, 1, 2, 1, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 0 1 0\n1 1 0 1 0 1 1 1\n1 1 1 1 1 1 1 1\n1 0 0 1 0 1 0 1\n0 0 1 0 0 1 0 1\n1 1 1 0 1 1 1 0\n0 0 0 1 0 1 1 0\n1 1 0 1 0 1 1 1\n", "answer": "2 1 0 0 1 0 1 0\n2 1 0 1 0 1 2 1\n2 1 1 2 1 2 1 2\n1 0 0 1 0 1 0 1\n0 0 1 0 0 1 0 1\n1 1 1 0 1 2 1 0\n0 0 0 1 0 1 1 0\n1 1 0 1 0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 460, "matrix": [[1, 1, 0, 0, 1, 0, 1, 0], [1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 0], [0, 0, 0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 0, 1, 1, 1]], "solution": [[2, 1, 0, 0, 1, 0, 1, 0], [2, 1, 0, 1, 0, 1, 2, 1], [2, 1, 1, 2, 1, 2, 1, 2], [1, 0, 0, 1, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, 0, 1], [1, 1, 1, 0, 1, 2, 1, 0], [0, 0, 0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 0, 1, 2, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1\n1 0 1 1 1\n1 1 0 1 0\n1 1 1 1 1\n1 1 0 0 0\n", "answer": "2 1 0 1 2\n1 0 1 2 1\n2 1 0 1 0\n3 2 1 1 1\n2 1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 461, "matrix": [[1, 1, 0, 1, 1], [1, 0, 1, 1, 1], [1, 1, 0, 1, 0], [1, 1, 1, 1, 1], [1, 1, 0, 0, 0]], "solution": [[2, 1, 0, 1, 2], [1, 0, 1, 2, 1], [2, 1, 0, 1, 0], [3, 2, 1, 1, 1], [2, 1, 0, 0, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1 1 1 1\n0 1 1 1 0 0 0 1 1 1\n1 1 1 1 1 1 1 1 0 1\n0 1 0 1 1 1 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 1 1 1 1 1 0\n1 1 0 1 0 0 1 1 0 1\n1 1 1 0 1 1 1 1 1 0\n1 0 1 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n", "answer": "1 1 0 0 1 1 1 2 2 3\n0 1 1 1 0 0 0 1 1 2\n1 2 1 2 1 1 1 1 0 1\n0 1 0 1 1 2 2 2 1 2\n1 2 1 0 0 1 2 3 2 1\n2 2 1 0 1 1 2 2 1 0\n2 1 0 1 0 0 1 1 0 1\n2 1 1 0 1 1 2 2 1 0\n1 0 1 1 0 1 2 3 2 1\n2 1 2 2 1 2 3 4 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 462, "matrix": [[1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 0, 0, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 1, 0, 0, 1, 1, 1, 2, 2, 3], [0, 1, 1, 1, 0, 0, 0, 1, 1, 2], [1, 2, 1, 2, 1, 1, 1, 1, 0, 1], [0, 1, 0, 1, 1, 2, 2, 2, 1, 2], [1, 2, 1, 0, 0, 1, 2, 3, 2, 1], [2, 2, 1, 0, 1, 1, 2, 2, 1, 0], [2, 1, 0, 1, 0, 0, 1, 1, 0, 1], [2, 1, 1, 0, 1, 1, 2, 2, 1, 0], [1, 0, 1, 1, 0, 1, 2, 3, 2, 1], [2, 1, 2, 2, 1, 2, 3, 4, 3, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0\n0 1 1 1 0\n0 1 1 1 1\n1 1 1 1 0\n1 1 1 1 1\n", "answer": "1 2 2 1 0\n0 1 2 1 0\n0 1 2 2 1\n1 2 2 1 0\n2 3 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 463, "matrix": [[1, 1, 1, 1, 0], [0, 1, 1, 1, 0], [0, 1, 1, 1, 1], [1, 1, 1, 1, 0], [1, 1, 1, 1, 1]], "solution": [[1, 2, 2, 1, 0], [0, 1, 2, 1, 0], [0, 1, 2, 2, 1], [1, 2, 2, 1, 0], [2, 3, 3, 2, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 0 1 1 1 1 1\n0 1 1 1 1 1 0 1 0 1\n1 1 1 1 1 1 1 1 1 1\n0 0 1 1 1 1 1 1 1 1\n1 0 1 0 1 0 1 0 1 0\n1 1 0 1 0 1 1 0 0 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1 0\n1 1 0 1 0 0 0 0 1 1\n1 0 1 1 1 0 1 1 1 1\n", "answer": "1 2 1 0 0 1 1 2 1 2\n0 1 2 1 1 1 0 1 0 1\n1 1 2 2 2 2 1 2 1 2\n0 0 1 1 2 1 2 1 2 1\n1 0 1 0 1 0 1 0 1 0\n2 1 0 1 0 1 1 0 0 1\n3 2 1 2 1 2 1 1 1 1\n3 2 1 2 1 1 0 1 1 0\n2 1 0 1 0 0 0 0 1 1\n1 0 1 2 1 0 1 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 464, "matrix": [[1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 1, 0, 1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 0, 0, 0, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1]], "solution": [[1, 2, 1, 0, 0, 1, 1, 2, 1, 2], [0, 1, 2, 1, 1, 1, 0, 1, 0, 1], [1, 1, 2, 2, 2, 2, 1, 2, 1, 2], [0, 0, 1, 1, 2, 1, 2, 1, 2, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [2, 1, 0, 1, 0, 1, 1, 0, 0, 1], [3, 2, 1, 2, 1, 2, 1, 1, 1, 1], [3, 2, 1, 2, 1, 1, 0, 1, 1, 0], [2, 1, 0, 1, 0, 0, 0, 0, 1, 1], [1, 0, 1, 2, 1, 0, 1, 1, 2, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 0 1 0 1\n1 0 1 1 1 0 1 0 1 1\n1 1 1 1 0 1 1 0 0 1\n1 0 0 1 1 1 1 1 1 1\n1 1 0 1 1 0 1 1 1 1\n1 1 1 1 1 0 1 1 0 1\n0 1 1 1 0 1 1 0 1 1\n0 1 1 1 1 1 1 1 0 0\n0 1 0 1 1 0 1 1 0 0\n1 1 0 1 1 1 0 1 1 1\n", "answer": "2 1 2 2 1 0 0 1 0 1\n1 0 1 2 1 0 1 0 1 2\n2 1 1 1 0 1 1 0 0 1\n1 0 0 1 1 1 2 1 1 2\n2 1 0 1 1 0 1 2 1 2\n1 2 1 2 1 0 1 1 0 1\n0 1 2 1 0 1 1 0 1 1\n0 1 1 2 1 1 2 1 0 0\n0 1 0 1 1 0 1 1 0 0\n1 1 0 1 2 1 0 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 465, "matrix": [[1, 1, 1, 1, 1, 0, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 1, 0, 1, 1, 0, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1]], "solution": [[2, 1, 2, 2, 1, 0, 0, 1, 0, 1], [1, 0, 1, 2, 1, 0, 1, 0, 1, 2], [2, 1, 1, 1, 0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 1, 2, 1, 1, 2], [2, 1, 0, 1, 1, 0, 1, 2, 1, 2], [1, 2, 1, 2, 1, 0, 1, 1, 0, 1], [0, 1, 2, 1, 0, 1, 1, 0, 1, 1], [0, 1, 1, 2, 1, 1, 2, 1, 0, 0], [0, 1, 0, 1, 1, 0, 1, 1, 0, 0], [1, 1, 0, 1, 2, 1, 0, 1, 1, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 0 0 1\n1 1 0 0 0 1 1 1 1\n0 1 1 1 0 1 1 1 0\n1 1 0 1 1 1 1 1 1\n0 1 1 1 0 0 1 1 1\n1 0 1 0 1 1 1 0 1\n1 1 0 1 0 1 1 1 1\n1 0 1 1 1 0 1 1 1\n", "answer": "3 3 2 2 2 2 1 1 0\n2 2 1 1 1 1 0 0 1\n1 1 0 0 0 1 1 1 1\n0 1 1 1 0 1 2 1 0\n1 1 0 1 1 1 2 2 1\n0 1 1 1 0 0 1 1 2\n1 0 1 0 1 1 1 0 1\n2 1 0 1 0 1 2 1 2\n1 0 1 2 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 466, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 0, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1]], "solution": [[3, 3, 2, 2, 2, 2, 1, 1, 0], [2, 2, 1, 1, 1, 1, 0, 0, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 2, 1, 0], [1, 1, 0, 1, 1, 1, 2, 2, 1], [0, 1, 1, 1, 0, 0, 1, 1, 2], [1, 0, 1, 0, 1, 1, 1, 0, 1], [2, 1, 0, 1, 0, 1, 2, 1, 2], [1, 0, 1, 2, 1, 0, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1 1\n0 1 0 0 1 1 1 1 1\n1 1 0 1 1 0 1 0 0\n1 1 1 1 1 0 1 0 0\n1 1 1 1 1 1 0 1 1\n1 1 0 1 0 1 0 1 1\n0 0 1 1 1 0 0 1 1\n0 1 1 1 0 0 1 1 1\n1 1 1 0 1 1 1 1 1\n", "answer": "1 1 0 1 2 2 3 2 2\n0 1 0 0 1 1 2 1 1\n1 1 0 1 1 0 1 0 0\n2 2 1 2 1 0 1 0 0\n2 2 1 2 1 1 0 1 1\n1 1 0 1 0 1 0 1 2\n0 0 1 2 1 0 0 1 2\n0 1 2 1 0 0 1 2 3\n1 2 1 0 1 1 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 467, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 0, 1, 1], [0, 0, 1, 1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[1, 1, 0, 1, 2, 2, 3, 2, 2], [0, 1, 0, 0, 1, 1, 2, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0, 0], [2, 2, 1, 2, 1, 0, 1, 0, 0], [2, 2, 1, 2, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 0, 1, 2], [0, 0, 1, 2, 1, 0, 0, 1, 2], [0, 1, 2, 1, 0, 0, 1, 2, 3], [1, 2, 1, 0, 1, 1, 2, 3, 4]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 0\n1 1 1 1 1 1 0\n1 1 1 1 1 1 1\n0 0 1 1 1 0 0\n1 1 0 1 1 0 1\n1 1 1 0 0 1 0\n0 1 0 1 1 1 1\n", "answer": "2 1 0 1 2 1 0\n2 2 1 2 2 1 0\n1 1 2 3 2 1 1\n0 0 1 2 1 0 0\n1 1 0 1 1 0 1\n1 2 1 0 0 1 0\n0 1 0 1 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 468, "matrix": [[1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 0, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 2, 1, 0], [2, 2, 1, 2, 2, 1, 0], [1, 1, 2, 3, 2, 1, 1], [0, 0, 1, 2, 1, 0, 0], [1, 1, 0, 1, 1, 0, 1], [1, 2, 1, 0, 0, 1, 0], [0, 1, 0, 1, 1, 2, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0\n1 1 1 1\n1 0 1 1\n0 1 0 1\n", "answer": "1 0 1 0\n2 1 2 1\n1 0 1 2\n0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 469, "matrix": [[1, 0, 1, 0], [1, 1, 1, 1], [1, 0, 1, 1], [0, 1, 0, 1]], "solution": [[1, 0, 1, 0], [2, 1, 2, 1], [1, 0, 1, 2], [0, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n0 0 1\n1 0 1\n", "answer": "0 1 2\n0 0 1\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 470, "matrix": [[0, 1, 1], [0, 0, 1], [1, 0, 1]], "solution": [[0, 1, 2], [0, 0, 1], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n1 0 0\n0 1 1\n", "answer": "1 0 1\n1 0 0\n0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 471, "matrix": [[1, 0, 1], [1, 0, 0], [0, 1, 1]], "solution": [[1, 0, 1], [1, 0, 0], [0, 1, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1\n1 0 1 1 1 0 1 0\n1 1 1 0 1 1 0 1\n1 0 1 0 1 1 1 0\n1 1 1 0 0 1 1 1\n1 1 0 0 1 0 0 1\n1 1 1 0 1 1 1 0\n1 1 0 1 1 0 0 1\n", "answer": "2 1 1 0 1 1 2 1\n1 0 1 1 1 0 1 0\n2 1 1 0 1 1 0 1\n1 0 1 0 1 2 1 0\n2 1 1 0 0 1 1 1\n2 1 0 0 1 0 0 1\n3 2 1 0 1 1 1 0\n2 1 0 1 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 472, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1, 0], [1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 0, 0, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 1, 1, 0, 0, 1]], "solution": [[2, 1, 1, 0, 1, 1, 2, 1], [1, 0, 1, 1, 1, 0, 1, 0], [2, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 1, 2, 1, 0], [2, 1, 1, 0, 0, 1, 1, 1], [2, 1, 0, 0, 1, 0, 0, 1], [3, 2, 1, 0, 1, 1, 1, 0], [2, 1, 0, 1, 1, 0, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1\n1 0 1 1 0\n1 1 1 1 1\n0 1 0 1 0\n1 0 0 0 1\n", "answer": "2 1 0 1 1\n1 0 1 1 0\n1 1 1 2 1\n0 1 0 1 0\n1 0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 473, "matrix": [[1, 1, 0, 1, 1], [1, 0, 1, 1, 0], [1, 1, 1, 1, 1], [0, 1, 0, 1, 0], [1, 0, 0, 0, 1]], "solution": [[2, 1, 0, 1, 1], [1, 0, 1, 1, 0], [1, 1, 1, 2, 1], [0, 1, 0, 1, 0], [1, 0, 0, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 0 1 1\n0 0 1 1 1 1\n1 0 0 1 0 1\n", "answer": "4 3 2 1 0 1\n3 3 3 2 1 2\n2 2 2 1 2 3\n1 1 1 0 1 2\n0 0 1 1 1 2\n1 0 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 474, "matrix": [[1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [0, 0, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1]], "solution": [[4, 3, 2, 1, 0, 1], [3, 3, 3, 2, 1, 2], [2, 2, 2, 1, 2, 3], [1, 1, 1, 0, 1, 2], [0, 0, 1, 1, 1, 2], [1, 0, 0, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0 0 1 1 1 1 1\n0 1 0 1 0 1 1 0 1\n1 1 1 1 1 1 1 0 1\n1 0 0 1 1 1 1 1 1\n1 1 0 0 1 1 1 0 1\n1 1 1 0 1 1 0 1 1\n1 0 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 1 1\n1 1 1 0 1 1 1 1 1\n", "answer": "0 0 0 0 1 2 2 1 2\n0 1 0 1 0 1 1 0 1\n1 1 1 2 1 2 1 0 1\n1 0 0 1 2 3 2 1 2\n2 1 0 0 1 2 1 0 1\n2 1 1 0 1 1 0 1 2\n1 0 1 1 2 2 1 2 3\n2 1 1 0 1 2 2 3 4\n3 2 1 0 1 2 3 4 5", "metadata": {"source_dataset": "binary_matrix", "source_index": 475, "matrix": [[0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[0, 0, 0, 0, 1, 2, 2, 1, 2], [0, 1, 0, 1, 0, 1, 1, 0, 1], [1, 1, 1, 2, 1, 2, 1, 0, 1], [1, 0, 0, 1, 2, 3, 2, 1, 2], [2, 1, 0, 0, 1, 2, 1, 0, 1], [2, 1, 1, 0, 1, 1, 0, 1, 2], [1, 0, 1, 1, 2, 2, 1, 2, 3], [2, 1, 1, 0, 1, 2, 2, 3, 4], [3, 2, 1, 0, 1, 2, 3, 4, 5]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 1\n1 1 0 1 0 1 1 1\n1 1 0 1 0 1 1 1\n0 1 1 1 0 0 0 0\n1 1 1 0 1 1 1 1\n1 1 1 1 0 1 1 1\n1 1 1 1 1 1 0 1\n", "answer": "0 1 0 1 2 3 4 4\n1 2 1 2 1 2 3 3\n2 1 0 1 0 1 2 2\n1 1 0 1 0 1 1 1\n0 1 1 1 0 0 0 0\n1 2 1 0 1 1 1 1\n2 3 2 1 0 1 1 2\n3 4 3 2 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 476, "matrix": [[0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1], [0, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1]], "solution": [[0, 1, 0, 1, 2, 3, 4, 4], [1, 2, 1, 2, 1, 2, 3, 3], [2, 1, 0, 1, 0, 1, 2, 2], [1, 1, 0, 1, 0, 1, 1, 1], [0, 1, 1, 1, 0, 0, 0, 0], [1, 2, 1, 0, 1, 1, 1, 1], [2, 3, 2, 1, 0, 1, 1, 2], [3, 4, 3, 2, 1, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 0 0\n0 0 0 1 0 1 1 1 0 1\n0 1 1 1 1 1 1 1 1 1\n0 0 0 0 1 1 1 1 0 1\n0 1 0 1 0 0 1 0 1 1\n1 1 1 1 1 1 1 1 1 0\n1 1 0 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 0 0 1\n1 1 0 1 1 0 1 1 1 0\n1 1 1 0 1 1 1 1 1 1\n", "answer": "1 1 1 2 1 2 2 1 0 0\n0 0 0 1 0 1 2 1 0 1\n0 1 1 1 1 2 3 2 1 2\n0 0 0 0 1 1 2 1 0 1\n0 1 0 1 0 0 1 0 1 1\n1 2 1 2 1 1 2 1 1 0\n2 1 0 1 2 2 1 0 1 1\n3 2 1 2 2 1 1 0 0 1\n2 1 0 1 1 0 1 1 1 0\n3 2 1 0 1 1 2 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 477, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 1, 0, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 0, 1], [0, 1, 0, 1, 0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1]], "solution": [[1, 1, 1, 2, 1, 2, 2, 1, 0, 0], [0, 0, 0, 1, 0, 1, 2, 1, 0, 1], [0, 1, 1, 1, 1, 2, 3, 2, 1, 2], [0, 0, 0, 0, 1, 1, 2, 1, 0, 1], [0, 1, 0, 1, 0, 0, 1, 0, 1, 1], [1, 2, 1, 2, 1, 1, 2, 1, 1, 0], [2, 1, 0, 1, 2, 2, 1, 0, 1, 1], [3, 2, 1, 2, 2, 1, 1, 0, 0, 1], [2, 1, 0, 1, 1, 0, 1, 1, 1, 0], [3, 2, 1, 0, 1, 1, 2, 2, 2, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0\n1 0 1\n0 1 1\n", "answer": "1 0 0\n1 0 1\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 478, "matrix": [[1, 0, 0], [1, 0, 1], [0, 1, 1]], "solution": [[1, 0, 0], [1, 0, 1], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n0 1 1 1\n0 1 1 1\n0 0 0 1\n", "answer": "1 2 3 4\n0 1 2 3\n0 1 1 2\n0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 479, "matrix": [[1, 1, 1, 1], [0, 1, 1, 1], [0, 1, 1, 1], [0, 0, 0, 1]], "solution": [[1, 2, 3, 4], [0, 1, 2, 3], [0, 1, 1, 2], [0, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 1 1 0\n0 1 1 1\n0 1 1 1\n", "answer": "2 1 0 1\n1 2 1 0\n0 1 2 1\n0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 480, "matrix": [[1, 1, 0, 1], [1, 1, 1, 0], [0, 1, 1, 1], [0, 1, 1, 1]], "solution": [[2, 1, 0, 1], [1, 2, 1, 0], [0, 1, 2, 1], [0, 1, 2, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1\n1 1 1 0 1 0 1\n1 0 0 1 1 1 1\n1 1 1 1 1 1 1\n0 1 1 1 1 1 1\n0 1 1 1 1 1 1\n1 0 1 1 1 1 0\n", "answer": "2 1 0 1 2 1 2\n2 1 1 0 1 0 1\n1 0 0 1 2 1 2\n1 1 1 2 3 2 3\n0 1 2 3 4 3 2\n0 1 2 3 3 2 1\n1 0 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 481, "matrix": [[1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0]], "solution": [[2, 1, 0, 1, 2, 1, 2], [2, 1, 1, 0, 1, 0, 1], [1, 0, 0, 1, 2, 1, 2], [1, 1, 1, 2, 3, 2, 3], [0, 1, 2, 3, 4, 3, 2], [0, 1, 2, 3, 3, 2, 1], [1, 0, 1, 2, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1\n1 1 1 1 1 1\n1 1 0 1 1 0\n1 1 0 1 0 0\n1 1 1 1 1 1\n0 1 1 0 1 0\n", "answer": "4 3 2 1 0 1\n3 2 1 2 1 1\n2 1 0 1 1 0\n2 1 0 1 0 0\n1 2 1 1 1 1\n0 1 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 482, "matrix": [[1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0]], "solution": [[4, 3, 2, 1, 0, 1], [3, 2, 1, 2, 1, 1], [2, 1, 0, 1, 1, 0], [2, 1, 0, 1, 0, 0], [1, 2, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1\n1 1 0 1\n1 1 0 0\n1 1 1 1\n", "answer": "0 0 1 2\n1 1 0 1\n2 1 0 0\n3 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 483, "matrix": [[0, 0, 1, 1], [1, 1, 0, 1], [1, 1, 0, 0], [1, 1, 1, 1]], "solution": [[0, 0, 1, 2], [1, 1, 0, 1], [2, 1, 0, 0], [3, 2, 1, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0\n0 1 1 1 0\n1 1 1 0 1\n1 0 1 1 1\n1 1 1 1 1\n", "answer": "0 1 1 0 0\n0 1 2 1 0\n1 1 1 0 1\n1 0 1 1 2\n2 1 2 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 484, "matrix": [[0, 1, 1, 0, 0], [0, 1, 1, 1, 0], [1, 1, 1, 0, 1], [1, 0, 1, 1, 1], [1, 1, 1, 1, 1]], "solution": [[0, 1, 1, 0, 0], [0, 1, 2, 1, 0], [1, 1, 1, 0, 1], [1, 0, 1, 1, 2], [2, 1, 2, 2, 3]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 0 1 1 1 1\n1 1 1 1 1 1 1 1 1\n0 0 1 0 1 0 1 0 1\n1 1 1 1 1 0 1 0 0\n0 1 0 1 0 1 0 1 0\n1 1 1 1 0 1 1 1 1\n1 0 0 0 1 1 1 0 1\n1 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1 1\n", "answer": "1 0 0 1 0 1 2 2 3\n1 1 1 1 1 1 2 1 2\n0 0 1 0 1 0 1 0 1\n1 1 1 1 1 0 1 0 0\n0 1 0 1 0 1 0 1 0\n1 1 1 1 0 1 1 1 1\n1 0 0 0 1 2 1 0 1\n2 1 1 1 2 3 2 1 0\n3 2 2 2 3 4 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 485, "matrix": [[1, 0, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 0, 1, 0, 1, 2, 2, 3], [1, 1, 1, 1, 1, 1, 2, 1, 2], [0, 0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 0, 1, 2, 1, 0, 1], [2, 1, 1, 1, 2, 3, 2, 1, 0], [3, 2, 2, 2, 3, 4, 3, 2, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0\n1 1 1\n1 1 1\n", "answer": "0 0 0\n1 1 1\n2 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 486, "matrix": [[0, 0, 0], [1, 1, 1], [1, 1, 1]], "solution": [[0, 0, 0], [1, 1, 1], [2, 2, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 1 1 1\n1 1 1 1 0\n0 1 1 0 1\n1 1 1 0 1\n", "answer": "3 4 4 3 2\n2 3 3 2 1\n1 2 2 1 0\n0 1 1 0 1\n1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 487, "matrix": [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0], [0, 1, 1, 0, 1], [1, 1, 1, 0, 1]], "solution": [[3, 4, 4, 3, 2], [2, 3, 3, 2, 1], [1, 2, 2, 1, 0], [0, 1, 1, 0, 1], [1, 2, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 0 1\n1 1 1 0 0 1 1 0\n1 1 1 1 1 0 1 1\n1 1 1 0 1 1 1 1\n0 0 1 0 1 1 1 0\n1 1 0 0 1 1 1 1\n1 1 0 1 1 0 1 1\n1 1 1 0 1 1 1 1\n", "answer": "4 3 2 1 0 0 0 1\n3 2 1 0 0 1 1 0\n2 2 2 1 1 0 1 1\n1 1 1 0 1 1 2 1\n0 0 1 0 1 2 1 0\n1 1 0 0 1 1 2 1\n2 1 0 1 1 0 1 2\n3 2 1 0 1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 488, "matrix": [[1, 1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1]], "solution": [[4, 3, 2, 1, 0, 0, 0, 1], [3, 2, 1, 0, 0, 1, 1, 0], [2, 2, 2, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 2, 1], [0, 0, 1, 0, 1, 2, 1, 0], [1, 1, 0, 0, 1, 1, 2, 1], [2, 1, 0, 1, 1, 0, 1, 2], [3, 2, 1, 0, 1, 1, 2, 3]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1\n1 0 1 1 0\n0 0 1 0 1\n0 1 1 1 1\n1 0 1 0 1\n", "answer": "1 0 1 2 1\n1 0 1 1 0\n0 0 1 0 1\n0 1 2 1 2\n1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 489, "matrix": [[1, 0, 1, 1, 1], [1, 0, 1, 1, 0], [0, 0, 1, 0, 1], [0, 1, 1, 1, 1], [1, 0, 1, 0, 1]], "solution": [[1, 0, 1, 2, 1], [1, 0, 1, 1, 0], [0, 0, 1, 0, 1], [0, 1, 2, 1, 2], [1, 0, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1\n0 0 1 1 1 0\n1 0 1 1 1 0\n1 1 1 0 1 0\n0 1 1 1 1 1\n1 1 1 1 0 0\n", "answer": "1 1 2 1 0 1\n0 0 1 2 1 0\n1 0 1 1 1 0\n1 1 1 0 1 0\n0 1 2 1 1 1\n1 2 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 490, "matrix": [[1, 1, 1, 1, 0, 1], [0, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0]], "solution": [[1, 1, 2, 1, 0, 1], [0, 0, 1, 2, 1, 0], [1, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0], [0, 1, 2, 1, 1, 1], [1, 2, 2, 1, 0, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 0 1 0 1\n1 0 1 1 1 0 1 1 1\n0 1 1 1 1 0 0 1 1\n1 1 1 1 1 1 1 0 1\n0 0 1 1 1 0 0 0 1\n1 1 0 1 1 1 1 1 1\n1 0 0 1 1 1 0 1 1\n1 1 1 1 1 0 1 1 1\n1 0 1 1 1 1 1 0 1\n", "answer": "0 0 1 2 1 0 1 0 1\n1 0 1 2 1 0 1 1 2\n0 1 2 2 1 0 0 1 2\n1 1 2 3 2 1 1 0 1\n0 0 1 2 1 0 0 0 1\n1 1 0 1 2 1 1 1 2\n1 0 0 1 2 1 0 1 2\n2 1 1 2 1 0 1 1 2\n1 0 1 2 2 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 491, "matrix": [[0, 0, 1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 0, 1, 1, 1, 0, 0, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1]], "solution": [[0, 0, 1, 2, 1, 0, 1, 0, 1], [1, 0, 1, 2, 1, 0, 1, 1, 2], [0, 1, 2, 2, 1, 0, 0, 1, 2], [1, 1, 2, 3, 2, 1, 1, 0, 1], [0, 0, 1, 2, 1, 0, 0, 0, 1], [1, 1, 0, 1, 2, 1, 1, 1, 2], [1, 0, 0, 1, 2, 1, 0, 1, 2], [2, 1, 1, 2, 1, 0, 1, 1, 2], [1, 0, 1, 2, 2, 1, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 0 1\n1 0 1 1 1 1 1 1 0\n1 1 1 0 1 1 1 0 1\n1 1 1 1 0 0 0 1 1\n0 1 0 1 0 1 1 1 1\n0 1 1 0 0 1 1 1 1\n1 0 1 1 0 0 1 1 1\n", "answer": "1 2 3 4 5 4 3 2 3\n0 1 2 3 4 3 2 1 2\n0 1 2 2 3 2 1 0 1\n1 0 1 1 2 2 2 1 0\n2 1 1 0 1 1 1 0 1\n1 2 1 1 0 0 0 1 2\n0 1 0 1 0 1 1 2 3\n0 1 1 0 0 1 2 3 4\n1 0 1 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 492, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 0, 1, 1], [0, 1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1, 1, 1], [1, 0, 1, 1, 0, 0, 1, 1, 1]], "solution": [[1, 2, 3, 4, 5, 4, 3, 2, 3], [0, 1, 2, 3, 4, 3, 2, 1, 2], [0, 1, 2, 2, 3, 2, 1, 0, 1], [1, 0, 1, 1, 2, 2, 2, 1, 0], [2, 1, 1, 0, 1, 1, 1, 0, 1], [1, 2, 1, 1, 0, 0, 0, 1, 2], [0, 1, 0, 1, 0, 1, 1, 2, 3], [0, 1, 1, 0, 0, 1, 2, 3, 4], [1, 0, 1, 1, 0, 0, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1\n1 0 1 1 1\n1 1 1 1 1\n0 1 0 1 1\n1 0 0 1 1\n", "answer": "2 1 1 0 1\n1 0 1 1 2\n1 1 1 2 3\n0 1 0 1 2\n1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 493, "matrix": [[1, 1, 1, 0, 1], [1, 0, 1, 1, 1], [1, 1, 1, 1, 1], [0, 1, 0, 1, 1], [1, 0, 0, 1, 1]], "solution": [[2, 1, 1, 0, 1], [1, 0, 1, 1, 2], [1, 1, 1, 2, 3], [0, 1, 0, 1, 2], [1, 0, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1\n1 1 0 1 1 0\n1 0 1 1 1 1\n0 1 1 1 0 1\n0 1 1 1 1 0\n0 0 1 1 1 1\n", "answer": "0 1 1 2 2 1\n1 1 0 1 1 0\n1 0 1 2 1 1\n0 1 2 1 0 1\n0 1 2 2 1 0\n0 0 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 494, "matrix": [[0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1]], "solution": [[0, 1, 1, 2, 2, 1], [1, 1, 0, 1, 1, 0], [1, 0, 1, 2, 1, 1], [0, 1, 2, 1, 0, 1], [0, 1, 2, 2, 1, 0], [0, 0, 1, 2, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1 1 0 1 1\n0 1 1 1 1 0 1 0 0 1\n0 0 1 0 1 1 0 1 1 1\n1 1 1 1 1 1 0 1 1 1\n0 0 1 0 0 1 1 0 1 1\n1 0 1 1 1 1 1 1 1 1\n1 0 1 0 1 1 1 0 1 1\n0 1 1 1 1 1 1 0 0 0\n1 1 0 1 1 0 1 1 0 1\n1 0 1 1 1 0 0 1 1 1\n", "answer": "1 0 1 0 1 1 1 0 1 2\n0 1 2 1 1 0 1 0 0 1\n0 0 1 0 1 1 0 1 1 2\n1 1 2 1 1 1 0 1 2 3\n0 0 1 0 0 1 1 0 1 2\n1 0 1 1 1 2 2 1 2 2\n1 0 1 0 1 2 1 0 1 1\n0 1 1 1 2 1 1 0 0 0\n1 1 0 1 1 0 1 1 0 1\n1 0 1 2 1 0 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 495, "matrix": [[1, 0, 1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1, 0, 0, 1], [0, 0, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 0, 0, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 0, 1, 1, 1]], "solution": [[1, 0, 1, 0, 1, 1, 1, 0, 1, 2], [0, 1, 2, 1, 1, 0, 1, 0, 0, 1], [0, 0, 1, 0, 1, 1, 0, 1, 1, 2], [1, 1, 2, 1, 1, 1, 0, 1, 2, 3], [0, 0, 1, 0, 0, 1, 1, 0, 1, 2], [1, 0, 1, 1, 1, 2, 2, 1, 2, 2], [1, 0, 1, 0, 1, 2, 1, 0, 1, 1], [0, 1, 1, 1, 2, 1, 1, 0, 0, 0], [1, 1, 0, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 2, 1, 0, 0, 1, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0 1\n1 1 0 1 1 1 0\n0 0 1 1 0 1 1\n1 1 0 0 0 1 0\n0 1 1 0 1 1 1\n0 1 1 1 1 0 0\n1 1 1 1 1 1 1\n", "answer": "2 1 0 1 1 0 1\n1 1 0 1 1 1 0\n0 0 1 1 0 1 1\n1 1 0 0 0 1 0\n0 1 1 0 1 1 1\n0 1 2 1 1 0 0\n1 2 3 2 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 496, "matrix": [[1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 0], [0, 0, 1, 1, 0, 1, 1], [1, 1, 0, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 0], [0, 0, 1, 1, 0, 1, 1], [1, 1, 0, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 1], [0, 1, 2, 1, 1, 0, 0], [1, 2, 3, 2, 2, 1, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1 1\n1 1 1 0 1 1 0\n1 1 0 1 1 0 1\n1 0 1 1 1 1 1\n0 1 1 1 1 0 0\n1 0 1 1 0 1 1\n1 1 0 1 1 0 1\n", "answer": "0 1 2 1 0 1 1\n1 2 1 0 1 1 0\n2 1 0 1 1 0 1\n1 0 1 2 2 1 1\n0 1 2 2 1 0 0\n1 0 1 1 0 1 1\n2 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 497, "matrix": [[0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1]], "solution": [[0, 1, 2, 1, 0, 1, 1], [1, 2, 1, 0, 1, 1, 0], [2, 1, 0, 1, 1, 0, 1], [1, 0, 1, 2, 2, 1, 1], [0, 1, 2, 2, 1, 0, 0], [1, 0, 1, 1, 0, 1, 1], [2, 1, 0, 1, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0 1 1\n1 1 1 1 1 1 1 0\n0 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 1\n1 1 1 0 1 0 1 1\n1 1 1 0 1 0 1 0\n1 1 1 0 1 1 0 1\n0 0 0 0 1 1 1 1\n", "answer": "2 1 0 1 1 0 1 1\n1 2 1 2 2 1 1 0\n0 1 0 1 2 2 2 1\n1 2 1 1 2 1 2 2\n2 2 1 0 1 0 1 1\n2 2 1 0 1 0 1 0\n1 1 1 0 1 1 0 1\n0 0 0 0 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 498, "matrix": [[1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 1, 0], [1, 1, 1, 0, 1, 1, 0, 1], [0, 0, 0, 0, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 1, 0, 1, 1], [1, 2, 1, 2, 2, 1, 1, 0], [0, 1, 0, 1, 2, 2, 2, 1], [1, 2, 1, 1, 2, 1, 2, 2], [2, 2, 1, 0, 1, 0, 1, 1], [2, 2, 1, 0, 1, 0, 1, 0], [1, 1, 1, 0, 1, 1, 0, 1], [0, 0, 0, 0, 1, 2, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n0 0 1 1 0 0 1 1\n1 1 1 1 1 1 1 1\n0 1 1 1 0 1 0 1\n1 1 0 0 1 1 1 1\n1 1 1 1 1 1 1 1\n1 1 1 1 0 1 0 1\n", "answer": "0 0 1 2 2 2 3 4\n1 1 2 2 1 1 2 3\n0 0 1 1 0 0 1 2\n1 1 2 2 1 1 1 2\n0 1 1 1 0 1 0 1\n1 1 0 0 1 2 1 2\n2 2 1 1 1 2 1 2\n3 3 2 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 499, "matrix": [[0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1], [1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1]], "solution": [[0, 0, 1, 2, 2, 2, 3, 4], [1, 1, 2, 2, 1, 1, 2, 3], [0, 0, 1, 1, 0, 0, 1, 2], [1, 1, 2, 2, 1, 1, 1, 2], [0, 1, 1, 1, 0, 1, 0, 1], [1, 1, 0, 0, 1, 2, 1, 2], [2, 2, 1, 1, 1, 2, 1, 2], [3, 3, 2, 1, 0, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0 0 1\n1 1 1 1 1 1 1 1 0 0\n0 0 0 1 1 0 1 1 0 1\n0 0 0 1 1 1 1 0 1 1\n1 1 1 0 1 1 1 1 1 1\n0 1 1 1 0 1 1 0 1 1\n1 1 1 0 0 1 1 0 1 1\n1 1 1 0 1 1 0 1 1 0\n1 0 1 1 0 0 0 1 0 1\n1 1 1 1 0 0 0 0 1 1\n", "answer": "2 2 2 3 3 2 1 0 0 1\n1 1 1 2 2 1 2 1 0 0\n0 0 0 1 1 0 1 1 0 1\n0 0 0 1 2 1 1 0 1 2\n1 1 1 0 1 2 2 1 2 3\n0 1 2 1 0 1 1 0 1 2\n1 2 1 0 0 1 1 0 1 1\n2 1 1 0 1 1 0 1 1 0\n1 0 1 1 0 0 0 1 0 1\n2 1 2 1 0 0 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 500, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 1, 1, 0, 1, 1, 0, 1], [0, 0, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 0, 0, 1, 0, 1], [1, 1, 1, 1, 0, 0, 0, 0, 1, 1]], "solution": [[2, 2, 2, 3, 3, 2, 1, 0, 0, 1], [1, 1, 1, 2, 2, 1, 2, 1, 0, 0], [0, 0, 0, 1, 1, 0, 1, 1, 0, 1], [0, 0, 0, 1, 2, 1, 1, 0, 1, 2], [1, 1, 1, 0, 1, 2, 2, 1, 2, 3], [0, 1, 2, 1, 0, 1, 1, 0, 1, 2], [1, 2, 1, 0, 0, 1, 1, 0, 1, 1], [2, 1, 1, 0, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 0, 0, 1, 0, 1], [2, 1, 2, 1, 0, 0, 0, 0, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0\n0 1 1 1 1\n1 0 1 1 1\n1 1 0 1 1\n0 1 0 1 1\n", "answer": "1 2 2 1 0\n0 1 2 2 1\n1 0 1 2 2\n1 1 0 1 2\n0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 501, "matrix": [[1, 1, 1, 1, 0], [0, 1, 1, 1, 1], [1, 0, 1, 1, 1], [1, 1, 0, 1, 1], [0, 1, 0, 1, 1]], "solution": [[1, 2, 2, 1, 0], [0, 1, 2, 2, 1], [1, 0, 1, 2, 2], [1, 1, 0, 1, 2], [0, 1, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1\n1 0 1 0 1 1 0\n0 1 1 1 1 1 0\n1 1 0 0 1 1 1\n1 0 1 1 1 1 0\n0 1 1 1 0 1 1\n1 1 1 1 1 1 0\n", "answer": "0 1 2 1 2 2 1\n1 0 1 0 1 1 0\n0 1 1 1 2 1 0\n1 1 0 0 1 2 1\n1 0 1 1 1 1 0\n0 1 2 1 0 1 1\n1 2 3 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 502, "matrix": [[0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 2, 1, 2, 2, 1], [1, 0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 2, 1, 0], [1, 1, 0, 0, 1, 2, 1], [1, 0, 1, 1, 1, 1, 0], [0, 1, 2, 1, 0, 1, 1], [1, 2, 3, 2, 1, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1\n0 1 0 0 1 0\n0 1 1 1 1 1\n0 0 1 1 0 1\n0 1 0 1 1 1\n1 0 1 1 0 1\n", "answer": "1 0 1 1 2 1\n0 1 0 0 1 0\n0 1 1 1 1 1\n0 0 1 1 0 1\n0 1 0 1 1 2\n1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 503, "matrix": [[1, 0, 1, 1, 1, 1], [0, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 1]], "solution": [[1, 0, 1, 1, 2, 1], [0, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1], [0, 1, 0, 1, 1, 2], [1, 0, 1, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n1 0 0\n1 1 1\n", "answer": "2 1 0\n1 0 0\n2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 504, "matrix": [[1, 1, 0], [1, 0, 0], [1, 1, 1]], "solution": [[2, 1, 0], [1, 0, 0], [2, 1, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0\n1 0 1\n0 0 1\n", "answer": "1 0 0\n1 0 1\n0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 505, "matrix": [[1, 0, 0], [1, 0, 1], [0, 0, 1]], "solution": [[1, 0, 0], [1, 0, 1], [0, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n0 1 0\n1 1 0\n", "answer": "1 2 1\n0 1 0\n1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 506, "matrix": [[1, 1, 1], [0, 1, 0], [1, 1, 0]], "solution": [[1, 2, 1], [0, 1, 0], [1, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 0 1 1 1\n1 0 1 1 0 0\n1 0 0 1 1 1\n0 0 1 0 1 1\n1 1 1 1 1 0\n", "answer": "3 2 1 2 2 2\n2 1 0 1 1 1\n1 0 1 1 0 0\n1 0 0 1 1 1\n0 0 1 0 1 1\n1 1 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 507, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 0], [1, 0, 0, 1, 1, 1], [0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0]], "solution": [[3, 2, 1, 2, 2, 2], [2, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 0], [1, 0, 0, 1, 1, 1], [0, 0, 1, 0, 1, 1], [1, 1, 2, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0 0 0 1 1 0\n1 1 1 1 1 1 1 1 0 1\n1 0 1 0 0 0 1 1 1 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 1 0 0 1 0 1 1\n1 0 0 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 0 1\n0 1 1 0 0 1 1 1 1 1\n0 1 0 0 0 1 1 1 0 1\n1 1 0 1 0 0 1 1 1 1\n", "answer": "0 1 1 0 0 0 0 1 1 0\n1 1 2 1 1 1 1 1 0 1\n1 0 1 0 0 0 1 2 1 2\n2 1 1 0 0 1 2 1 2 3\n2 1 1 1 0 0 1 0 1 2\n1 0 0 0 1 1 2 1 1 2\n1 1 1 1 1 2 2 1 0 1\n0 1 1 0 0 1 2 2 1 2\n0 1 0 0 0 1 2 1 0 1\n1 1 0 1 0 0 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 508, "matrix": [[0, 1, 1, 0, 0, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1, 1], [1, 0, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 0, 1, 1, 1, 1, 1], [0, 1, 0, 0, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 0, 1, 1, 1, 1]], "solution": [[0, 1, 1, 0, 0, 0, 0, 1, 1, 0], [1, 1, 2, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 0, 0, 1, 2, 1, 2], [2, 1, 1, 0, 0, 1, 2, 1, 2, 3], [2, 1, 1, 1, 0, 0, 1, 0, 1, 2], [1, 0, 0, 0, 1, 1, 2, 1, 1, 2], [1, 1, 1, 1, 1, 2, 2, 1, 0, 1], [0, 1, 1, 0, 0, 1, 2, 2, 1, 2], [0, 1, 0, 0, 0, 1, 2, 1, 0, 1], [1, 1, 0, 1, 0, 0, 1, 2, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1\n1 0 1 1 1 1\n1 1 0 1 1 0\n0 1 1 1 0 0\n1 1 1 1 1 1\n1 1 0 1 1 0\n", "answer": "0 1 2 3 3 2\n1 0 1 2 2 1\n1 1 0 1 1 0\n0 1 1 1 0 0\n1 2 1 2 1 1\n2 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 509, "matrix": [[0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0]], "solution": [[0, 1, 2, 3, 3, 2], [1, 0, 1, 2, 2, 1], [1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 0, 0], [1, 2, 1, 2, 1, 1], [2, 1, 0, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 0\n1 1 1\n", "answer": "0 1 1\n1 1 0\n2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 510, "matrix": [[0, 1, 1], [1, 1, 0], [1, 1, 1]], "solution": [[0, 1, 1], [1, 1, 0], [2, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 0 1 1 1\n1 1 0 1 0 1 1 1 0 1\n1 1 0 1 1 0 0 0 1 1\n0 0 1 1 0 0 1 1 1 1\n1 1 1 1 0 1 1 1 0 1\n1 1 1 1 0 1 0 1 0 0\n1 1 1 1 1 0 1 0 1 1\n0 1 1 0 1 1 0 1 1 0\n1 0 0 1 1 0 0 0 1 1\n0 1 1 1 1 0 0 1 1 1\n", "answer": "1 0 1 2 1 1 0 1 1 2\n2 1 0 1 0 1 1 1 0 1\n1 1 0 1 1 0 0 0 1 2\n0 0 1 1 0 0 1 1 1 2\n1 1 2 1 0 1 1 1 0 1\n2 2 2 1 0 1 0 1 0 0\n1 2 2 1 1 0 1 0 1 1\n0 1 1 0 1 1 0 1 1 0\n1 0 0 1 1 0 0 0 1 1\n0 1 1 2 1 0 0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 511, "matrix": [[1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 0, 0, 1, 1], [0, 0, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0, 0, 0, 1, 1], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1]], "solution": [[1, 0, 1, 2, 1, 1, 0, 1, 1, 2], [2, 1, 0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 0, 0, 1, 2], [0, 0, 1, 1, 0, 0, 1, 1, 1, 2], [1, 1, 2, 1, 0, 1, 1, 1, 0, 1], [2, 2, 2, 1, 0, 1, 0, 1, 0, 0], [1, 2, 2, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0, 0, 0, 1, 1], [0, 1, 1, 2, 1, 0, 0, 1, 2, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 0 1 1\n1 0 1 0 1 1 1 1\n1 1 0 1 1 1 1 1\n1 0 0 1 0 1 1 1\n1 1 1 1 1 1 1 1\n0 0 1 0 1 1 1 1\n0 0 1 1 1 1 1 0\n0 0 1 1 1 0 1 1\n", "answer": "0 1 1 0 1 0 1 2\n1 0 1 0 1 1 2 3\n2 1 0 1 1 2 3 4\n1 0 0 1 0 1 2 3\n1 1 1 1 1 2 3 2\n0 0 1 0 1 2 2 1\n0 0 1 1 2 1 1 0\n0 0 1 2 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 512, "matrix": [[0, 1, 1, 0, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 0, 1, 1]], "solution": [[0, 1, 1, 0, 1, 0, 1, 2], [1, 0, 1, 0, 1, 1, 2, 3], [2, 1, 0, 1, 1, 2, 3, 4], [1, 0, 0, 1, 0, 1, 2, 3], [1, 1, 1, 1, 1, 2, 3, 2], [0, 0, 1, 0, 1, 2, 2, 1], [0, 0, 1, 1, 2, 1, 1, 0], [0, 0, 1, 2, 1, 0, 1, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 0\n1 0 1 1 1 1\n1 1 1 0 0 1\n1 1 1 1 1 1\n1 1 0 0 1 1\n1 1 1 1 1 0\n", "answer": "1 0 0 1 1 0\n1 0 1 1 1 1\n2 1 1 0 0 1\n3 2 1 1 1 2\n2 1 0 0 1 1\n3 2 1 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 513, "matrix": [[1, 0, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 0]], "solution": [[1, 0, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1], [2, 1, 1, 0, 0, 1], [3, 2, 1, 1, 1, 2], [2, 1, 0, 0, 1, 1], [3, 2, 1, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 0 1 1 0\n1 1 1 1 1 1 0 1 1 1\n1 1 1 1 1 0 1 1 0 0\n1 1 1 0 0 0 0 0 0 1\n1 1 1 1 1 0 1 1 0 1\n1 1 0 1 1 1 0 1 0 0\n1 1 1 1 1 1 0 1 1 1\n1 1 0 1 1 0 1 1 0 1\n0 1 0 1 1 1 1 1 1 1\n0 1 0 1 0 1 0 1 1 1\n", "answer": "3 2 1 0 1 0 0 1 1 0\n4 3 2 1 2 1 0 1 1 1\n4 3 2 1 1 0 1 1 0 0\n3 2 1 0 0 0 0 0 0 1\n3 2 1 1 1 0 1 1 0 1\n2 1 0 1 2 1 0 1 0 0\n2 2 1 2 2 1 0 1 1 1\n1 1 0 1 1 0 1 1 0 1\n0 1 0 1 1 1 1 2 1 2\n0 1 0 1 0 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 514, "matrix": [[1, 1, 1, 0, 1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1, 0, 1, 1, 1]], "solution": [[3, 2, 1, 0, 1, 0, 0, 1, 1, 0], [4, 3, 2, 1, 2, 1, 0, 1, 1, 1], [4, 3, 2, 1, 1, 0, 1, 1, 0, 0], [3, 2, 1, 0, 0, 0, 0, 0, 0, 1], [3, 2, 1, 1, 1, 0, 1, 1, 0, 1], [2, 1, 0, 1, 2, 1, 0, 1, 0, 0], [2, 2, 1, 2, 2, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 1, 2, 1, 2], [0, 1, 0, 1, 0, 1, 0, 1, 2, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 1\n0 1 1\n", "answer": "2 3 4\n1 2 3\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 515, "matrix": [[1, 1, 1], [1, 1, 1], [0, 1, 1]], "solution": [[2, 3, 4], [1, 2, 3], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1 1 1\n0 1 1 1 0 0 1 0 1\n1 1 0 1 0 1 1 1 1\n1 1 0 1 0 1 1 1 1\n0 0 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 0 0\n0 1 0 1 0 1 1 1 1\n0 1 1 1 1 1 1 1 1\n", "answer": "1 0 1 1 0 1 2 1 2\n0 1 1 1 0 0 1 0 1\n1 1 0 1 0 1 2 1 2\n1 1 0 1 0 1 1 2 3\n0 0 1 2 1 1 0 1 2\n1 1 1 2 2 2 1 1 1\n1 1 0 1 1 2 1 0 0\n0 1 0 1 0 1 2 1 1\n0 1 1 2 1 2 3 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 516, "matrix": [[1, 0, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 1, 0, 1, 2, 1, 2], [0, 1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 0, 1, 0, 1, 2, 1, 2], [1, 1, 0, 1, 0, 1, 1, 2, 3], [0, 0, 1, 2, 1, 1, 0, 1, 2], [1, 1, 1, 2, 2, 2, 1, 1, 1], [1, 1, 0, 1, 1, 2, 1, 0, 0], [0, 1, 0, 1, 0, 1, 2, 1, 1], [0, 1, 1, 2, 1, 2, 3, 2, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 0\n1 1 1\n", "answer": "0 1 1\n1 1 0\n2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 517, "matrix": [[0, 1, 1], [1, 1, 0], [1, 1, 1]], "solution": [[0, 1, 1], [1, 1, 0], [2, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n0 1 1\n1 1 1\n", "answer": "1 1 0\n0 1 1\n1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 518, "matrix": [[1, 1, 0], [0, 1, 1], [1, 1, 1]], "solution": [[1, 1, 0], [0, 1, 1], [1, 2, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1\n1 0 1 0 1 0\n1 1 1 1 1 0\n1 1 1 1 1 1\n1 0 1 0 0 0\n1 1 1 1 0 1\n", "answer": "1 0 1 0 1 1\n1 0 1 0 1 0\n2 1 2 1 1 0\n2 1 2 1 1 1\n1 0 1 0 0 0\n2 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 519, "matrix": [[1, 0, 1, 0, 1, 1], [1, 0, 1, 0, 1, 0], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0], [1, 1, 1, 1, 0, 1]], "solution": [[1, 0, 1, 0, 1, 1], [1, 0, 1, 0, 1, 0], [2, 1, 2, 1, 1, 0], [2, 1, 2, 1, 1, 1], [1, 0, 1, 0, 0, 0], [2, 1, 2, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 0\n0 0 1 1 1 1 0 1\n1 1 1 1 0 1 1 1\n1 1 1 0 0 1 1 1\n1 0 1 0 0 0 0 1\n1 1 1 1 1 0 0 0\n0 1 1 1 1 1 1 1\n0 1 1 0 0 1 0 0\n", "answer": "1 1 2 2 1 0 1 0\n0 0 1 2 1 1 0 1\n1 1 2 1 0 1 1 2\n2 1 1 0 0 1 1 2\n1 0 1 0 0 0 0 1\n1 1 2 1 1 0 0 0\n0 1 2 1 1 1 1 1\n0 1 1 0 0 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 520, "matrix": [[1, 1, 1, 1, 1, 0, 1, 0], [0, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1], [1, 0, 1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 0, 0]], "solution": [[1, 1, 2, 2, 1, 0, 1, 0], [0, 0, 1, 2, 1, 1, 0, 1], [1, 1, 2, 1, 0, 1, 1, 2], [2, 1, 1, 0, 0, 1, 1, 2], [1, 0, 1, 0, 0, 0, 0, 1], [1, 1, 2, 1, 1, 0, 0, 0], [0, 1, 2, 1, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 0, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 1\n0 1 1 1 1 1 1\n1 0 1 1 0 1 1\n1 1 0 1 1 0 1\n1 1 1 1 0 1 1\n0 1 1 1 1 1 0\n0 1 0 0 0 1 1\n", "answer": "1 2 2 1 0 0 1\n0 1 2 2 1 1 2\n1 0 1 1 0 1 2\n2 1 0 1 1 0 1\n1 2 1 1 0 1 1\n0 1 1 1 1 1 0\n0 1 0 0 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 521, "matrix": [[1, 1, 1, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 1, 1]], "solution": [[1, 2, 2, 1, 0, 0, 1], [0, 1, 2, 2, 1, 1, 2], [1, 0, 1, 1, 0, 1, 2], [2, 1, 0, 1, 1, 0, 1], [1, 2, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 1, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 1 1 1 1 0 1\n0 0 1 1 1 1 1\n0 0 1 1 1 1 1\n0 1 1 1 1 1 1\n1 1 0 1 1 1 0\n0 0 0 0 0 0 1\n", "answer": "2 2 3 3 2 1 2\n1 1 2 2 1 0 1\n0 0 1 2 2 1 2\n0 0 1 2 3 2 2\n0 1 1 2 2 2 1\n1 1 0 1 1 1 0\n0 0 0 0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 522, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [0, 0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 1]], "solution": [[2, 2, 3, 3, 2, 1, 2], [1, 1, 2, 2, 1, 0, 1], [0, 0, 1, 2, 2, 1, 2], [0, 0, 1, 2, 3, 2, 2], [0, 1, 1, 2, 2, 2, 1], [1, 1, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 0 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 0 0 0 1\n0 1 1 1 1 0 0 1 1 1\n1 1 1 0 0 1 0 1 0 1\n1 1 1 1 0 1 0 0 0 1\n0 1 1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 0 1 1\n0 1 1 1 0 1 1 1 1 0\n1 0 0 1 0 1 1 1 1 1\n", "answer": "0 0 1 2 2 1 0 1 2 3\n1 1 2 1 2 2 1 1 1 2\n1 2 1 0 1 1 0 0 0 1\n0 1 2 1 1 0 0 1 1 2\n1 2 1 0 0 1 0 1 0 1\n1 2 2 1 0 1 0 0 0 1\n0 1 1 0 1 2 1 1 1 2\n1 2 2 1 1 2 1 0 1 1\n0 1 1 1 0 1 2 1 1 0\n1 0 0 1 0 1 2 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 523, "matrix": [[0, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0, 0, 0, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1, 0], [1, 0, 0, 1, 0, 1, 1, 1, 1, 1]], "solution": [[0, 0, 1, 2, 2, 1, 0, 1, 2, 3], [1, 1, 2, 1, 2, 2, 1, 1, 1, 2], [1, 2, 1, 0, 1, 1, 0, 0, 0, 1], [0, 1, 2, 1, 1, 0, 0, 1, 1, 2], [1, 2, 1, 0, 0, 1, 0, 1, 0, 1], [1, 2, 2, 1, 0, 1, 0, 0, 0, 1], [0, 1, 1, 0, 1, 2, 1, 1, 1, 2], [1, 2, 2, 1, 1, 2, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 2, 1, 1, 0], [1, 0, 0, 1, 0, 1, 2, 2, 2, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 1 0 0\n1 0 1 1 0 0 1 1 1 0\n1 1 0 1 0 0 1 1 0 0\n1 0 1 1 1 1 1 0 0 0\n0 1 1 0 1 1 1 1 1 1\n1 1 0 1 1 1 0 1 0 0\n0 1 1 0 1 1 0 1 1 1\n1 0 0 1 1 1 1 1 1 1\n1 0 1 1 0 1 1 0 1 1\n1 1 1 0 1 0 1 1 1 1\n", "answer": "2 1 2 2 1 1 0 1 0 0\n1 0 1 1 0 0 1 2 1 0\n2 1 0 1 0 0 1 1 0 0\n1 0 1 1 1 1 1 0 0 0\n0 1 1 0 1 2 1 1 1 1\n1 1 0 1 2 1 0 1 0 0\n0 1 1 0 1 1 0 1 1 1\n1 0 0 1 1 2 1 1 2 2\n1 0 1 1 0 1 1 0 1 2\n2 1 1 0 1 0 1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 524, "matrix": [[1, 1, 1, 1, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 0, 0, 1, 1, 1, 0], [1, 1, 0, 1, 0, 0, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1, 0, 0, 0], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1, 1, 1]], "solution": [[2, 1, 2, 2, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 0, 0, 1, 2, 1, 0], [2, 1, 0, 1, 0, 0, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1, 0, 0, 0], [0, 1, 1, 0, 1, 2, 1, 1, 1, 1], [1, 1, 0, 1, 2, 1, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 1, 1, 2, 1, 1, 2, 2], [1, 0, 1, 1, 0, 1, 1, 0, 1, 2], [2, 1, 1, 0, 1, 0, 1, 1, 2, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1\n0 1 1 1 1\n1 1 1 1 1\n1 1 1 1 1\n1 1 1 1 0\n", "answer": "1 0 1 2 3\n0 1 2 3 3\n1 2 3 3 2\n2 3 3 2 1\n3 3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 525, "matrix": [[1, 0, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0]], "solution": [[1, 0, 1, 2, 3], [0, 1, 2, 3, 3], [1, 2, 3, 3, 2], [2, 3, 3, 2, 1], [3, 3, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0\n1 1 1 0\n0 1 1 1\n0 1 1 1\n", "answer": "2 1 0 0\n1 2 1 0\n0 1 2 1\n0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 526, "matrix": [[1, 1, 0, 0], [1, 1, 1, 0], [0, 1, 1, 1], [0, 1, 1, 1]], "solution": [[2, 1, 0, 0], [1, 2, 1, 0], [0, 1, 2, 1], [0, 1, 2, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 1\n0 1 0\n", "answer": "0 1 2\n1 2 1\n0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 527, "matrix": [[0, 1, 1], [1, 1, 1], [0, 1, 0]], "solution": [[0, 1, 2], [1, 2, 1], [0, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0 1\n1 1 1 0\n0 1 0 1\n1 1 1 1\n", "answer": "0 0 0 1\n1 1 1 0\n0 1 0 1\n1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 528, "matrix": [[0, 0, 0, 1], [1, 1, 1, 0], [0, 1, 0, 1], [1, 1, 1, 1]], "solution": [[0, 0, 0, 1], [1, 1, 1, 0], [0, 1, 0, 1], [1, 2, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0\n0 1 1 1 1\n1 0 0 0 1\n1 0 1 0 0\n1 0 1 1 1\n", "answer": "1 1 0 1 0\n0 1 1 1 1\n1 0 0 0 1\n1 0 1 0 0\n1 0 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 529, "matrix": [[1, 1, 0, 1, 0], [0, 1, 1, 1, 1], [1, 0, 0, 0, 1], [1, 0, 1, 0, 0], [1, 0, 1, 1, 1]], "solution": [[1, 1, 0, 1, 0], [0, 1, 1, 1, 1], [1, 0, 0, 0, 1], [1, 0, 1, 0, 0], [1, 0, 1, 1, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1\n1 1 1 1 1 1\n0 1 1 0 1 1\n1 0 1 1 1 1\n1 1 0 1 1 1\n0 1 0 1 0 0\n", "answer": "2 1 0 0 1 2\n1 2 1 1 2 3\n0 1 1 0 1 2\n1 0 1 1 2 2\n1 1 0 1 1 1\n0 1 0 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 530, "matrix": [[1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 0]], "solution": [[2, 1, 0, 0, 1, 2], [1, 2, 1, 1, 2, 3], [0, 1, 1, 0, 1, 2], [1, 0, 1, 1, 2, 2], [1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 1\n1 1 0 1 1 1 1\n0 1 1 0 1 1 0\n1 0 1 1 1 1 1\n1 1 1 1 1 1 1\n0 1 1 1 1 1 0\n1 1 1 1 1 0 1\n", "answer": "2 2 1 1 0 0 1\n1 1 0 1 1 1 1\n0 1 1 0 1 1 0\n1 0 1 1 2 2 1\n1 1 2 2 3 2 1\n0 1 2 3 2 1 0\n1 2 3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 531, "matrix": [[1, 1, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1]], "solution": [[2, 2, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 2, 2, 1], [1, 1, 2, 2, 3, 2, 1], [0, 1, 2, 3, 2, 1, 0], [1, 2, 3, 2, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1\n1 1 1 0 1 0 1\n1 0 1 1 1 1 0\n1 1 1 0 1 0 0\n1 0 1 1 1 1 1\n1 0 1 1 1 1 0\n1 0 0 1 1 0 1\n", "answer": "3 2 2 1 0 1 2\n2 1 1 0 1 0 1\n1 0 1 1 2 1 0\n2 1 1 0 1 0 0\n1 0 1 1 2 1 1\n1 0 1 2 2 1 0\n1 0 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 532, "matrix": [[1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 0, 1]], "solution": [[3, 2, 2, 1, 0, 1, 2], [2, 1, 1, 0, 1, 0, 1], [1, 0, 1, 1, 2, 1, 0], [2, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 2, 1, 1], [1, 0, 1, 2, 2, 1, 0], [1, 0, 0, 1, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 0 1\n1 1 1 1 0 1 1\n1 0 1 0 0 0 0\n1 1 1 1 0 1 1\n1 1 1 0 1 0 1\n1 1 1 1 1 0 1\n0 1 1 1 1 1 0\n", "answer": "0 1 2 1 0 0 1\n1 1 2 1 0 1 1\n1 0 1 0 0 0 0\n2 1 2 1 0 1 1\n2 2 1 0 1 0 1\n1 2 2 1 1 0 1\n0 1 2 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 533, "matrix": [[0, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 0, 0, 0], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 2, 1, 0, 0, 1], [1, 1, 2, 1, 0, 1, 1], [1, 0, 1, 0, 0, 0, 0], [2, 1, 2, 1, 0, 1, 1], [2, 2, 1, 0, 1, 0, 1], [1, 2, 2, 1, 1, 0, 1], [0, 1, 2, 2, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1 1 0\n0 1 1 1 0 1 0 1 1 1\n1 1 1 1 1 1 1 0 1 1\n1 0 0 1 1 0 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 0 1 0 1\n1 1 1 1 1 0 1 0 1 1\n1 0 1 1 0 1 0 1 1 1\n1 0 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 0\n", "answer": "1 2 2 1 0 1 1 2 1 0\n0 1 2 1 0 1 0 1 2 1\n1 1 1 2 1 1 1 0 1 2\n1 0 0 1 1 0 1 1 2 3\n2 1 1 2 2 1 1 2 1 2\n3 2 2 2 1 0 0 1 0 1\n2 1 2 2 1 0 1 0 1 2\n1 0 1 1 0 1 0 1 2 2\n1 0 1 2 1 2 1 2 2 1\n2 1 2 3 2 3 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 534, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[1, 2, 2, 1, 0, 1, 1, 2, 1, 0], [0, 1, 2, 1, 0, 1, 0, 1, 2, 1], [1, 1, 1, 2, 1, 1, 1, 0, 1, 2], [1, 0, 0, 1, 1, 0, 1, 1, 2, 3], [2, 1, 1, 2, 2, 1, 1, 2, 1, 2], [3, 2, 2, 2, 1, 0, 0, 1, 0, 1], [2, 1, 2, 2, 1, 0, 1, 0, 1, 2], [1, 0, 1, 1, 0, 1, 0, 1, 2, 2], [1, 0, 1, 2, 1, 2, 1, 2, 2, 1], [2, 1, 2, 3, 2, 3, 2, 2, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1 0 0\n1 1 0 1 1 1 1 0 1\n1 1 1 1 1 1 0 0 1\n0 0 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1 1\n1 1 0 0 1 0 1 1 1\n1 1 1 1 1 1 1 1 0\n0 1 1 1 1 1 0 1 1\n1 1 0 1 1 1 1 0 1\n", "answer": "2 1 0 0 1 2 1 0 0\n2 1 0 1 2 2 1 0 1\n1 1 1 2 2 1 0 0 1\n0 0 1 2 3 2 1 1 0\n1 1 1 1 2 1 2 2 1\n2 1 0 0 1 0 1 2 1\n1 2 1 1 2 1 1 1 0\n0 1 1 2 2 1 0 1 1\n1 1 0 1 2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 535, "matrix": [[1, 1, 0, 0, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1]], "solution": [[2, 1, 0, 0, 1, 2, 1, 0, 0], [2, 1, 0, 1, 2, 2, 1, 0, 1], [1, 1, 1, 2, 2, 1, 0, 0, 1], [0, 0, 1, 2, 3, 2, 1, 1, 0], [1, 1, 1, 1, 2, 1, 2, 2, 1], [2, 1, 0, 0, 1, 0, 1, 2, 1], [1, 2, 1, 1, 2, 1, 1, 1, 0], [0, 1, 1, 2, 2, 1, 0, 1, 1], [1, 1, 0, 1, 2, 2, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 1 1 1 1 1 1\n1 0 1 0 0 0 0\n1 1 1 1 0 1 0\n1 1 0 1 1 1 1\n1 0 0 1 0 0 1\n1 1 1 1 1 1 1\n", "answer": "3 2 3 2 2 2 2\n2 1 2 1 1 1 1\n1 0 1 0 0 0 0\n2 1 1 1 0 1 0\n2 1 0 1 1 1 1\n1 0 0 1 0 0 1\n2 1 1 2 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 536, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0, 0], [1, 1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]], "solution": [[3, 2, 3, 2, 2, 2, 2], [2, 1, 2, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0, 0], [2, 1, 1, 1, 0, 1, 0], [2, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 0, 0, 1], [2, 1, 1, 2, 1, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1\n0 1 1 1 1 1 0 1\n1 1 1 1 1 0 1 1\n1 1 1 1 1 0 0 1\n1 1 1 0 1 0 1 1\n1 1 1 1 0 1 1 1\n0 1 0 1 0 1 1 1\n0 1 1 0 1 1 0 1\n", "answer": "1 2 3 2 1 0 1 2\n0 1 2 3 2 1 0 1\n1 2 3 2 1 0 1 2\n2 3 2 1 1 0 0 1\n2 2 1 0 1 0 1 2\n1 2 1 1 0 1 2 3\n0 1 0 1 0 1 1 2\n0 1 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 537, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1]], "solution": [[1, 2, 3, 2, 1, 0, 1, 2], [0, 1, 2, 3, 2, 1, 0, 1], [1, 2, 3, 2, 1, 0, 1, 2], [2, 3, 2, 1, 1, 0, 0, 1], [2, 2, 1, 0, 1, 0, 1, 2], [1, 2, 1, 1, 0, 1, 2, 3], [0, 1, 0, 1, 0, 1, 1, 2], [0, 1, 1, 0, 1, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1\n1 1 1 1 0 1 1\n1 1 0 0 1 1 0\n1 1 1 1 0 1 1\n1 1 0 0 1 0 1\n1 1 1 1 1 1 1\n1 1 0 0 1 1 1\n", "answer": "4 3 2 2 1 0 1\n3 2 1 1 0 1 1\n2 1 0 0 1 1 0\n3 2 1 1 0 1 1\n2 1 0 0 1 0 1\n3 2 1 1 2 1 2\n2 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 538, "matrix": [[1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1]], "solution": [[4, 3, 2, 2, 1, 0, 1], [3, 2, 1, 1, 0, 1, 1], [2, 1, 0, 0, 1, 1, 0], [3, 2, 1, 1, 0, 1, 1], [2, 1, 0, 0, 1, 0, 1], [3, 2, 1, 1, 2, 1, 2], [2, 1, 0, 0, 1, 2, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n1 1 1\n0 1 0\n", "answer": "2 1 0\n1 2 1\n0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 539, "matrix": [[1, 1, 0], [1, 1, 1], [0, 1, 0]], "solution": [[2, 1, 0], [1, 2, 1], [0, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 0 0\n1 0 0 1 1 1\n1 0 1 1 1 0\n1 1 1 0 1 1\n1 1 1 0 0 1\n1 1 1 1 1 1\n", "answer": "1 0 0 1 0 0\n1 0 0 1 1 1\n1 0 1 1 1 0\n2 1 1 0 1 1\n3 2 1 0 0 1\n4 3 2 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 540, "matrix": [[1, 0, 0, 1, 0, 0], [1, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 0, 1, 0, 0], [1, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0], [2, 1, 1, 0, 1, 1], [3, 2, 1, 0, 0, 1], [4, 3, 2, 1, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n1 1 1 1\n1 1 1 1\n1 1 0 1\n", "answer": "1 0 1 2\n2 1 2 3\n3 2 1 2\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 541, "matrix": [[1, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 0, 1]], "solution": [[1, 0, 1, 2], [2, 1, 2, 3], [3, 2, 1, 2], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0 1\n1 0 1 1 1 1 0\n0 0 1 1 1 1 1\n1 1 0 1 1 0 0\n1 1 1 1 1 0 1\n1 1 1 1 1 1 1\n1 1 1 1 1 1 1\n", "answer": "2 1 0 1 1 0 1\n1 0 1 2 2 1 0\n0 0 1 2 2 1 1\n1 1 0 1 1 0 0\n2 2 1 2 1 0 1\n3 3 2 3 2 1 2\n4 4 3 4 3 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 542, "matrix": [[1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 1, 0, 1], [1, 0, 1, 2, 2, 1, 0], [0, 0, 1, 2, 2, 1, 1], [1, 1, 0, 1, 1, 0, 0], [2, 2, 1, 2, 1, 0, 1], [3, 3, 2, 3, 2, 1, 2], [4, 4, 3, 4, 3, 2, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 0 0\n1 1 0\n", "answer": "0 1 1\n1 0 0\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 543, "matrix": [[0, 1, 1], [1, 0, 0], [1, 1, 0]], "solution": [[0, 1, 1], [1, 0, 0], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1\n0 0 1 1 1 0 1\n1 1 1 1 0 1 1\n1 1 0 1 1 0 1\n1 1 1 1 0 1 1\n0 1 0 1 1 1 0\n1 0 1 0 0 1 1\n", "answer": "0 1 2 3 2 1 2\n0 0 1 2 1 0 1\n1 1 1 1 0 1 2\n2 1 0 1 1 0 1\n1 2 1 1 0 1 1\n0 1 0 1 1 1 0\n1 0 1 0 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 544, "matrix": [[0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 1, 1, 0], [1, 0, 1, 0, 0, 1, 1]], "solution": [[0, 1, 2, 3, 2, 1, 2], [0, 0, 1, 2, 1, 0, 1], [1, 1, 1, 1, 0, 1, 2], [2, 1, 0, 1, 1, 0, 1], [1, 2, 1, 1, 0, 1, 1], [0, 1, 0, 1, 1, 1, 0], [1, 0, 1, 0, 0, 1, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 0 1\n1 1 1 0 1 0 1 1\n0 1 1 1 1 0 0 0\n1 1 1 1 1 0 1 1\n1 1 1 1 1 1 0 0\n1 1 0 1 1 1 1 1\n1 1 1 0 1 1 1 1\n1 0 1 0 1 0 1 0\n", "answer": "0 1 2 1 2 1 0 1\n1 2 1 0 1 0 1 1\n0 1 2 1 1 0 0 0\n1 2 2 2 1 0 1 1\n2 2 1 2 2 1 0 0\n2 1 0 1 2 2 1 1\n2 1 1 0 1 1 2 1\n1 0 1 0 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 545, "matrix": [[0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0]], "solution": [[0, 1, 2, 1, 2, 1, 0, 1], [1, 2, 1, 0, 1, 0, 1, 1], [0, 1, 2, 1, 1, 0, 0, 0], [1, 2, 2, 2, 1, 0, 1, 1], [2, 2, 1, 2, 2, 1, 0, 0], [2, 1, 0, 1, 2, 2, 1, 1], [2, 1, 1, 0, 1, 1, 2, 1], [1, 0, 1, 0, 1, 0, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 0 1 1 1 1\n0 1 0 0 1 0 1 1 1\n1 0 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 0\n0 1 0 1 1 1 1 1 1\n1 1 1 1 1 0 0 1 0\n1 1 1 0 1 0 0 0 1\n1 0 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 1\n", "answer": "1 0 0 1 0 1 2 3 3\n0 1 0 0 1 0 1 2 2\n1 0 0 1 2 1 2 2 1\n1 1 1 2 3 2 2 1 0\n0 1 0 1 2 1 1 2 1\n1 2 1 1 1 0 0 1 0\n2 1 1 0 1 0 0 0 1\n1 0 1 1 2 1 0 1 2\n2 1 2 2 3 2 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 546, "matrix": [[1, 0, 0, 1, 0, 1, 1, 1, 1], [0, 1, 0, 0, 1, 0, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 1, 1, 0, 1, 0, 0, 0, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 0, 1, 0, 1, 2, 3, 3], [0, 1, 0, 0, 1, 0, 1, 2, 2], [1, 0, 0, 1, 2, 1, 2, 2, 1], [1, 1, 1, 2, 3, 2, 2, 1, 0], [0, 1, 0, 1, 2, 1, 1, 2, 1], [1, 2, 1, 1, 1, 0, 0, 1, 0], [2, 1, 1, 0, 1, 0, 0, 0, 1], [1, 0, 1, 1, 2, 1, 0, 1, 2], [2, 1, 2, 2, 3, 2, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n0 1 1 1\n1 1 1 1\n1 0 0 0\n", "answer": "1 2 1 0\n0 1 2 1\n1 1 1 1\n1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 547, "matrix": [[1, 1, 1, 0], [0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 0, 0]], "solution": [[1, 2, 1, 0], [0, 1, 2, 1], [1, 1, 1, 1], [1, 0, 0, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 0\n1 1 1\n", "answer": "3 2 1\n2 1 0\n3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 548, "matrix": [[1, 1, 1], [1, 1, 0], [1, 1, 1]], "solution": [[3, 2, 1], [2, 1, 0], [3, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1 1 1\n0 1 1 1 1 1 1 1 1\n1 1 1 1 0 0 0 1 1\n1 1 0 1 1 1 0 1 1\n1 0 1 0 1 1 1 0 1\n1 1 0 1 1 0 1 1 1\n1 1 1 1 1 0 1 1 1\n0 1 0 1 1 1 1 1 0\n1 1 0 1 0 1 1 0 1\n", "answer": "1 0 1 1 0 1 2 3 4\n0 1 2 2 1 1 1 2 3\n1 2 1 1 0 0 0 1 2\n2 1 0 1 1 1 0 1 2\n1 0 1 0 1 1 1 0 1\n2 1 0 1 1 0 1 1 2\n1 2 1 2 1 0 1 2 1\n0 1 0 1 1 1 2 1 0\n1 1 0 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 549, "matrix": [[1, 0, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 0, 1, 1, 0, 1]], "solution": [[1, 0, 1, 1, 0, 1, 2, 3, 4], [0, 1, 2, 2, 1, 1, 1, 2, 3], [1, 2, 1, 1, 0, 0, 0, 1, 2], [2, 1, 0, 1, 1, 1, 0, 1, 2], [1, 0, 1, 0, 1, 1, 1, 0, 1], [2, 1, 0, 1, 1, 0, 1, 1, 2], [1, 2, 1, 2, 1, 0, 1, 2, 1], [0, 1, 0, 1, 1, 1, 2, 1, 0], [1, 1, 0, 1, 0, 1, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 1 0 1\n0 1 0 1\n1 0 1 1\n", "answer": "2 2 1 0\n1 1 0 1\n0 1 0 1\n1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 550, "matrix": [[1, 1, 1, 0], [1, 1, 0, 1], [0, 1, 0, 1], [1, 0, 1, 1]], "solution": [[2, 2, 1, 0], [1, 1, 0, 1], [0, 1, 0, 1], [1, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1\n1 0 1 1 1 1 1 1\n1 0 0 0 0 1 1 1\n1 1 0 0 1 0 0 1\n1 1 0 1 0 0 1 1\n1 1 1 1 1 1 1 1\n0 1 1 1 0 1 1 1\n1 1 1 0 1 1 0 1\n", "answer": "2 1 2 1 0 1 2 3\n1 0 1 1 1 2 2 3\n1 0 0 0 0 1 1 2\n2 1 0 0 1 0 0 1\n2 1 0 1 0 0 1 2\n1 2 1 2 1 1 2 3\n0 1 2 1 0 1 1 2\n1 2 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 551, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 1, 0, 0, 1], [1, 1, 0, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1]], "solution": [[2, 1, 2, 1, 0, 1, 2, 3], [1, 0, 1, 1, 1, 2, 2, 3], [1, 0, 0, 0, 0, 1, 1, 2], [2, 1, 0, 0, 1, 0, 0, 1], [2, 1, 0, 1, 0, 0, 1, 2], [1, 2, 1, 2, 1, 1, 2, 3], [0, 1, 2, 1, 0, 1, 1, 2], [1, 2, 1, 0, 1, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0\n1 1 1 1 1\n0 1 1 1 0\n0 1 1 1 1\n1 0 0 1 1\n", "answer": "1 0 1 1 0\n1 1 2 2 1\n0 1 2 1 0\n0 1 1 2 1\n1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 552, "matrix": [[1, 0, 1, 1, 0], [1, 1, 1, 1, 1], [0, 1, 1, 1, 0], [0, 1, 1, 1, 1], [1, 0, 0, 1, 1]], "solution": [[1, 0, 1, 1, 0], [1, 1, 2, 2, 1], [0, 1, 2, 1, 0], [0, 1, 1, 2, 1], [1, 0, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1\n1 1 1 1 1 1 1 1\n1 1 0 1 1 1 0 1\n1 1 1 1 1 1 1 1\n1 1 1 1 0 1 0 0\n0 0 1 1 1 1 1 1\n1 1 1 1 1 0 1 1\n0 1 0 1 0 0 1 1\n", "answer": "4 3 2 1 0 1 2 3\n3 2 1 2 1 2 1 2\n2 1 0 1 2 1 0 1\n2 2 1 2 1 2 1 1\n1 1 2 1 0 1 0 0\n0 0 1 2 1 1 1 1\n1 1 1 2 1 0 1 2\n0 1 0 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 553, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 0, 0, 1, 1]], "solution": [[4, 3, 2, 1, 0, 1, 2, 3], [3, 2, 1, 2, 1, 2, 1, 2], [2, 1, 0, 1, 2, 1, 0, 1], [2, 2, 1, 2, 1, 2, 1, 1], [1, 1, 2, 1, 0, 1, 0, 0], [0, 0, 1, 2, 1, 1, 1, 1], [1, 1, 1, 2, 1, 0, 1, 2], [0, 1, 0, 1, 0, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1 1\n0 1 1 1 1 1 1 1 0\n1 0 1 0 1 1 1 1 1\n1 0 1 0 1 1 1 1 1\n1 1 1 0 0 1 1 1 1\n0 0 1 1 1 0 1 1 1\n1 1 1 0 1 0 0 1 0\n1 1 1 0 1 1 1 1 1\n1 1 1 0 1 1 1 1 1\n", "answer": "1 2 1 0 1 2 3 2 1\n0 1 2 1 2 3 2 1 0\n1 0 1 0 1 2 3 2 1\n1 0 1 0 1 2 3 3 2\n1 1 1 0 0 1 2 3 2\n0 0 1 1 1 0 1 2 1\n1 1 1 0 1 0 0 1 0\n2 2 1 0 1 1 1 2 1\n3 2 1 0 1 2 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 554, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[1, 2, 1, 0, 1, 2, 3, 2, 1], [0, 1, 2, 1, 2, 3, 2, 1, 0], [1, 0, 1, 0, 1, 2, 3, 2, 1], [1, 0, 1, 0, 1, 2, 3, 3, 2], [1, 1, 1, 0, 0, 1, 2, 3, 2], [0, 0, 1, 1, 1, 0, 1, 2, 1], [1, 1, 1, 0, 1, 0, 0, 1, 0], [2, 2, 1, 0, 1, 1, 1, 2, 1], [3, 2, 1, 0, 1, 2, 2, 3, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 1 1 1\n0 1 1 1\n1 0 1 0\n", "answer": "2 2 1 0\n1 2 2 1\n0 1 2 1\n1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 555, "matrix": [[1, 1, 1, 0], [1, 1, 1, 1], [0, 1, 1, 1], [1, 0, 1, 0]], "solution": [[2, 2, 1, 0], [1, 2, 2, 1], [0, 1, 2, 1], [1, 0, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n0 1 1 1\n1 1 1 1\n0 1 1 1\n", "answer": "1 0 1 2\n0 1 2 3\n1 2 3 4\n0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 556, "matrix": [[1, 0, 1, 1], [0, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1]], "solution": [[1, 0, 1, 2], [0, 1, 2, 3], [1, 2, 3, 4], [0, 1, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1\n1 0 1\n0 1 1\n", "answer": "0 0 1\n1 0 1\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 557, "matrix": [[0, 0, 1], [1, 0, 1], [0, 1, 1]], "solution": [[0, 0, 1], [1, 0, 1], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0 1 1\n1 1 1 1 1 1 1\n1 1 1 1 1 1 1\n0 0 1 0 1 1 1\n1 1 0 0 1 1 0\n1 1 1 1 1 1 1\n0 1 0 1 1 1 0\n", "answer": "0 1 1 0 0 1 2\n1 2 2 1 1 2 3\n1 1 2 1 2 3 2\n0 0 1 0 1 2 1\n1 1 0 0 1 1 0\n1 2 1 1 2 2 1\n0 1 0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 558, "matrix": [[0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 0]], "solution": [[0, 1, 1, 0, 0, 1, 2], [1, 2, 2, 1, 1, 2, 3], [1, 1, 2, 1, 2, 3, 2], [0, 0, 1, 0, 1, 2, 1], [1, 1, 0, 0, 1, 1, 0], [1, 2, 1, 1, 2, 2, 1], [0, 1, 0, 1, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0\n1 1 1 0 1 1\n1 1 1 0 1 1\n1 0 0 1 1 0\n1 1 1 0 1 1\n1 0 1 1 1 1\n", "answer": "0 1 2 1 1 0\n1 2 1 0 1 1\n2 1 1 0 1 1\n1 0 0 1 1 0\n2 1 1 0 1 1\n1 0 1 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 559, "matrix": [[0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1]], "solution": [[0, 1, 2, 1, 1, 0], [1, 2, 1, 0, 1, 1], [2, 1, 1, 0, 1, 1], [1, 0, 0, 1, 1, 0], [2, 1, 1, 0, 1, 1], [1, 0, 1, 1, 2, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1\n1 0 0 0 1 1 1 0 1\n1 1 1 1 1 1 1 1 0\n1 1 1 0 1 1 1 1 0\n1 1 0 1 1 1 1 0 1\n1 0 1 0 1 1 1 0 0\n0 1 1 0 1 1 1 1 1\n0 1 1 1 1 1 0 1 1\n1 1 1 0 1 0 0 1 0\n", "answer": "2 1 1 1 2 3 2 1 2\n1 0 0 0 1 2 1 0 1\n2 1 1 1 2 3 2 1 0\n3 2 1 0 1 2 2 1 0\n2 1 0 1 2 2 1 0 1\n1 0 1 0 1 2 1 0 0\n0 1 1 0 1 2 1 1 1\n0 1 2 1 2 1 0 1 1\n1 2 1 0 1 0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 560, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1, 0]], "solution": [[2, 1, 1, 1, 2, 3, 2, 1, 2], [1, 0, 0, 0, 1, 2, 1, 0, 1], [2, 1, 1, 1, 2, 3, 2, 1, 0], [3, 2, 1, 0, 1, 2, 2, 1, 0], [2, 1, 0, 1, 2, 2, 1, 0, 1], [1, 0, 1, 0, 1, 2, 1, 0, 0], [0, 1, 1, 0, 1, 2, 1, 1, 1], [0, 1, 2, 1, 2, 1, 0, 1, 1], [1, 2, 1, 0, 1, 0, 0, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0 1\n1 1 1 1 1\n0 0 0 0 1\n1 1 1 1 1\n0 1 1 1 0\n", "answer": "0 1 0 0 1\n1 1 1 1 2\n0 0 0 0 1\n1 1 1 1 1\n0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 561, "matrix": [[0, 1, 0, 0, 1], [1, 1, 1, 1, 1], [0, 0, 0, 0, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 0]], "solution": [[0, 1, 0, 0, 1], [1, 1, 1, 1, 2], [0, 0, 0, 0, 1], [1, 1, 1, 1, 1], [0, 1, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n1 1 1 1\n1 1 1 1\n1 1 0 1\n", "answer": "1 0 1 2\n2 1 2 3\n3 2 1 2\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 562, "matrix": [[1, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 0, 1]], "solution": [[1, 0, 1, 2], [2, 1, 2, 3], [3, 2, 1, 2], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0\n1 1 0 1 1\n0 0 1 0 0\n1 1 1 1 1\n1 1 1 1 0\n", "answer": "0 1 1 1 0\n1 1 0 1 1\n0 0 1 0 0\n1 1 2 1 1\n2 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 563, "matrix": [[0, 1, 1, 1, 0], [1, 1, 0, 1, 1], [0, 0, 1, 0, 0], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0]], "solution": [[0, 1, 1, 1, 0], [1, 1, 0, 1, 1], [0, 0, 1, 0, 0], [1, 1, 2, 1, 1], [2, 2, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 0\n1 1 1\n", "answer": "0 1 1\n1 1 0\n2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 564, "matrix": [[0, 1, 1], [1, 1, 0], [1, 1, 1]], "solution": [[0, 1, 1], [1, 1, 0], [2, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n0 1 1 1\n1 0 0 1\n1 1 1 0\n", "answer": "1 2 2 3\n0 1 1 2\n1 0 0 1\n2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 565, "matrix": [[1, 1, 1, 1], [0, 1, 1, 1], [1, 0, 0, 1], [1, 1, 1, 0]], "solution": [[1, 2, 2, 3], [0, 1, 1, 2], [1, 0, 0, 1], [2, 1, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0\n1 1 1 1 1\n1 1 0 1 1\n0 1 0 1 1\n1 1 0 1 1\n", "answer": "3 3 2 1 0\n2 2 1 2 1\n1 1 0 1 2\n0 1 0 1 2\n1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 566, "matrix": [[1, 1, 1, 1, 0], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [0, 1, 0, 1, 1], [1, 1, 0, 1, 1]], "solution": [[3, 3, 2, 1, 0], [2, 2, 1, 2, 1], [1, 1, 0, 1, 2], [0, 1, 0, 1, 2], [1, 1, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1\n1 1 1 1 1 1 0\n1 1 1 1 0 0 1\n1 0 0 0 1 1 1\n1 0 0 1 1 1 1\n1 1 1 1 1 1 1\n1 1 1 0 0 1 1\n", "answer": "0 1 2 3 2 2 1\n1 2 2 2 1 1 0\n2 1 1 1 0 0 1\n1 0 0 0 1 1 2\n1 0 0 1 2 2 3\n2 1 1 1 1 2 3\n3 2 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 567, "matrix": [[0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1]], "solution": [[0, 1, 2, 3, 2, 2, 1], [1, 2, 2, 2, 1, 1, 0], [2, 1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 1, 1, 2], [1, 0, 0, 1, 2, 2, 3], [2, 1, 1, 1, 1, 2, 3], [3, 2, 1, 0, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 0 0 0 1 0 0\n1 1 1 1 1 1 1 1 1 1\n0 0 1 0 1 1 1 1 1 1\n0 0 1 1 1 1 1 1 1 1\n1 0 1 0 0 0 1 1 1 0\n0 0 0 1 0 1 1 0 1 1\n1 1 0 1 1 1 0 1 0 1\n0 1 1 1 1 0 0 1 1 0\n1 1 0 0 1 1 1 1 1 1\n1 1 1 1 0 1 0 1 1 1\n", "answer": "0 1 0 1 0 0 0 1 0 0\n1 1 1 1 1 1 1 2 1 1\n0 0 1 0 1 2 2 3 2 2\n0 0 1 1 1 1 2 2 2 1\n1 0 1 0 0 0 1 1 1 0\n0 0 0 1 0 1 1 0 1 1\n1 1 0 1 1 1 0 1 0 1\n0 1 1 1 1 0 0 1 1 0\n1 1 0 0 1 1 1 2 2 1\n2 2 1 1 0 1 0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 568, "matrix": [[0, 1, 0, 1, 0, 0, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1]], "solution": [[0, 1, 0, 1, 0, 0, 0, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 2, 1, 1], [0, 0, 1, 0, 1, 2, 2, 3, 2, 2], [0, 0, 1, 1, 1, 1, 2, 2, 2, 1], [1, 0, 1, 0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [1, 1, 0, 0, 1, 1, 1, 2, 2, 1], [2, 2, 1, 1, 0, 1, 0, 1, 2, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1\n0 1 1 1 1 0 1 1\n1 1 1 0 0 1 0 1\n1 1 1 0 1 1 0 1\n0 1 0 0 1 1 0 1\n1 0 0 0 1 0 1 1\n1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n", "answer": "1 2 2 1 0 1 2 3\n0 1 2 1 1 0 1 2\n1 2 1 0 0 1 0 1\n1 2 1 0 1 1 0 1\n0 1 0 0 1 1 0 1\n1 0 0 0 1 0 1 2\n1 0 1 1 2 1 2 3\n2 1 2 2 3 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 569, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 2, 2, 1, 0, 1, 2, 3], [0, 1, 2, 1, 1, 0, 1, 2], [1, 2, 1, 0, 0, 1, 0, 1], [1, 2, 1, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 0, 1, 2], [1, 0, 1, 1, 2, 1, 2, 3], [2, 1, 2, 2, 3, 2, 3, 4]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0 1 1\n1 0 1 1 0 1\n1 1 1 1 1 1\n1 1 0 1 1 1\n1 1 1 1 0 1\n1 0 1 1 1 0\n", "answer": "1 0 0 0 1 2\n1 0 1 1 0 1\n2 1 1 2 1 2\n2 1 0 1 1 2\n2 1 1 1 0 1\n1 0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 570, "matrix": [[1, 0, 0, 0, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0]], "solution": [[1, 0, 0, 0, 1, 2], [1, 0, 1, 1, 0, 1], [2, 1, 1, 2, 1, 2], [2, 1, 0, 1, 1, 2], [2, 1, 1, 1, 0, 1], [1, 0, 1, 2, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1\n1 1 1 1 1 1 1\n1 1 1 1 0 1 1\n1 1 1 0 1 1 0\n1 1 0 1 1 1 0\n1 1 1 1 1 0 1\n0 1 1 0 1 1 1\n", "answer": "2 1 0 0 1 2 3\n3 2 1 1 1 2 2\n4 3 2 1 0 1 1\n3 2 1 0 1 1 0\n2 1 0 1 2 1 0\n1 2 1 1 1 0 1\n0 1 1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 571, "matrix": [[1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1]], "solution": [[2, 1, 0, 0, 1, 2, 3], [3, 2, 1, 1, 1, 2, 2], [4, 3, 2, 1, 0, 1, 1], [3, 2, 1, 0, 1, 1, 0], [2, 1, 0, 1, 2, 1, 0], [1, 2, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 0 0\n0 0 1 1 0 0 0\n0 1 1 0 0 1 0\n1 1 1 0 1 0 1\n1 1 1 1 0 1 1\n1 1 1 0 0 1 1\n1 1 0 1 1 0 1\n", "answer": "1 0 1 2 1 0 0\n0 0 1 1 0 0 0\n0 1 1 0 0 1 0\n1 2 1 0 1 0 1\n2 3 2 1 0 1 2\n3 2 1 0 0 1 2\n2 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 572, "matrix": [[1, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0], [0, 1, 1, 0, 0, 1, 0], [1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1]], "solution": [[1, 0, 1, 2, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0], [0, 1, 1, 0, 0, 1, 0], [1, 2, 1, 0, 1, 0, 1], [2, 3, 2, 1, 0, 1, 2], [3, 2, 1, 0, 0, 1, 2], [2, 1, 0, 1, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 0\n1 0 1 1 1 1\n1 1 0 1 1 0\n1 0 0 1 1 1\n1 1 1 1 1 1\n0 1 1 0 1 1\n", "answer": "2 1 0 0 1 0\n1 0 1 1 2 1\n2 1 0 1 1 0\n1 0 0 1 2 1\n1 1 1 1 2 2\n0 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 573, "matrix": [[1, 1, 0, 0, 1, 0], [1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1]], "solution": [[2, 1, 0, 0, 1, 0], [1, 0, 1, 1, 2, 1], [2, 1, 0, 1, 1, 0], [1, 0, 0, 1, 2, 1], [1, 1, 1, 1, 2, 2], [0, 1, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 1 1\n1 1 1\n", "answer": "0 1 0\n1 2 1\n2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 574, "matrix": [[0, 1, 0], [1, 1, 1], [1, 1, 1]], "solution": [[0, 1, 0], [1, 2, 1], [2, 3, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1 1 1\n0 0 1 1 1 0 1 0 1 1\n1 1 1 1 1 0 0 0 0 0\n0 1 1 0 1 1 1 1 1 1\n1 1 1 1 1 1 0 0 1 1\n1 0 0 1 0 1 1 1 1 1\n1 1 1 1 1 0 0 0 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 0 1\n1 1 1 1 1 0 1 0 0 0\n", "answer": "1 1 1 0 1 1 2 1 2 2\n0 0 1 1 1 0 1 0 1 1\n1 1 2 1 1 0 0 0 0 0\n0 1 1 0 1 1 1 1 1 1\n1 1 1 1 1 1 0 0 1 2\n1 0 0 1 0 1 1 1 2 3\n2 1 1 2 1 0 0 0 1 2\n3 2 1 2 2 1 1 1 1 2\n2 1 0 1 2 1 2 1 0 1\n3 2 1 2 1 0 1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 575, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 0, 0, 0, 0], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 0, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 0, 0, 0]], "solution": [[1, 1, 1, 0, 1, 1, 2, 1, 2, 2], [0, 0, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 2, 1, 1, 0, 0, 0, 0, 0], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1, 2], [1, 0, 0, 1, 0, 1, 1, 1, 2, 3], [2, 1, 1, 2, 1, 0, 0, 0, 1, 2], [3, 2, 1, 2, 2, 1, 1, 1, 1, 2], [2, 1, 0, 1, 2, 1, 2, 1, 0, 1], [3, 2, 1, 2, 1, 0, 1, 0, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1 0 0\n1 1 1 1 1 1 1 1 0 1\n1 1 1 1 0 1 1 1 1 1\n0 0 0 1 1 1 0 1 0 1\n0 1 1 1 0 1 1 1 0 1\n0 1 0 1 0 1 0 1 1 1\n1 1 0 1 0 1 1 1 1 1\n1 1 0 1 0 0 1 0 1 0\n0 1 1 0 1 1 1 1 1 1\n1 0 1 0 1 1 0 0 1 1\n", "answer": "3 3 3 2 1 0 1 1 0 0\n2 2 2 2 1 1 2 1 0 1\n1 1 1 1 0 1 1 2 1 2\n0 0 0 1 1 1 0 1 0 1\n0 1 1 1 0 1 1 1 0 1\n0 1 0 1 0 1 0 1 1 2\n1 1 0 1 0 1 1 1 2 1\n1 1 0 1 0 0 1 0 1 0\n0 1 1 0 1 1 1 1 2 1\n1 0 1 0 1 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 576, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 0, 1, 0, 1, 0], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0, 0, 1, 1]], "solution": [[3, 3, 3, 2, 1, 0, 1, 1, 0, 0], [2, 2, 2, 2, 1, 1, 2, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 2, 1, 2], [0, 0, 0, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 1, 2], [1, 1, 0, 1, 0, 1, 1, 1, 2, 1], [1, 1, 0, 1, 0, 0, 1, 0, 1, 0], [0, 1, 1, 0, 1, 1, 1, 1, 2, 1], [1, 0, 1, 0, 1, 1, 0, 0, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0\n1 1 0\n1 0 0\n", "answer": "1 0 0\n2 1 0\n1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 577, "matrix": [[1, 0, 0], [1, 1, 0], [1, 0, 0]], "solution": [[1, 0, 0], [2, 1, 0], [1, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n0 0 1 1 0 1\n1 1 1 1 0 1\n1 1 1 1 1 0\n1 1 1 0 1 1\n1 1 0 1 0 1\n", "answer": "1 1 2 2 1 2\n0 0 1 1 0 1\n1 1 2 1 0 1\n2 2 2 1 1 0\n3 2 1 0 1 1\n2 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 578, "matrix": [[1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1]], "solution": [[1, 1, 2, 2, 1, 2], [0, 0, 1, 1, 0, 1], [1, 1, 2, 1, 0, 1], [2, 2, 2, 1, 1, 0], [3, 2, 1, 0, 1, 1], [2, 1, 0, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1\n1 1 1 0 1 0 0 1\n1 1 1 1 0 0 1 0\n0 1 0 1 1 1 1 1\n1 1 1 0 1 1 1 1\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1\n0 0 1 0 0 1 1 1\n", "answer": "3 3 2 1 1 0 1 2\n2 2 1 0 1 0 0 1\n1 2 1 1 0 0 1 0\n0 1 0 1 1 1 2 1\n1 2 1 0 1 2 2 2\n2 2 2 1 2 2 1 2\n1 1 2 1 1 1 0 1\n0 0 1 0 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 579, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 0, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [0, 0, 1, 0, 0, 1, 1, 1]], "solution": [[3, 3, 2, 1, 1, 0, 1, 2], [2, 2, 1, 0, 1, 0, 0, 1], [1, 2, 1, 1, 0, 0, 1, 0], [0, 1, 0, 1, 1, 1, 2, 1], [1, 2, 1, 0, 1, 2, 2, 2], [2, 2, 2, 1, 2, 2, 1, 2], [1, 1, 2, 1, 1, 1, 0, 1], [0, 0, 1, 0, 0, 1, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 1\n1 0 1 1 1 1 1\n1 0 1 1 0 1 1\n1 1 0 1 1 1 0\n1 0 0 1 0 0 0\n1 1 1 1 1 0 1\n1 1 1 1 1 1 1\n", "answer": "2 1 2 1 0 0 1\n1 0 1 2 1 1 2\n1 0 1 1 0 1 1\n2 1 0 1 1 1 0\n1 0 0 1 0 0 0\n2 1 1 2 1 0 1\n3 2 2 3 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 580, "matrix": [[1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 0, 0, 0], [1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 2, 1, 0, 0, 1], [1, 0, 1, 2, 1, 1, 2], [1, 0, 1, 1, 0, 1, 1], [2, 1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 0, 0, 0], [2, 1, 1, 2, 1, 0, 1], [3, 2, 2, 3, 2, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n0 0 1\n1 1 1\n", "answer": "1 0 1\n0 0 1\n1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 581, "matrix": [[1, 0, 1], [0, 0, 1], [1, 1, 1]], "solution": [[1, 0, 1], [0, 0, 1], [1, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n0 1 1 1 1 1\n1 1 1 0 0 0\n1 0 1 1 1 1\n1 1 1 0 1 1\n1 1 1 1 1 0\n", "answer": "1 2 3 2 2 2\n0 1 2 1 1 1\n1 1 1 0 0 0\n1 0 1 1 1 1\n2 1 1 0 1 1\n3 2 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 582, "matrix": [[1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0]], "solution": [[1, 2, 3, 2, 2, 2], [0, 1, 2, 1, 1, 1], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 1], [2, 1, 1, 0, 1, 1], [3, 2, 2, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1\n1 0 1 1 1 1 0 1 0\n1 1 0 0 0 1 1 0 1\n0 0 1 1 1 0 1 0 1\n0 0 0 1 1 0 1 1 1\n1 1 1 1 1 1 1 1 0\n1 0 0 1 1 1 1 1 1\n1 1 1 1 0 0 1 1 1\n1 1 0 0 1 1 1 1 1\n", "answer": "2 1 2 2 2 2 1 2 1\n1 0 1 1 1 1 0 1 0\n1 1 0 0 0 1 1 0 1\n0 0 1 1 1 0 1 0 1\n0 0 0 1 1 0 1 1 1\n1 1 1 2 2 1 2 1 0\n1 0 0 1 1 1 2 2 1\n2 1 1 1 0 0 1 2 2\n2 1 0 0 1 1 2 3 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 583, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1, 0], [1, 1, 0, 0, 0, 1, 1, 0, 1], [0, 0, 1, 1, 1, 0, 1, 0, 1], [0, 0, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1]], "solution": [[2, 1, 2, 2, 2, 2, 1, 2, 1], [1, 0, 1, 1, 1, 1, 0, 1, 0], [1, 1, 0, 0, 0, 1, 1, 0, 1], [0, 0, 1, 1, 1, 0, 1, 0, 1], [0, 0, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 2, 2, 1, 2, 1, 0], [1, 0, 0, 1, 1, 1, 2, 2, 1], [2, 1, 1, 1, 0, 0, 1, 2, 2], [2, 1, 0, 0, 1, 1, 2, 3, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 0 1\n1 1 1 1 0 1 1 1\n1 1 1 1 1 0 0 1\n1 1 1 1 1 0 1 0\n0 1 0 1 1 1 1 0\n1 1 1 1 1 1 0 1\n1 1 1 1 1 0 0 1\n1 1 1 0 1 1 1 1\n", "answer": "0 1 0 1 1 1 0 1\n1 2 1 1 0 1 1 2\n2 3 2 2 1 0 0 1\n1 2 1 2 1 0 1 0\n0 1 0 1 2 1 1 0\n1 2 1 2 2 1 0 1\n2 3 2 1 1 0 0 1\n3 2 1 0 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 584, "matrix": [[0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1]], "solution": [[0, 1, 0, 1, 1, 1, 0, 1], [1, 2, 1, 1, 0, 1, 1, 2], [2, 3, 2, 2, 1, 0, 0, 1], [1, 2, 1, 2, 1, 0, 1, 0], [0, 1, 0, 1, 2, 1, 1, 0], [1, 2, 1, 2, 2, 1, 0, 1], [2, 3, 2, 1, 1, 0, 0, 1], [3, 2, 1, 0, 1, 1, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 1 0\n1 1 1 1 1 0 1\n1 1 1 1 0 1 0\n1 1 1 1 1 1 1\n1 0 1 1 1 1 1\n1 0 1 1 1 0 1\n1 0 1 1 1 1 0\n", "answer": "0 1 1 0 1 1 0\n1 2 2 1 1 0 1\n2 2 2 1 0 1 0\n2 1 2 2 1 2 1\n1 0 1 2 2 1 2\n1 0 1 2 1 0 1\n1 0 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 585, "matrix": [[0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 0]], "solution": [[0, 1, 1, 0, 1, 1, 0], [1, 2, 2, 1, 1, 0, 1], [2, 2, 2, 1, 0, 1, 0], [2, 1, 2, 2, 1, 2, 1], [1, 0, 1, 2, 2, 1, 2], [1, 0, 1, 2, 1, 0, 1], [1, 0, 1, 2, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 0 0 0 1 0\n1 0 0 1 0 0 1 1 1\n1 1 1 1 0 0 1 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0 1\n1 1 1 1 0 0 1 0 1\n0 1 0 0 0 1 1 1 0\n", "answer": "0 1 2 3 2 1 0 1 2\n1 2 2 2 1 1 1 2 1\n2 1 1 1 0 0 0 1 0\n1 0 0 1 0 0 1 2 1\n2 1 1 1 0 0 1 2 2\n3 2 2 2 1 1 2 1 2\n2 3 2 2 1 1 1 0 1\n1 2 1 1 0 0 1 0 1\n0 1 0 0 0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 586, "matrix": [[0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1, 0], [1, 0, 0, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1], [0, 1, 0, 0, 0, 1, 1, 1, 0]], "solution": [[0, 1, 2, 3, 2, 1, 0, 1, 2], [1, 2, 2, 2, 1, 1, 1, 2, 1], [2, 1, 1, 1, 0, 0, 0, 1, 0], [1, 0, 0, 1, 0, 0, 1, 2, 1], [2, 1, 1, 1, 0, 0, 1, 2, 2], [3, 2, 2, 2, 1, 1, 2, 1, 2], [2, 3, 2, 2, 1, 1, 1, 0, 1], [1, 2, 1, 1, 0, 0, 1, 0, 1], [0, 1, 0, 0, 0, 1, 2, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 0\n0 0 1\n", "answer": "2 2 1\n1 1 0\n0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 587, "matrix": [[1, 1, 1], [1, 1, 0], [0, 0, 1]], "solution": [[2, 2, 1], [1, 1, 0], [0, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 0 1 1 0 1 0\n1 1 1 1 1 1 0 1 1 1\n1 1 1 1 1 0 1 1 1 1\n1 1 1 0 1 1 0 1 1 1\n1 0 1 1 1 1 0 1 1 1\n0 1 1 1 0 1 1 0 1 0\n1 1 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 0 1\n1 1 1 1 1 1 1 0 1 1\n1 1 0 0 1 1 1 0 1 1\n", "answer": "1 0 1 0 0 1 1 0 1 0\n2 1 2 1 1 1 0 1 2 1\n3 2 2 1 1 0 1 2 3 2\n2 1 1 0 1 1 0 1 2 2\n1 0 1 1 1 1 0 1 2 1\n0 1 2 1 0 1 1 0 1 0\n1 2 1 2 1 2 2 1 1 1\n2 1 0 1 2 3 2 1 0 1\n3 2 1 1 2 2 1 0 1 2\n2 1 0 0 1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 588, "matrix": [[1, 0, 1, 0, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 0, 1, 1]], "solution": [[1, 0, 1, 0, 0, 1, 1, 0, 1, 0], [2, 1, 2, 1, 1, 1, 0, 1, 2, 1], [3, 2, 2, 1, 1, 0, 1, 2, 3, 2], [2, 1, 1, 0, 1, 1, 0, 1, 2, 2], [1, 0, 1, 1, 1, 1, 0, 1, 2, 1], [0, 1, 2, 1, 0, 1, 1, 0, 1, 0], [1, 2, 1, 2, 1, 2, 2, 1, 1, 1], [2, 1, 0, 1, 2, 3, 2, 1, 0, 1], [3, 2, 1, 1, 2, 2, 1, 0, 1, 2], [2, 1, 0, 0, 1, 2, 1, 0, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n0 1 1 1 1 1 0\n1 1 1 1 1 1 1\n1 1 1 1 0 1 1\n1 1 0 0 1 1 1\n0 0 0 1 1 1 1\n1 1 1 1 1 0 1\n", "answer": "1 2 3 4 3 2 1\n0 1 2 3 2 1 0\n1 2 2 2 1 2 1\n2 2 1 1 0 1 2\n1 1 0 0 1 2 3\n0 0 0 1 2 1 2\n1 1 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 589, "matrix": [[1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1]], "solution": [[1, 2, 3, 4, 3, 2, 1], [0, 1, 2, 3, 2, 1, 0], [1, 2, 2, 2, 1, 2, 1], [2, 2, 1, 1, 0, 1, 2], [1, 1, 0, 0, 1, 2, 3], [0, 0, 0, 1, 2, 1, 2], [1, 1, 1, 2, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0 1 1 1 0\n0 1 1 0 0 1 1 1\n1 1 1 1 0 0 1 1\n0 1 1 1 1 1 0 1\n1 1 0 1 0 0 1 1\n1 1 1 1 0 1 1 1\n1 0 1 1 1 0 1 0\n0 0 1 1 1 1 1 1\n", "answer": "0 1 0 0 1 2 1 0\n0 1 1 0 0 1 2 1\n1 2 2 1 0 0 1 2\n0 1 1 2 1 1 0 1\n1 1 0 1 0 0 1 2\n2 1 1 1 0 1 2 1\n1 0 1 2 1 0 1 0\n0 0 1 2 2 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 590, "matrix": [[0, 1, 0, 0, 1, 1, 1, 0], [0, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0], [0, 0, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 0, 0, 1, 2, 1, 0], [0, 1, 1, 0, 0, 1, 2, 1], [1, 2, 2, 1, 0, 0, 1, 2], [0, 1, 1, 2, 1, 1, 0, 1], [1, 1, 0, 1, 0, 0, 1, 2], [2, 1, 1, 1, 0, 1, 2, 1], [1, 0, 1, 2, 1, 0, 1, 0], [0, 0, 1, 2, 2, 1, 2, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 0 0\n0 1 1\n", "answer": "0 1 0\n1 0 0\n0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 591, "matrix": [[0, 1, 0], [1, 0, 0], [0, 1, 1]], "solution": [[0, 1, 0], [1, 0, 0], [0, 1, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n0 1 1 1 1\n1 1 1 0 1\n1 1 0 0 0\n0 0 1 1 0\n", "answer": "1 2 3 2 3\n0 1 2 1 2\n1 2 1 0 1\n1 1 0 0 0\n0 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 592, "matrix": [[1, 1, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 1, 0, 1], [1, 1, 0, 0, 0], [0, 0, 1, 1, 0]], "solution": [[1, 2, 3, 2, 3], [0, 1, 2, 1, 2], [1, 2, 1, 0, 1], [1, 1, 0, 0, 0], [0, 0, 1, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 1 0\n0 1 1 1 0 0 1 1\n1 1 1 1 1 1 1 0\n1 1 1 1 1 0 1 0\n1 1 0 1 1 1 1 1\n1 0 1 0 1 1 1 1\n0 1 1 1 1 1 0 1\n1 1 1 1 1 1 1 0\n", "answer": "0 1 0 1 1 1 1 0\n0 1 1 1 0 0 1 1\n1 2 2 2 1 1 1 0\n2 2 1 2 1 0 1 0\n2 1 0 1 2 1 2 1\n1 0 1 0 1 2 1 2\n0 1 2 1 2 1 0 1\n1 2 3 2 3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 593, "matrix": [[0, 1, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0, 1, 1], [1, 2, 2, 2, 1, 1, 1, 0], [2, 2, 1, 2, 1, 0, 1, 0], [2, 1, 0, 1, 2, 1, 2, 1], [1, 0, 1, 0, 1, 2, 1, 2], [0, 1, 2, 1, 2, 1, 0, 1], [1, 2, 3, 2, 3, 2, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 0 1\n0 0 1 1 1 0\n0 1 1 1 0 1\n0 0 0 0 1 0\n1 1 1 1 0 1\n1 1 1 0 1 1\n", "answer": "1 1 0 0 0 1\n0 0 1 1 1 0\n0 1 1 1 0 1\n0 0 0 0 1 0\n1 1 1 1 0 1\n2 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 594, "matrix": [[1, 1, 0, 0, 0, 1], [0, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1], [0, 0, 0, 0, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1]], "solution": [[1, 1, 0, 0, 0, 1], [0, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1], [0, 0, 0, 0, 1, 0], [1, 1, 1, 1, 0, 1], [2, 2, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 1 1 1\n0 1 1 1 0 1 0 0 0 1\n1 1 1 0 0 1 1 1 0 1\n1 1 0 1 1 1 1 0 1 1\n1 1 1 1 0 1 0 0 0 1\n1 1 1 1 0 1 1 1 1 1\n1 1 0 1 1 1 0 1 1 0\n1 0 1 1 1 1 1 1 1 1\n1 0 0 1 1 1 0 1 1 0\n1 0 1 1 1 0 0 1 1 0\n", "answer": "1 2 3 2 1 1 0 1 1 2\n0 1 2 1 0 1 0 0 0 1\n1 2 1 0 0 1 1 1 0 1\n2 1 0 1 1 2 1 0 1 2\n3 2 1 1 0 1 0 0 0 1\n3 2 1 1 0 1 1 1 1 1\n2 1 0 1 1 1 0 1 1 0\n1 0 1 2 2 2 1 2 2 1\n1 0 0 1 2 1 0 1 1 0\n1 0 1 2 1 0 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 595, "matrix": [[1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 0, 1, 0, 0, 0, 1], [1, 1, 1, 0, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 0, 0, 1, 1, 0]], "solution": [[1, 2, 3, 2, 1, 1, 0, 1, 1, 2], [0, 1, 2, 1, 0, 1, 0, 0, 0, 1], [1, 2, 1, 0, 0, 1, 1, 1, 0, 1], [2, 1, 0, 1, 1, 2, 1, 0, 1, 2], [3, 2, 1, 1, 0, 1, 0, 0, 0, 1], [3, 2, 1, 1, 0, 1, 1, 1, 1, 1], [2, 1, 0, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 2, 2, 2, 1, 2, 2, 1], [1, 0, 0, 1, 2, 1, 0, 1, 1, 0], [1, 0, 1, 2, 1, 0, 0, 1, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 0\n1 0 1 1 1 1\n1 1 1 1 0 1\n1 1 1 1 1 1\n1 0 1 1 1 1\n1 1 1 0 1 0\n", "answer": "1 0 1 0 1 0\n1 0 1 1 1 1\n2 1 2 1 0 1\n2 1 2 2 1 2\n1 0 1 1 2 1\n2 1 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 596, "matrix": [[1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0]], "solution": [[1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1], [2, 1, 2, 1, 0, 1], [2, 1, 2, 2, 1, 2], [1, 0, 1, 1, 2, 1], [2, 1, 1, 0, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 0 1 1 1\n0 1 1 1 1 0 1 0 1\n1 1 1 1 0 1 0 0 1\n1 0 1 1 0 1 0 1 1\n0 1 0 1 0 1 1 0 0\n1 1 1 1 0 1 1 0 1\n1 0 1 1 0 0 1 1 1\n1 1 0 1 0 1 0 1 1\n1 0 1 1 1 1 0 0 1\n", "answer": "0 0 1 2 1 0 1 1 2\n0 1 2 2 1 0 1 0 1\n1 1 2 1 0 1 0 0 1\n1 0 1 1 0 1 0 1 1\n0 1 0 1 0 1 1 0 0\n1 1 1 1 0 1 1 0 1\n1 0 1 1 0 0 1 1 2\n2 1 0 1 0 1 0 1 2\n1 0 1 2 1 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 597, "matrix": [[0, 0, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 0, 1, 0, 1, 1], [0, 1, 0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 0, 0, 1]], "solution": [[0, 0, 1, 2, 1, 0, 1, 1, 2], [0, 1, 2, 2, 1, 0, 1, 0, 1], [1, 1, 2, 1, 0, 1, 0, 0, 1], [1, 0, 1, 1, 0, 1, 0, 1, 1], [0, 1, 0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1, 1, 2], [2, 1, 0, 1, 0, 1, 0, 1, 2], [1, 0, 1, 2, 1, 1, 0, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n0 1 1\n1 0 1\n", "answer": "0 1 2\n0 1 2\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 598, "matrix": [[0, 1, 1], [0, 1, 1], [1, 0, 1]], "solution": [[0, 1, 2], [0, 1, 2], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 1 1 0\n0 1 1 1 1 1 1 1 1\n1 0 1 0 1 1 1 1 1\n1 0 1 1 1 0 1 1 1\n1 1 0 1 1 0 1 1 1\n0 0 1 1 0 1 1 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 0 1\n1 1 0 1 1 1 1 1 0\n", "answer": "0 1 2 2 1 0 1 1 0\n0 1 2 1 2 1 2 2 1\n1 0 1 0 1 1 2 3 2\n1 0 1 1 1 0 1 2 3\n1 1 0 1 1 0 1 2 3\n0 0 1 1 0 1 2 2 3\n1 1 2 2 1 1 2 1 2\n2 2 1 2 1 0 1 0 1\n2 1 0 1 2 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 599, "matrix": [[0, 1, 1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 2, 2, 1, 0, 1, 1, 0], [0, 1, 2, 1, 2, 1, 2, 2, 1], [1, 0, 1, 0, 1, 1, 2, 3, 2], [1, 0, 1, 1, 1, 0, 1, 2, 3], [1, 1, 0, 1, 1, 0, 1, 2, 3], [0, 0, 1, 1, 0, 1, 2, 2, 3], [1, 1, 2, 2, 1, 1, 2, 1, 2], [2, 2, 1, 2, 1, 0, 1, 0, 1], [2, 1, 0, 1, 2, 1, 2, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n0 1 1 1 1 1 0\n1 0 1 1 1 1 1\n1 1 0 1 1 1 1\n0 1 0 0 1 1 1\n1 1 1 1 1 1 0\n1 0 1 0 1 1 0\n", "answer": "1 2 3 4 3 2 1\n0 1 2 3 2 1 0\n1 0 1 2 3 2 1\n1 1 0 1 2 3 2\n0 1 0 0 1 2 1\n1 1 1 1 2 1 0\n1 0 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 600, "matrix": [[1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1], [0, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1, 0]], "solution": [[1, 2, 3, 4, 3, 2, 1], [0, 1, 2, 3, 2, 1, 0], [1, 0, 1, 2, 3, 2, 1], [1, 1, 0, 1, 2, 3, 2], [0, 1, 0, 0, 1, 2, 1], [1, 1, 1, 1, 2, 1, 0], [1, 0, 1, 0, 1, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0 1 0 1 1 1\n1 1 1 1 0 1 1 0 0\n1 1 1 0 1 0 1 1 1\n1 1 0 1 1 1 1 0 1\n1 0 0 1 1 1 1 0 1\n1 1 1 1 1 0 1 1 1\n1 1 1 0 1 1 0 0 0\n0 0 0 1 0 1 1 0 1\n1 1 1 1 1 1 1 0 0\n", "answer": "0 0 1 0 1 0 1 1 1\n1 1 2 1 0 1 1 0 0\n2 2 1 0 1 0 1 1 1\n2 1 0 1 2 1 1 0 1\n1 0 0 1 2 1 1 0 1\n2 1 1 1 1 0 1 1 1\n1 1 1 0 1 1 0 0 0\n0 0 0 1 0 1 1 0 1\n1 1 1 2 1 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 601, "matrix": [[0, 0, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0, 0], [0, 0, 0, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0]], "solution": [[0, 0, 1, 0, 1, 0, 1, 1, 1], [1, 1, 2, 1, 0, 1, 1, 0, 0], [2, 2, 1, 0, 1, 0, 1, 1, 1], [2, 1, 0, 1, 2, 1, 1, 0, 1], [1, 0, 0, 1, 2, 1, 1, 0, 1], [2, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0, 0], [0, 0, 0, 1, 0, 1, 1, 0, 1], [1, 1, 1, 2, 1, 2, 1, 0, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 0 1 1 0\n1 0 1 1 1 1 1 1 1 0\n1 1 1 0 1 1 0 0 0 1\n1 0 1 0 1 0 1 1 0 0\n1 0 1 0 1 1 1 1 1 0\n1 0 1 0 1 0 1 1 1 0\n1 0 1 1 1 1 0 0 0 1\n0 1 1 1 0 0 1 1 1 1\n1 1 0 1 1 0 1 1 0 1\n1 1 0 0 1 1 1 1 1 0\n", "answer": "1 0 1 2 2 1 0 1 1 0\n1 0 1 1 2 2 1 1 1 0\n2 1 1 0 1 1 0 0 0 1\n1 0 1 0 1 0 1 1 0 0\n1 0 1 0 1 1 2 2 1 0\n1 0 1 0 1 0 1 1 1 0\n1 0 1 1 1 1 0 0 0 1\n0 1 1 1 0 0 1 1 1 2\n1 1 0 1 1 0 1 1 0 1\n2 1 0 0 1 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 602, "matrix": [[1, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 0, 0, 0, 1], [1, 0, 1, 0, 1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 0, 0, 0, 1], [0, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 0]], "solution": [[1, 0, 1, 2, 2, 1, 0, 1, 1, 0], [1, 0, 1, 1, 2, 2, 1, 1, 1, 0], [2, 1, 1, 0, 1, 1, 0, 0, 0, 1], [1, 0, 1, 0, 1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 1, 1, 2, 2, 1, 0], [1, 0, 1, 0, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 0, 0, 0, 1], [0, 1, 1, 1, 0, 0, 1, 1, 1, 2], [1, 1, 0, 1, 1, 0, 1, 1, 0, 1], [2, 1, 0, 0, 1, 1, 2, 2, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 0 0 0 1 1\n1 1 1 1 1 0\n1 1 1 1 1 0\n0 0 1 0 1 1\n1 1 1 1 1 1\n", "answer": "2 1 1 1 2 2\n1 0 0 0 1 1\n2 1 1 1 1 0\n1 1 2 1 1 0\n0 0 1 0 1 1\n1 1 2 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 603, "matrix": [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0], [0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 1, 1, 2, 2], [1, 0, 0, 0, 1, 1], [2, 1, 1, 1, 1, 0], [1, 1, 2, 1, 1, 0], [0, 0, 1, 0, 1, 1], [1, 1, 2, 1, 2, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 1 1\n0 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1\n0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0\n1 1 1 1 0 1 0 1\n1 1 1 1 0 0 1 0\n0 1 1 1 1 1 1 1\n", "answer": "0 1 0 1 2 3 4 4\n0 1 1 2 3 4 4 3\n1 1 0 1 2 3 3 2\n0 1 1 2 2 3 2 1\n1 2 2 2 1 2 1 0\n2 3 2 1 0 1 0 1\n1 2 2 1 0 0 1 0\n0 1 2 2 1 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 604, "matrix": [[0, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 0, 1, 2, 3, 4, 4], [0, 1, 1, 2, 3, 4, 4, 3], [1, 1, 0, 1, 2, 3, 3, 2], [0, 1, 1, 2, 2, 3, 2, 1], [1, 2, 2, 2, 1, 2, 1, 0], [2, 3, 2, 1, 0, 1, 0, 1], [1, 2, 2, 1, 0, 0, 1, 0], [0, 1, 2, 2, 1, 1, 2, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0 1 1 0 1\n1 1 1 1 0 0 1 0\n1 1 1 1 1 1 1 1\n1 0 0 1 0 1 0 1\n1 1 1 0 0 1 1 0\n0 0 1 1 1 1 1 0\n1 0 1 0 0 0 1 1\n0 1 1 1 1 1 1 1\n", "answer": "0 0 1 0 1 1 0 1\n1 1 2 1 0 0 1 0\n2 1 1 2 1 1 1 1\n1 0 0 1 0 1 0 1\n1 1 1 0 0 1 1 0\n0 0 1 1 1 1 1 0\n1 0 1 0 0 0 1 1\n0 1 2 1 1 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 605, "matrix": [[0, 0, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 0, 1, 1, 0], [0, 0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 0, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 0, 1, 0, 1, 1, 0, 1], [1, 1, 2, 1, 0, 0, 1, 0], [2, 1, 1, 2, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 0, 1, 1, 0], [0, 0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 0, 0, 1, 1], [0, 1, 2, 1, 1, 1, 2, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1\n1 0 0 0 1\n1 1 0 1 1\n1 0 1 1 1\n1 1 1 1 1\n", "answer": "2 1 0 1 2\n1 0 0 0 1\n2 1 0 1 2\n1 0 1 2 3\n2 1 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 606, "matrix": [[1, 1, 0, 1, 1], [1, 0, 0, 0, 1], [1, 1, 0, 1, 1], [1, 0, 1, 1, 1], [1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 2], [1, 0, 0, 0, 1], [2, 1, 0, 1, 2], [1, 0, 1, 2, 3], [2, 1, 2, 3, 4]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1\n1 1 1 0 1 1 0 0\n1 1 1 1 1 1 1 0\n1 1 1 0 1 1 0 1\n1 1 1 1 1 1 1 0\n1 1 0 1 0 1 1 1\n1 1 1 1 1 1 1 1\n1 0 1 1 1 1 0 1\n", "answer": "4 3 2 1 1 0 1 1\n3 2 1 0 1 1 0 0\n4 3 2 1 2 2 1 0\n3 2 1 0 1 1 0 1\n3 2 1 1 1 2 1 0\n2 1 0 1 0 1 2 1\n2 1 1 2 1 2 1 2\n1 0 1 2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 607, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1]], "solution": [[4, 3, 2, 1, 1, 0, 1, 1], [3, 2, 1, 0, 1, 1, 0, 0], [4, 3, 2, 1, 2, 2, 1, 0], [3, 2, 1, 0, 1, 1, 0, 1], [3, 2, 1, 1, 1, 2, 1, 0], [2, 1, 0, 1, 0, 1, 2, 1], [2, 1, 1, 2, 1, 2, 1, 2], [1, 0, 1, 2, 2, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1\n0 1 1 0 1 0 1 1\n1 1 1 1 0 1 1 0\n0 1 0 0 1 0 1 0\n0 1 1 1 1 1 1 0\n1 1 1 1 0 1 1 1\n1 1 1 1 1 1 1 0\n1 1 1 1 1 0 1 1\n", "answer": "1 2 2 1 2 1 2 2\n0 1 1 0 1 0 1 1\n1 2 1 1 0 1 1 0\n0 1 0 0 1 0 1 0\n0 1 1 1 1 1 1 0\n1 2 2 1 0 1 2 1\n2 3 3 2 1 1 1 0\n3 4 3 2 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 608, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[1, 2, 2, 1, 2, 1, 2, 2], [0, 1, 1, 0, 1, 0, 1, 1], [1, 2, 1, 1, 0, 1, 1, 0], [0, 1, 0, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 0], [1, 2, 2, 1, 0, 1, 2, 1], [2, 3, 3, 2, 1, 1, 1, 0], [3, 4, 3, 2, 1, 0, 1, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n1 1 0\n1 0 0\n", "answer": "1 0 1\n2 1 0\n1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 609, "matrix": [[1, 0, 1], [1, 1, 0], [1, 0, 0]], "solution": [[1, 0, 1], [2, 1, 0], [1, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1\n1 0 1 1 1\n1 0 1 1 1\n1 1 0 1 0\n0 1 1 1 1\n", "answer": "0 1 1 0 1\n1 0 1 1 2\n1 0 1 2 1\n1 1 0 1 0\n0 1 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 610, "matrix": [[0, 1, 1, 0, 1], [1, 0, 1, 1, 1], [1, 0, 1, 1, 1], [1, 1, 0, 1, 0], [0, 1, 1, 1, 1]], "solution": [[0, 1, 1, 0, 1], [1, 0, 1, 1, 2], [1, 0, 1, 2, 1], [1, 1, 0, 1, 0], [0, 1, 1, 2, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 1 1 0 1 1\n1 1 0 1 1 1 1 1 1 1\n0 1 0 1 1 1 1 1 0 1\n0 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 0 1\n1 1 1 1 0 1 1 1 1 1\n1 1 1 1 0 1 1 1 1 1\n1 1 1 1 0 1 0 1 0 1\n0 1 1 1 0 1 0 1 0 1\n1 1 1 0 1 1 0 1 1 1\n", "answer": "0 0 1 1 0 1 1 0 1 2\n1 1 0 1 1 2 2 1 1 2\n0 1 0 1 2 3 2 1 0 1\n0 1 1 2 2 3 3 2 1 2\n1 2 2 2 1 2 2 1 0 1\n2 3 2 1 0 1 2 2 1 2\n2 3 2 1 0 1 1 2 1 2\n1 2 2 1 0 1 0 1 0 1\n0 1 2 1 0 1 0 1 0 1\n1 2 1 0 1 1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 611, "matrix": [[0, 0, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 0, 1], [0, 1, 1, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 1]], "solution": [[0, 0, 1, 1, 0, 1, 1, 0, 1, 2], [1, 1, 0, 1, 1, 2, 2, 1, 1, 2], [0, 1, 0, 1, 2, 3, 2, 1, 0, 1], [0, 1, 1, 2, 2, 3, 3, 2, 1, 2], [1, 2, 2, 2, 1, 2, 2, 1, 0, 1], [2, 3, 2, 1, 0, 1, 2, 2, 1, 2], [2, 3, 2, 1, 0, 1, 1, 2, 1, 2], [1, 2, 2, 1, 0, 1, 0, 1, 0, 1], [0, 1, 2, 1, 0, 1, 0, 1, 0, 1], [1, 2, 1, 0, 1, 1, 0, 1, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 0 1\n0 0 0 1 1 0 1 0 1\n0 1 0 1 1 1 1 1 0\n1 1 0 1 1 1 1 1 0\n1 1 0 0 1 0 1 1 1\n1 1 1 1 1 0 1 1 1\n1 1 1 1 0 1 1 0 1\n1 0 0 1 1 1 1 0 0\n0 1 1 1 1 1 1 1 0\n", "answer": "1 1 1 0 1 1 1 0 1\n0 0 0 1 1 0 1 0 1\n0 1 0 1 2 1 2 1 0\n1 1 0 1 2 1 2 1 0\n2 1 0 0 1 0 1 2 1\n3 2 1 1 1 0 1 1 2\n2 1 1 1 0 1 1 0 1\n1 0 0 1 1 2 1 0 0\n0 1 1 2 2 3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 612, "matrix": [[1, 1, 1, 0, 1, 1, 1, 0, 1], [0, 0, 0, 1, 1, 0, 1, 0, 1], [0, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[1, 1, 1, 0, 1, 1, 1, 0, 1], [0, 0, 0, 1, 1, 0, 1, 0, 1], [0, 1, 0, 1, 2, 1, 2, 1, 0], [1, 1, 0, 1, 2, 1, 2, 1, 0], [2, 1, 0, 0, 1, 0, 1, 2, 1], [3, 2, 1, 1, 1, 0, 1, 1, 2], [2, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 1, 2, 1, 0, 0], [0, 1, 1, 2, 2, 3, 2, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 1 0\n0 0 0\n", "answer": "0 1 0\n1 1 0\n0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 613, "matrix": [[0, 1, 0], [1, 1, 0], [0, 0, 0]], "solution": [[0, 1, 0], [1, 1, 0], [0, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 0 0 1 1\n1 1 0 1 0 1 0 1 1 0\n0 0 1 1 0 1 1 1 1 0\n1 1 0 1 0 1 0 1 1 1\n1 1 0 1 1 1 1 0 1 1\n1 1 0 1 1 1 1 1 1 1\n0 1 1 1 1 1 0 0 1 0\n1 1 1 1 0 1 1 1 1 0\n0 1 0 1 1 1 1 1 1 1\n1 1 1 1 0 0 0 1 1 0\n", "answer": "2 2 1 2 1 0 0 0 1 1\n1 1 0 1 0 1 0 1 1 0\n0 0 1 1 0 1 1 2 1 0\n1 1 0 1 0 1 0 1 2 1\n2 1 0 1 1 2 1 0 1 2\n1 1 0 1 2 2 1 1 2 1\n0 1 1 2 1 1 0 0 1 0\n1 2 1 1 0 1 1 1 1 0\n0 1 0 1 1 1 1 2 2 1\n1 2 1 1 0 0 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 614, "matrix": [[1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 1, 0, 1, 0, 1, 1, 0], [0, 0, 1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 0, 1, 0, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1, 1, 0]], "solution": [[2, 2, 1, 2, 1, 0, 0, 0, 1, 1], [1, 1, 0, 1, 0, 1, 0, 1, 1, 0], [0, 0, 1, 1, 0, 1, 1, 2, 1, 0], [1, 1, 0, 1, 0, 1, 0, 1, 2, 1], [2, 1, 0, 1, 1, 2, 1, 0, 1, 2], [1, 1, 0, 1, 2, 2, 1, 1, 2, 1], [0, 1, 1, 2, 1, 1, 0, 0, 1, 0], [1, 2, 1, 1, 0, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 2, 2, 1], [1, 2, 1, 1, 0, 0, 0, 1, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1 0 0\n1 1 1 1 1 1 1 1\n1 0 1 1 0 1 0 1\n0 1 1 0 1 0 1 1\n1 1 1 1 0 0 1 0\n0 0 1 1 1 1 1 1\n0 1 1 1 1 1 0 1\n1 1 1 1 1 0 1 1\n", "answer": "1 0 1 0 1 1 0 0\n2 1 2 1 1 2 1 1\n1 0 1 1 0 1 0 1\n0 1 1 0 1 0 1 1\n1 1 2 1 0 0 1 0\n0 0 1 2 1 1 1 1\n0 1 2 3 2 1 0 1\n1 2 3 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 615, "matrix": [[1, 0, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1], [0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0], [0, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[1, 0, 1, 0, 1, 1, 0, 0], [2, 1, 2, 1, 1, 2, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1], [0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 2, 1, 0, 0, 1, 0], [0, 0, 1, 2, 1, 1, 1, 1], [0, 1, 2, 3, 2, 1, 0, 1], [1, 2, 3, 2, 1, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0\n0 1 1 1 1\n1 1 0 1 1\n0 1 1 1 1\n0 0 0 1 1\n", "answer": "1 2 2 1 0\n0 1 1 2 1\n1 1 0 1 2\n0 1 1 2 3\n0 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 616, "matrix": [[1, 1, 1, 1, 0], [0, 1, 1, 1, 1], [1, 1, 0, 1, 1], [0, 1, 1, 1, 1], [0, 0, 0, 1, 1]], "solution": [[1, 2, 2, 1, 0], [0, 1, 1, 2, 1], [1, 1, 0, 1, 2], [0, 1, 1, 2, 3], [0, 0, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1 1\n1 1 0 1 1 1 1\n0 0 0 0 1 1 1\n0 1 1 1 0 1 1\n0 1 1 1 1 0 1\n1 0 1 0 1 0 0\n0 1 1 0 0 0 1\n", "answer": "0 1 1 1 0 1 2\n1 1 0 1 1 2 3\n0 0 0 0 1 2 3\n0 1 1 1 0 1 2\n0 1 2 1 1 0 1\n1 0 1 0 1 0 0\n0 1 1 0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 617, "matrix": [[0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 0], [0, 1, 1, 0, 0, 0, 1]], "solution": [[0, 1, 1, 1, 0, 1, 2], [1, 1, 0, 1, 1, 2, 3], [0, 0, 0, 0, 1, 2, 3], [0, 1, 1, 1, 0, 1, 2], [0, 1, 2, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 0], [0, 1, 1, 0, 0, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n0 1 1\n0 0 0\n", "answer": "1 2 2\n0 1 1\n0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 618, "matrix": [[1, 1, 1], [0, 1, 1], [0, 0, 0]], "solution": [[1, 2, 2], [0, 1, 1], [0, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 1 1 0\n1 1 1 0 1\n0 1 1 0 1\n1 1 1 1 1\n", "answer": "3 4 3 2 1\n2 3 2 1 0\n1 2 1 0 1\n0 1 1 0 1\n1 2 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 619, "matrix": [[1, 1, 1, 1, 1], [1, 1, 1, 1, 0], [1, 1, 1, 0, 1], [0, 1, 1, 0, 1], [1, 1, 1, 1, 1]], "solution": [[3, 4, 3, 2, 1], [2, 3, 2, 1, 0], [1, 2, 1, 0, 1], [0, 1, 1, 0, 1], [1, 2, 2, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 1 1 1\n1 1 1 1\n1 1 0 0\n", "answer": "2 1 0 1\n3 2 1 2\n3 2 1 1\n2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 620, "matrix": [[1, 1, 0, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 0, 0]], "solution": [[2, 1, 0, 1], [3, 2, 1, 2], [3, 2, 1, 1], [2, 1, 0, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1\n1 0 1 1\n1 1 1 1\n0 1 1 1\n", "answer": "0 1 0 1\n1 0 1 2\n1 1 2 3\n0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 621, "matrix": [[0, 1, 0, 1], [1, 0, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1]], "solution": [[0, 1, 0, 1], [1, 0, 1, 2], [1, 1, 2, 3], [0, 1, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1 1 1 1 1\n0 1 1 1 0 0 1 1 1 0\n1 1 0 1 1 1 0 0 0 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 0 1 1\n1 0 1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 0 1 0\n1 1 0 1 0 1 1 1 1 1\n1 1 1 1 1 0 1 0 0 0\n", "answer": "0 1 2 1 0 1 2 2 2 1\n0 1 1 1 0 0 1 1 1 0\n1 1 0 1 1 1 0 0 0 1\n2 2 1 2 2 2 1 1 1 2\n2 1 2 3 2 1 0 0 1 2\n1 0 1 2 3 2 1 1 2 2\n0 1 2 1 2 3 2 1 2 1\n1 2 1 0 1 2 1 0 1 0\n2 1 0 1 0 1 2 1 1 1\n3 2 1 2 1 0 1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 622, "matrix": [[0, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 0, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0, 0, 0]], "solution": [[0, 1, 2, 1, 0, 1, 2, 2, 2, 1], [0, 1, 1, 1, 0, 0, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 0, 0, 0, 1], [2, 2, 1, 2, 2, 2, 1, 1, 1, 2], [2, 1, 2, 3, 2, 1, 0, 0, 1, 2], [1, 0, 1, 2, 3, 2, 1, 1, 2, 2], [0, 1, 2, 1, 2, 3, 2, 1, 2, 1], [1, 2, 1, 0, 1, 2, 1, 0, 1, 0], [2, 1, 0, 1, 0, 1, 2, 1, 1, 1], [3, 2, 1, 2, 1, 0, 1, 0, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 0\n1 1 0 1 1 1\n1 1 1 0 0 1\n1 0 1 1 1 0\n1 1 0 1 1 1\n1 1 1 1 1 1\n", "answer": "0 1 1 0 1 0\n1 1 0 1 1 1\n2 1 1 0 0 1\n1 0 1 1 1 0\n2 1 0 1 2 1\n3 2 1 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 623, "matrix": [[0, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1], [2, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0], [2, 1, 0, 1, 2, 1], [3, 2, 1, 2, 3, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 0 1 0 1\n1 1 1 0 1 1 1 1 1 1\n1 1 0 0 1 1 1 1 1 1\n0 1 1 0 0 1 1 1 0 1\n1 1 1 1 1 0 1 1 0 0\n0 1 1 1 1 1 1 1 0 1\n1 1 0 1 1 1 1 1 1 0\n1 1 0 1 0 1 1 0 0 1\n1 1 0 1 1 1 1 1 1 1\n1 0 0 1 1 1 1 1 0 1\n", "answer": "2 1 0 1 0 1 0 1 0 1\n2 2 1 0 1 2 1 2 1 2\n1 1 0 0 1 2 2 2 1 2\n0 1 1 0 0 1 2 1 0 1\n1 2 2 1 1 0 1 1 0 0\n0 1 1 2 2 1 2 1 0 1\n1 1 0 1 1 2 2 1 1 0\n2 1 0 1 0 1 1 0 0 1\n2 1 0 1 1 2 2 1 1 2\n1 0 0 1 2 3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 624, "matrix": [[1, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 0, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 0, 1]], "solution": [[2, 1, 0, 1, 0, 1, 0, 1, 0, 1], [2, 2, 1, 0, 1, 2, 1, 2, 1, 2], [1, 1, 0, 0, 1, 2, 2, 2, 1, 2], [0, 1, 1, 0, 0, 1, 2, 1, 0, 1], [1, 2, 2, 1, 1, 0, 1, 1, 0, 0], [0, 1, 1, 2, 2, 1, 2, 1, 0, 1], [1, 1, 0, 1, 1, 2, 2, 1, 1, 0], [2, 1, 0, 1, 0, 1, 1, 0, 0, 1], [2, 1, 0, 1, 1, 2, 2, 1, 1, 2], [1, 0, 0, 1, 2, 3, 2, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 1 0 0\n1 1 0 1\n0 1 1 1\n", "answer": "3 2 1 1\n2 1 0 0\n1 1 0 1\n0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 625, "matrix": [[1, 1, 1, 1], [1, 1, 0, 0], [1, 1, 0, 1], [0, 1, 1, 1]], "solution": [[3, 2, 1, 1], [2, 1, 0, 0], [1, 1, 0, 1], [0, 1, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0 0 0\n0 1 0 0 1 1 1 1 1 1\n0 1 1 1 0 0 1 1 0 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 0 1 0 1 1 1 1 1 0\n1 0 1 1 1 1 1 1 1 1\n1 1 0 1 1 0 1 1 1 1\n1 1 0 1 1 1 1 0 0 1\n0 0 1 0 1 1 0 1 1 1\n", "answer": "1 2 1 1 2 2 1 0 0 0\n0 1 0 0 1 1 2 1 1 1\n0 1 1 1 0 0 1 1 0 1\n1 2 2 2 1 1 2 2 1 2\n2 1 2 1 2 2 3 3 2 1\n1 0 1 0 1 2 3 2 1 0\n1 0 1 1 2 1 2 2 2 1\n2 1 0 1 1 0 1 1 1 2\n1 1 0 1 2 1 1 0 0 1\n0 0 1 0 1 1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 626, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 1, 0, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 0, 1], [0, 0, 1, 0, 1, 1, 0, 1, 1, 1]], "solution": [[1, 2, 1, 1, 2, 2, 1, 0, 0, 0], [0, 1, 0, 0, 1, 1, 2, 1, 1, 1], [0, 1, 1, 1, 0, 0, 1, 1, 0, 1], [1, 2, 2, 2, 1, 1, 2, 2, 1, 2], [2, 1, 2, 1, 2, 2, 3, 3, 2, 1], [1, 0, 1, 0, 1, 2, 3, 2, 1, 0], [1, 0, 1, 1, 2, 1, 2, 2, 2, 1], [2, 1, 0, 1, 1, 0, 1, 1, 1, 2], [1, 1, 0, 1, 2, 1, 1, 0, 0, 1], [0, 0, 1, 0, 1, 1, 0, 1, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1\n0 1 0 1 0 1 1\n0 1 1 1 1 1 1\n0 0 1 0 1 1 1\n1 1 1 0 1 1 1\n0 1 1 1 1 1 0\n1 1 1 1 1 1 0\n", "answer": "1 1 0 1 1 2 3\n0 1 0 1 0 1 2\n0 1 1 1 1 2 3\n0 0 1 0 1 2 2\n1 1 1 0 1 2 1\n0 1 2 1 2 1 0\n1 2 3 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 627, "matrix": [[1, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0]], "solution": [[1, 1, 0, 1, 1, 2, 3], [0, 1, 0, 1, 0, 1, 2], [0, 1, 1, 1, 1, 2, 3], [0, 0, 1, 0, 1, 2, 2], [1, 1, 1, 0, 1, 2, 1], [0, 1, 2, 1, 2, 1, 0], [1, 2, 3, 2, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 0 1 1\n1 0 1 1 1 1 1 1\n1 1 1 1 0 1 1 0\n1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1\n1 1 0 0 0 1 1 0\n1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 1\n", "answer": "0 1 0 1 1 0 1 2\n1 0 1 2 1 1 2 1\n2 1 2 1 0 1 1 0\n3 2 2 2 1 0 1 1\n3 2 1 1 1 1 2 1\n2 1 0 0 0 1 1 0\n3 2 1 1 1 2 2 1\n3 2 1 0 1 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 628, "matrix": [[0, 1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1]], "solution": [[0, 1, 0, 1, 1, 0, 1, 2], [1, 0, 1, 2, 1, 1, 2, 1], [2, 1, 2, 1, 0, 1, 1, 0], [3, 2, 2, 2, 1, 0, 1, 1], [3, 2, 1, 1, 1, 1, 2, 1], [2, 1, 0, 0, 0, 1, 1, 0], [3, 2, 1, 1, 1, 2, 2, 1], [3, 2, 1, 0, 1, 2, 3, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1\n1 1 1 0 0\n1 1 1 1 0\n1 0 1 0 1\n1 0 1 1 1\n", "answer": "2 1 0 1 1\n3 2 1 0 0\n2 1 2 1 0\n1 0 1 0 1\n1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 629, "matrix": [[1, 1, 0, 1, 1], [1, 1, 1, 0, 0], [1, 1, 1, 1, 0], [1, 0, 1, 0, 1], [1, 0, 1, 1, 1]], "solution": [[2, 1, 0, 1, 1], [3, 2, 1, 0, 0], [2, 1, 2, 1, 0], [1, 0, 1, 0, 1], [1, 0, 1, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1\n1 1 1\n0 1 0\n", "answer": "0 0 1\n1 1 1\n0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 630, "matrix": [[0, 0, 1], [1, 1, 1], [0, 1, 0]], "solution": [[0, 0, 1], [1, 1, 1], [0, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 0 1 1\n1 1 1 0 0 1 0 1\n1 1 1 1 1 0 1 1\n0 1 1 1 1 0 1 1\n1 1 0 0 1 1 1 0\n0 1 1 0 1 1 1 0\n0 1 1 0 1 1 1 1\n1 0 0 1 1 1 1 1\n", "answer": "0 1 0 1 1 0 1 2\n1 2 1 0 0 1 0 1\n1 2 2 1 1 0 1 2\n0 1 1 1 1 0 1 1\n1 1 0 0 1 1 1 0\n0 1 1 0 1 2 1 0\n0 1 1 0 1 2 2 1\n1 0 0 1 2 3 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 631, "matrix": [[0, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1]], "solution": [[0, 1, 0, 1, 1, 0, 1, 2], [1, 2, 1, 0, 0, 1, 0, 1], [1, 2, 2, 1, 1, 0, 1, 2], [0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 0], [0, 1, 1, 0, 1, 2, 1, 0], [0, 1, 1, 0, 1, 2, 2, 1], [1, 0, 0, 1, 2, 3, 3, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0 1 1 1\n1 1 1 1 0 0 0 1 1\n1 1 0 1 1 1 1 0 1\n1 1 1 1 0 1 1 1 0\n1 1 1 0 1 0 0 0 1\n1 1 1 1 1 1 1 1 0\n0 1 0 1 1 1 1 1 1\n0 1 1 1 1 1 1 0 1\n1 1 0 0 1 0 0 1 1\n", "answer": "2 1 0 1 1 0 1 2 3\n3 2 1 1 0 0 0 1 2\n2 1 0 1 1 1 1 0 1\n3 2 1 1 0 1 1 1 0\n2 2 1 0 1 0 0 0 1\n1 2 1 1 2 1 1 1 0\n0 1 0 1 2 2 2 1 1\n0 1 1 1 2 1 1 0 1\n1 1 0 0 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 632, "matrix": [[1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 0, 1, 0, 0, 1, 1]], "solution": [[2, 1, 0, 1, 1, 0, 1, 2, 3], [3, 2, 1, 1, 0, 0, 0, 1, 2], [2, 1, 0, 1, 1, 1, 1, 0, 1], [3, 2, 1, 1, 0, 1, 1, 1, 0], [2, 2, 1, 0, 1, 0, 0, 0, 1], [1, 2, 1, 1, 2, 1, 1, 1, 0], [0, 1, 0, 1, 2, 2, 2, 1, 1], [0, 1, 1, 1, 2, 1, 1, 0, 1], [1, 1, 0, 0, 1, 0, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0\n1 1 0 1 1 1\n1 1 1 1 1 1\n1 1 0 1 1 0\n0 1 1 1 1 0\n1 0 1 1 0 1\n", "answer": "3 2 1 2 1 0\n2 1 0 1 2 1\n2 2 1 2 2 1\n1 1 0 1 1 0\n0 1 1 2 1 0\n1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 633, "matrix": [[1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1]], "solution": [[3, 2, 1, 2, 1, 0], [2, 1, 0, 1, 2, 1], [2, 2, 1, 2, 2, 1], [1, 1, 0, 1, 1, 0], [0, 1, 1, 2, 1, 0], [1, 0, 1, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 0 1\n1 1 1\n", "answer": "2 1 2\n1 0 1\n2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 634, "matrix": [[1, 1, 1], [1, 0, 1], [1, 1, 1]], "solution": [[2, 1, 2], [1, 0, 1], [2, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 1 0 1\n1 1 0 1\n1 1 1 0\n", "answer": "2 1 0 1\n2 1 0 1\n2 1 0 1\n3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 635, "matrix": [[1, 1, 0, 1], [1, 1, 0, 1], [1, 1, 0, 1], [1, 1, 1, 0]], "solution": [[2, 1, 0, 1], [2, 1, 0, 1], [2, 1, 0, 1], [3, 2, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1\n1 0 0 1\n1 1 0 1\n1 1 1 0\n", "answer": "1 0 0 1\n1 0 0 1\n2 1 0 1\n3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 636, "matrix": [[1, 0, 0, 1], [1, 0, 0, 1], [1, 1, 0, 1], [1, 1, 1, 0]], "solution": [[1, 0, 0, 1], [1, 0, 0, 1], [2, 1, 0, 1], [3, 2, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0 1 1 1 1\n1 1 1 1 1 0 1 1 0\n1 0 1 1 1 0 1 1 1\n1 0 0 0 1 1 1 1 0\n1 1 1 1 1 0 0 0 1\n1 1 1 1 1 0 1 0 0\n1 1 1 1 1 0 1 1 1\n1 1 1 1 1 1 1 1 1\n0 1 1 0 1 1 0 1 1\n", "answer": "0 1 1 0 0 1 2 2 1\n1 1 2 1 1 0 1 1 0\n1 0 1 1 1 0 1 2 1\n1 0 0 0 1 1 1 1 0\n2 1 1 1 1 0 0 0 1\n3 2 2 2 1 0 1 0 0\n2 3 3 2 1 0 1 1 1\n1 2 2 1 2 1 1 2 2\n0 1 1 0 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 637, "matrix": [[0, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1, 1]], "solution": [[0, 1, 1, 0, 0, 1, 2, 2, 1], [1, 1, 2, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1, 2, 1], [1, 0, 0, 0, 1, 1, 1, 1, 0], [2, 1, 1, 1, 1, 0, 0, 0, 1], [3, 2, 2, 2, 1, 0, 1, 0, 0], [2, 3, 3, 2, 1, 0, 1, 1, 1], [1, 2, 2, 1, 2, 1, 1, 2, 2], [0, 1, 1, 0, 1, 1, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 0 1 1\n1 0 1 1 0 1 1 0 1 0\n1 1 1 1 1 1 1 1 1 1\n0 1 1 1 1 0 1 1 1 1\n1 0 0 1 1 1 1 0 1 1\n1 1 0 1 1 0 1 1 0 1\n1 1 0 0 1 1 1 1 1 0\n1 0 1 1 1 1 0 1 0 1\n0 1 1 1 1 0 0 0 1 0\n0 1 0 1 1 1 1 1 1 1\n", "answer": "0 1 2 2 1 2 1 0 1 1\n1 0 1 1 0 1 1 0 1 0\n1 1 2 2 1 1 2 1 2 1\n0 1 1 2 1 0 1 1 2 2\n1 0 0 1 2 1 1 0 1 2\n2 1 0 1 1 0 1 1 0 1\n2 1 0 0 1 1 1 2 1 0\n1 0 1 1 2 1 0 1 0 1\n0 1 1 2 1 0 0 0 1 0\n0 1 0 1 2 1 1 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 638, "matrix": [[0, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 0, 0, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 2, 2, 1, 2, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 2, 2, 1, 1, 2, 1, 2, 1], [0, 1, 1, 2, 1, 0, 1, 1, 2, 2], [1, 0, 0, 1, 2, 1, 1, 0, 1, 2], [2, 1, 0, 1, 1, 0, 1, 1, 0, 1], [2, 1, 0, 0, 1, 1, 1, 2, 1, 0], [1, 0, 1, 1, 2, 1, 0, 1, 0, 1], [0, 1, 1, 2, 1, 0, 0, 0, 1, 0], [0, 1, 0, 1, 2, 1, 1, 1, 2, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 0 0 1 1\n1 0 0 1 1 1 0 0 1\n1 0 1 1 1 1 0 0 0\n1 1 0 1 0 0 1 0 1\n0 1 1 1 0 1 1 0 1\n1 1 1 1 0 1 1 1 1\n1 1 1 1 1 1 0 1 1\n0 1 0 0 1 0 0 1 1\n0 1 1 1 0 1 0 1 1\n", "answer": "0 0 1 1 0 0 0 1 2\n1 0 0 1 1 1 0 0 1\n1 0 1 2 1 1 0 0 0\n1 1 0 1 0 0 1 0 1\n0 1 1 1 0 1 1 0 1\n1 2 2 1 0 1 1 1 2\n1 2 1 1 1 1 0 1 2\n0 1 0 0 1 0 0 1 2\n0 1 1 1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 639, "matrix": [[0, 0, 1, 1, 0, 0, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 0, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 0, 0, 1, 0, 0, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1]], "solution": [[0, 0, 1, 1, 0, 0, 0, 1, 2], [1, 0, 0, 1, 1, 1, 0, 0, 1], [1, 0, 1, 2, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 0, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1], [1, 2, 2, 1, 0, 1, 1, 1, 2], [1, 2, 1, 1, 1, 1, 0, 1, 2], [0, 1, 0, 0, 1, 0, 0, 1, 2], [0, 1, 1, 1, 0, 1, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1\n1 0 1 0 1 0\n1 1 0 0 1 1\n1 1 1 1 1 1\n0 1 0 1 0 1\n1 1 1 0 1 1\n", "answer": "0 1 2 1 2 1\n1 0 1 0 1 0\n2 1 0 0 1 1\n1 2 1 1 1 2\n0 1 0 1 0 1\n1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 640, "matrix": [[0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0], [1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1]], "solution": [[0, 1, 2, 1, 2, 1], [1, 0, 1, 0, 1, 0], [2, 1, 0, 0, 1, 1], [1, 2, 1, 1, 1, 2], [0, 1, 0, 1, 0, 1], [1, 2, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 1 1 1 1\n1 0 1 1 1 0 0 1 0\n0 1 1 0 1 1 0 1 0\n1 1 1 1 1 0 1 1 1\n0 1 1 1 1 1 0 0 1\n1 1 0 1 1 0 1 1 1\n1 0 1 1 1 1 1 1 1\n1 1 0 0 0 1 0 0 1\n0 0 1 1 1 0 1 1 1\n", "answer": "0 0 1 1 0 1 1 2 1\n1 0 1 1 1 0 0 1 0\n0 1 1 0 1 1 0 1 0\n1 2 2 1 1 0 1 1 1\n0 1 1 2 2 1 0 0 1\n1 1 0 1 1 0 1 1 2\n1 0 1 1 1 1 1 1 2\n1 1 0 0 0 1 0 0 1\n0 0 1 1 1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 641, "matrix": [[0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 0, 1], [0, 0, 1, 1, 1, 0, 1, 1, 1]], "solution": [[0, 0, 1, 1, 0, 1, 1, 2, 1], [1, 0, 1, 1, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 2, 2, 1, 1, 0, 1, 1, 1], [0, 1, 1, 2, 2, 1, 0, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1, 2], [1, 0, 1, 1, 1, 1, 1, 1, 2], [1, 1, 0, 0, 0, 1, 0, 0, 1], [0, 0, 1, 1, 1, 0, 1, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 0 1\n1 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 0\n1 1 0 1 1 1 0 1 1\n1 1 1 1 0 1 1 1 1\n1 1 1 1 0 1 1 1 0\n1 0 1 1 0 0 1 0 1\n1 1 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n", "answer": "1 0 1 2 3 2 1 0 1\n2 1 1 2 3 3 2 1 1\n2 1 0 1 2 2 1 1 0\n2 1 0 1 1 1 0 1 1\n3 2 1 1 0 1 1 2 1\n2 1 2 1 0 1 2 1 0\n1 0 1 1 0 0 1 0 1\n2 1 1 0 1 1 2 1 2\n3 2 2 1 2 2 3 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 642, "matrix": [[1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 2, 3, 2, 1, 0, 1], [2, 1, 1, 2, 3, 3, 2, 1, 1], [2, 1, 0, 1, 2, 2, 1, 1, 0], [2, 1, 0, 1, 1, 1, 0, 1, 1], [3, 2, 1, 1, 0, 1, 1, 2, 1], [2, 1, 2, 1, 0, 1, 2, 1, 0], [1, 0, 1, 1, 0, 0, 1, 0, 1], [2, 1, 1, 0, 1, 1, 2, 1, 2], [3, 2, 2, 1, 2, 2, 3, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 0\n1 0 0 1 1 1 1\n1 1 1 1 1 1 0\n1 0 0 0 0 1 0\n1 0 0 1 1 1 1\n0 1 1 1 1 1 0\n1 0 1 0 0 1 1\n", "answer": "2 1 1 2 1 0 0\n1 0 0 1 2 1 1\n2 1 1 1 1 1 0\n1 0 0 0 0 1 0\n1 0 0 1 1 2 1\n0 1 1 1 1 1 0\n1 0 1 0 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 643, "matrix": [[1, 1, 1, 1, 1, 0, 0], [1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 0, 0, 0, 0, 1, 0], [1, 0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 0, 1, 1]], "solution": [[2, 1, 1, 2, 1, 0, 0], [1, 0, 0, 1, 2, 1, 1], [2, 1, 1, 1, 1, 1, 0], [1, 0, 0, 0, 0, 1, 0], [1, 0, 0, 1, 1, 2, 1], [0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 0, 1, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0 1 1 1 0\n1 1 1 1 0 1 1\n1 1 1 1 1 1 1\n0 0 1 0 1 1 0\n1 0 1 1 1 1 0\n1 1 1 0 0 0 1\n1 1 1 0 1 1 1\n", "answer": "0 0 0 1 1 1 0\n1 1 1 1 0 1 1\n1 1 2 1 1 2 1\n0 0 1 0 1 1 0\n1 0 1 1 1 1 0\n2 1 1 0 0 0 1\n3 2 1 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 644, "matrix": [[0, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1]], "solution": [[0, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1], [1, 1, 2, 1, 1, 2, 1], [0, 0, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 1, 0], [2, 1, 1, 0, 0, 0, 1], [3, 2, 1, 0, 1, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0 1 1 1 1\n1 1 1 0 0 0 0 0 0\n1 1 0 1 0 1 1 1 1\n1 0 1 1 0 0 1 1 1\n1 0 1 1 1 1 1 1 0\n0 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 1\n1 1 1 0 1 1 1 1 1\n0 1 1 1 1 1 1 1 1\n", "answer": "0 1 1 0 0 1 1 1 1\n1 2 1 0 0 0 0 0 0\n2 1 0 1 0 1 1 1 1\n1 0 1 1 0 0 1 2 1\n1 0 1 2 1 1 2 1 0\n0 1 2 2 1 2 3 2 1\n1 2 2 1 0 1 2 3 2\n1 2 1 0 1 2 3 4 3\n0 1 2 1 2 3 4 5 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 645, "matrix": [[0, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 0, 0, 0], [1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 1, 0, 0, 1, 1, 1, 1], [1, 2, 1, 0, 0, 0, 0, 0, 0], [2, 1, 0, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 0, 0, 1, 2, 1], [1, 0, 1, 2, 1, 1, 2, 1, 0], [0, 1, 2, 2, 1, 2, 3, 2, 1], [1, 2, 2, 1, 0, 1, 2, 3, 2], [1, 2, 1, 0, 1, 2, 3, 4, 3], [0, 1, 2, 1, 2, 3, 4, 5, 4]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0 0 1 1\n0 1 1 1 1 0 1\n0 1 1 0 1 1 1\n1 1 1 1 0 1 1\n1 1 1 0 1 0 0\n1 1 1 1 1 0 0\n1 1 1 1 1 1 1\n", "answer": "0 0 1 0 0 1 2\n0 1 2 1 1 0 1\n0 1 1 0 1 1 2\n1 2 2 1 0 1 1\n2 2 1 0 1 0 0\n3 3 2 1 1 0 0\n4 4 3 2 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 646, "matrix": [[0, 0, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 0, 1, 0, 0, 1, 2], [0, 1, 2, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 2], [1, 2, 2, 1, 0, 1, 1], [2, 2, 1, 0, 1, 0, 0], [3, 3, 2, 1, 1, 0, 0], [4, 4, 3, 2, 2, 1, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 0 1 1 1\n1 1 0 1 1\n1 1 0 0 1\n1 0 1 0 1\n", "answer": "2 1 2 3 4\n1 0 1 2 3\n2 1 0 1 2\n2 1 0 0 1\n1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 647, "matrix": [[1, 1, 1, 1, 1], [1, 0, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 0, 0, 1], [1, 0, 1, 0, 1]], "solution": [[2, 1, 2, 3, 4], [1, 0, 1, 2, 3], [2, 1, 0, 1, 2], [2, 1, 0, 0, 1], [1, 0, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1\n0 1 1 1 0 1 1 1\n1 1 1 1 0 1 1 1\n0 1 1 0 1 1 1 1\n1 1 1 1 1 1 1 1\n0 0 0 1 1 0 1 0\n1 0 1 1 1 1 0 1\n0 1 0 0 1 1 1 1\n", "answer": "1 2 3 2 1 2 3 4\n0 1 2 1 0 1 2 3\n1 2 2 1 0 1 2 3\n0 1 1 0 1 2 3 2\n1 1 1 1 2 1 2 1\n0 0 0 1 1 0 1 0\n1 0 1 1 2 1 0 1\n0 1 0 0 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 648, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1, 0, 1], [0, 1, 0, 0, 1, 1, 1, 1]], "solution": [[1, 2, 3, 2, 1, 2, 3, 4], [0, 1, 2, 1, 0, 1, 2, 3], [1, 2, 2, 1, 0, 1, 2, 3], [0, 1, 1, 0, 1, 2, 3, 2], [1, 1, 1, 1, 2, 1, 2, 1], [0, 0, 0, 1, 1, 0, 1, 0], [1, 0, 1, 1, 2, 1, 0, 1], [0, 1, 0, 0, 1, 2, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 1 1 1\n1 1 1 0 0\n1 0 1 0 0\n1 0 1 0 1\n", "answer": "4 3 3 2 2\n3 2 2 1 1\n2 1 1 0 0\n1 0 1 0 0\n1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 649, "matrix": [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 0, 0], [1, 0, 1, 0, 0], [1, 0, 1, 0, 1]], "solution": [[4, 3, 3, 2, 2], [3, 2, 2, 1, 1], [2, 1, 1, 0, 0], [1, 0, 1, 0, 0], [1, 0, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n0 0 1\n1 1 1\n", "answer": "0 1 2\n0 0 1\n1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 650, "matrix": [[0, 1, 1], [0, 0, 1], [1, 1, 1]], "solution": [[0, 1, 2], [0, 0, 1], [1, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 0 0 1\n1 1 0 1 1 1 1 0 1 0\n1 1 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1 1 1\n0 1 1 0 1 1 1 1 1 0\n1 1 1 1 0 1 1 1 1 1\n1 1 1 1 1 0 1 1 1 1\n0 0 1 0 1 1 1 1 1 1\n1 0 1 1 1 1 1 0 1 1\n1 1 0 1 1 0 0 1 0 1\n", "answer": "3 2 1 0 1 2 1 0 0 1\n2 1 0 1 2 2 1 0 1 0\n2 2 1 2 3 3 2 1 1 0\n1 2 2 1 2 3 3 2 2 1\n0 1 1 0 1 2 3 2 1 0\n1 2 2 1 0 1 2 3 2 1\n1 1 2 1 1 0 1 2 3 2\n0 0 1 0 1 1 2 1 2 3\n1 0 1 1 2 1 1 0 1 2\n2 1 0 1 1 0 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 651, "matrix": [[1, 1, 1, 0, 1, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 0, 1, 0, 1]], "solution": [[3, 2, 1, 0, 1, 2, 1, 0, 0, 1], [2, 1, 0, 1, 2, 2, 1, 0, 1, 0], [2, 2, 1, 2, 3, 3, 2, 1, 1, 0], [1, 2, 2, 1, 2, 3, 3, 2, 2, 1], [0, 1, 1, 0, 1, 2, 3, 2, 1, 0], [1, 2, 2, 1, 0, 1, 2, 3, 2, 1], [1, 1, 2, 1, 1, 0, 1, 2, 3, 2], [0, 0, 1, 0, 1, 1, 2, 1, 2, 3], [1, 0, 1, 1, 2, 1, 1, 0, 1, 2], [2, 1, 0, 1, 1, 0, 0, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0 1 1 1 1 1\n1 1 1 1 0 1 0 1 1 1\n1 1 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 0 0 1 1\n1 1 1 1 1 1 0 1 0 1\n0 1 1 1 0 0 0 1 1 0\n1 1 1 1 0 0 0 0 0 1\n1 1 1 0 1 0 0 1 1 0\n1 1 1 1 1 0 1 1 1 1\n1 1 1 1 1 1 0 1 1 1\n", "answer": "0 1 1 0 0 1 1 2 3 2\n1 2 2 1 0 1 0 1 2 1\n2 3 3 2 1 2 1 1 1 0\n2 3 4 3 2 1 0 0 1 1\n1 2 3 2 1 1 0 1 0 1\n0 1 2 1 0 0 0 1 1 0\n1 2 2 1 0 0 0 0 0 1\n2 2 1 0 1 0 0 1 1 0\n3 3 2 1 1 0 1 2 2 1\n4 4 3 2 2 1 0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 652, "matrix": [[0, 1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 0, 0, 0, 1, 1, 0], [1, 1, 1, 1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 0, 1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1]], "solution": [[0, 1, 1, 0, 0, 1, 1, 2, 3, 2], [1, 2, 2, 1, 0, 1, 0, 1, 2, 1], [2, 3, 3, 2, 1, 2, 1, 1, 1, 0], [2, 3, 4, 3, 2, 1, 0, 0, 1, 1], [1, 2, 3, 2, 1, 1, 0, 1, 0, 1], [0, 1, 2, 1, 0, 0, 0, 1, 1, 0], [1, 2, 2, 1, 0, 0, 0, 0, 0, 1], [2, 2, 1, 0, 1, 0, 0, 1, 1, 0], [3, 3, 2, 1, 1, 0, 1, 2, 2, 1], [4, 4, 3, 2, 2, 1, 0, 1, 2, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 1 1\n1 0 1 0 0 0 1 1\n1 1 1 1 1 1 1 1\n0 1 0 0 1 1 1 1\n1 1 1 1 1 1 1 1\n1 1 1 1 1 0 0 1\n1 1 1 0 1 1 1 1\n1 1 1 0 0 1 1 1\n", "answer": "2 1 2 1 0 0 1 2\n1 0 1 0 0 0 1 2\n1 1 1 1 1 1 2 3\n0 1 0 0 1 2 2 3\n1 2 1 1 2 1 1 2\n2 3 2 1 1 0 0 1\n3 2 1 0 1 1 1 2\n3 2 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 653, "matrix": [[1, 1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1]], "solution": [[2, 1, 2, 1, 0, 0, 1, 2], [1, 0, 1, 0, 0, 0, 1, 2], [1, 1, 1, 1, 1, 1, 2, 3], [0, 1, 0, 0, 1, 2, 2, 3], [1, 2, 1, 1, 2, 1, 1, 2], [2, 3, 2, 1, 1, 0, 0, 1], [3, 2, 1, 0, 1, 1, 1, 2], [3, 2, 1, 0, 0, 1, 2, 3]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1\n1 1 1 1 0\n1 1 0 1 0\n1 1 0 1 1\n1 0 1 0 1\n", "answer": "3 2 1 0 1\n3 2 1 1 0\n2 1 0 1 0\n2 1 0 1 1\n1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 654, "matrix": [[1, 1, 1, 0, 1], [1, 1, 1, 1, 0], [1, 1, 0, 1, 0], [1, 1, 0, 1, 1], [1, 0, 1, 0, 1]], "solution": [[3, 2, 1, 0, 1], [3, 2, 1, 1, 0], [2, 1, 0, 1, 0], [2, 1, 0, 1, 1], [1, 0, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1\n1 1 0 1 0\n0 1 0 1 1\n1 1 1 1 1\n0 1 1 1 1\n", "answer": "0 0 1 2 1\n1 1 0 1 0\n0 1 0 1 1\n1 2 1 2 2\n0 1 2 3 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 655, "matrix": [[0, 0, 1, 1, 1], [1, 1, 0, 1, 0], [0, 1, 0, 1, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 1]], "solution": [[0, 0, 1, 2, 1], [1, 1, 0, 1, 0], [0, 1, 0, 1, 1], [1, 2, 1, 2, 2], [0, 1, 2, 3, 3]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1\n0 1 0 1 1 0 0 1\n1 1 1 0 1 1 0 1\n0 1 0 1 0 1 1 1\n1 0 1 1 1 1 1 0\n1 1 1 1 1 0 1 1\n1 1 1 0 0 0 1 1\n", "answer": "1 2 2 3 3 2 2 3\n0 1 1 2 2 1 1 2\n0 1 0 1 1 0 0 1\n1 2 1 0 1 1 0 1\n0 1 0 1 0 1 1 1\n1 0 1 2 1 1 1 0\n2 1 2 1 1 0 1 1\n3 2 1 0 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 656, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1], [0, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 0, 1, 1]], "solution": [[1, 2, 2, 3, 3, 2, 2, 3], [0, 1, 1, 2, 2, 1, 1, 2], [0, 1, 0, 1, 1, 0, 0, 1], [1, 2, 1, 0, 1, 1, 0, 1], [0, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 2, 1, 1, 1, 0], [2, 1, 2, 1, 1, 0, 1, 1], [3, 2, 1, 0, 0, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 1 0\n0 1 1 1 0 1 1 1\n0 1 0 1 1 1 1 1\n1 0 1 1 1 1 0 1\n1 1 1 1 1 1 0 1\n0 1 1 1 0 1 1 1\n1 1 0 1 1 0 1 1\n1 0 1 1 1 0 1 0\n", "answer": "1 2 1 0 1 0 1 0\n0 1 1 1 0 1 2 1\n0 1 0 1 1 2 1 2\n1 0 1 2 2 1 0 1\n1 1 2 2 1 1 0 1\n0 1 1 1 0 1 1 2\n1 1 0 1 1 0 1 1\n1 0 1 2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 657, "matrix": [[1, 1, 1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0]], "solution": [[1, 2, 1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 0, 1, 2, 1], [0, 1, 0, 1, 1, 2, 1, 2], [1, 0, 1, 2, 2, 1, 0, 1], [1, 1, 2, 2, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 2], [1, 1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 2, 1, 0, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1\n1 1 0 1 1\n1 0 1 1 0\n1 1 1 1 1\n1 1 1 1 0\n", "answer": "0 1 1 2 2\n1 1 0 1 1\n1 0 1 1 0\n2 1 2 2 1\n3 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 658, "matrix": [[0, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 0, 1, 1, 0], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0]], "solution": [[0, 1, 1, 2, 2], [1, 1, 0, 1, 1], [1, 0, 1, 1, 0], [2, 1, 2, 2, 1], [3, 2, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 1\n1 0 1 1 1 1 1\n1 1 0 1 1 1 1\n0 1 1 0 1 1 0\n0 1 1 1 0 1 1\n0 0 1 0 1 0 1\n0 1 1 1 1 1 0\n", "answer": "2 1 1 0 1 0 1\n1 0 1 1 2 1 2\n1 1 0 1 2 2 1\n0 1 1 0 1 1 0\n0 1 2 1 0 1 1\n0 0 1 0 1 0 1\n0 1 2 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 659, "matrix": [[1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1], [0, 0, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 1, 0]], "solution": [[2, 1, 1, 0, 1, 0, 1], [1, 0, 1, 1, 2, 1, 2], [1, 1, 0, 1, 2, 2, 1], [0, 1, 1, 0, 1, 1, 0], [0, 1, 2, 1, 0, 1, 1], [0, 0, 1, 0, 1, 0, 1], [0, 1, 2, 1, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 1 0 1\n1 0 0 1\n1 1 1 1\n", "answer": "3 2 1 2\n2 1 0 1\n1 0 0 1\n2 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 660, "matrix": [[1, 1, 1, 1], [1, 1, 0, 1], [1, 0, 0, 1], [1, 1, 1, 1]], "solution": [[3, 2, 1, 2], [2, 1, 0, 1], [1, 0, 0, 1], [2, 1, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 1 1\n1 1 0\n", "answer": "0 1 0\n1 2 1\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 661, "matrix": [[0, 1, 0], [1, 1, 1], [1, 1, 0]], "solution": [[0, 1, 0], [1, 2, 1], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 0\n1 0 1 1 1 0 0 1\n1 1 1 1 1 1 0 1\n1 1 1 1 0 1 1 1\n0 1 0 0 1 1 0 1\n0 1 1 0 0 1 1 1\n1 1 1 0 1 0 0 1\n1 1 1 1 1 1 1 0\n", "answer": "2 1 2 1 0 1 1 0\n1 0 1 2 1 0 0 1\n2 1 2 2 1 1 0 1\n1 2 1 1 0 1 1 2\n0 1 0 0 1 1 0 1\n0 1 1 0 0 1 1 2\n1 2 1 0 1 0 0 1\n2 3 2 1 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 662, "matrix": [[1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1, 0, 1], [0, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[2, 1, 2, 1, 0, 1, 1, 0], [1, 0, 1, 2, 1, 0, 0, 1], [2, 1, 2, 2, 1, 1, 0, 1], [1, 2, 1, 1, 0, 1, 1, 2], [0, 1, 0, 0, 1, 1, 0, 1], [0, 1, 1, 0, 0, 1, 1, 2], [1, 2, 1, 0, 1, 0, 0, 1], [2, 3, 2, 1, 2, 1, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1\n1 1 1 0 1 1 1\n1 0 1 1 1 1 1\n0 1 1 0 1 1 1\n0 1 1 0 1 1 1\n0 1 1 0 1 1 1\n1 1 1 0 1 0 1\n", "answer": "3 2 1 0 1 2 3\n2 1 1 0 1 2 3\n1 0 1 1 2 3 4\n0 1 1 0 1 2 3\n0 1 1 0 1 2 3\n0 1 1 0 1 1 2\n1 2 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 663, "matrix": [[1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1]], "solution": [[3, 2, 1, 0, 1, 2, 3], [2, 1, 1, 0, 1, 2, 3], [1, 0, 1, 1, 2, 3, 4], [0, 1, 1, 0, 1, 2, 3], [0, 1, 1, 0, 1, 2, 3], [0, 1, 1, 0, 1, 1, 2], [1, 2, 1, 0, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 0 1 1 1 1 1\n1 1 1 0 1 1 0\n0 1 1 0 1 1 0\n0 1 1 1 1 1 1\n0 1 1 1 1 1 1\n0 1 0 1 1 1 1\n", "answer": "2 1 2 2 3 3 2\n1 0 1 1 2 2 1\n1 1 1 0 1 1 0\n0 1 1 0 1 1 0\n0 1 2 1 2 2 1\n0 1 1 2 3 3 2\n0 1 0 1 2 3 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 664, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1]], "solution": [[2, 1, 2, 2, 3, 3, 2], [1, 0, 1, 1, 2, 2, 1], [1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 0, 1, 1, 0], [0, 1, 2, 1, 2, 2, 1], [0, 1, 1, 2, 3, 3, 2], [0, 1, 0, 1, 2, 3, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 0 1\n1 1 1\n", "answer": "2 1 2\n1 0 1\n2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 665, "matrix": [[1, 1, 1], [1, 0, 1], [1, 1, 1]], "solution": [[2, 1, 2], [1, 0, 1], [2, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 0 1 0\n1 1 1 1\n1 1 1 0\n", "answer": "2 1 0 1\n1 0 1 0\n2 1 2 1\n3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 666, "matrix": [[1, 1, 0, 1], [1, 0, 1, 0], [1, 1, 1, 1], [1, 1, 1, 0]], "solution": [[2, 1, 0, 1], [1, 0, 1, 0], [2, 1, 2, 1], [3, 2, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 1 1\n1 0 1 0 1 0 1\n1 1 1 0 1 1 1\n1 1 1 1 1 0 1\n1 0 1 1 0 1 1\n0 0 1 1 1 1 1\n0 0 1 0 1 0 1\n", "answer": "0 1 1 0 1 1 2\n1 0 1 0 1 0 1\n2 1 1 0 1 1 2\n2 1 2 1 1 0 1\n1 0 1 1 0 1 2\n0 0 1 1 1 1 2\n0 0 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 667, "matrix": [[0, 1, 1, 0, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 1, 1], [0, 0, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 0, 1]], "solution": [[0, 1, 1, 0, 1, 1, 2], [1, 0, 1, 0, 1, 0, 1], [2, 1, 1, 0, 1, 1, 2], [2, 1, 2, 1, 1, 0, 1], [1, 0, 1, 1, 0, 1, 2], [0, 0, 1, 1, 1, 1, 2], [0, 0, 1, 0, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 1 1\n1 1 0 1 1 1 0 1 1\n1 1 1 0 1 1 1 0 1\n1 1 1 1 1 1 1 0 1\n1 0 0 0 1 1 0 1 1\n1 1 1 1 0 1 1 1 1\n1 1 1 1 1 1 1 1 1\n0 1 0 1 1 0 1 1 1\n0 1 1 1 0 1 1 1 1\n", "answer": "3 2 1 2 2 1 0 1 2\n2 1 0 1 2 1 0 1 2\n3 2 1 0 1 2 1 0 1\n2 1 1 1 2 2 1 0 1\n1 0 0 0 1 1 0 1 2\n2 1 1 1 0 1 1 2 3\n1 2 1 2 1 1 2 3 4\n0 1 0 1 1 0 1 2 3\n0 1 1 1 0 1 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 668, "matrix": [[1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1]], "solution": [[3, 2, 1, 2, 2, 1, 0, 1, 2], [2, 1, 0, 1, 2, 1, 0, 1, 2], [3, 2, 1, 0, 1, 2, 1, 0, 1], [2, 1, 1, 1, 2, 2, 1, 0, 1], [1, 0, 0, 0, 1, 1, 0, 1, 2], [2, 1, 1, 1, 0, 1, 1, 2, 3], [1, 2, 1, 2, 1, 1, 2, 3, 4], [0, 1, 0, 1, 1, 0, 1, 2, 3], [0, 1, 1, 1, 0, 1, 2, 3, 4]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1 0 0\n1 0 1 0 1 1 0 1 0 1\n0 1 0 1 1 1 1 1 0 1\n1 0 1 1 0 0 1 1 1 0\n1 1 1 1 0 0 1 0 1 1\n1 0 1 0 0 1 1 1 1 1\n0 1 1 0 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 1 1\n1 1 1 1 0 1 1 0 1 1\n1 1 1 1 1 1 1 1 1 0\n", "answer": "2 1 2 1 1 0 1 1 0 0\n1 0 1 0 1 1 0 1 0 1\n0 1 0 1 1 1 1 1 0 1\n1 0 1 1 0 0 1 1 1 0\n2 1 2 1 0 0 1 0 1 1\n1 0 1 0 0 1 2 1 2 2\n0 1 1 0 1 1 2 2 3 3\n1 2 2 1 1 0 1 1 2 2\n2 3 2 1 0 1 1 0 1 1\n3 4 3 2 1 2 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 669, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 1, 1, 0, 1, 0, 1], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0, 1, 0, 1, 1], [1, 0, 1, 0, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[2, 1, 2, 1, 1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 1, 1, 0, 1, 0, 1], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1, 1, 1, 0], [2, 1, 2, 1, 0, 0, 1, 0, 1, 1], [1, 0, 1, 0, 0, 1, 2, 1, 2, 2], [0, 1, 1, 0, 1, 1, 2, 2, 3, 3], [1, 2, 2, 1, 1, 0, 1, 1, 2, 2], [2, 3, 2, 1, 0, 1, 1, 0, 1, 1], [3, 4, 3, 2, 1, 2, 2, 1, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n0 1 1 1 1 1 1\n1 1 1 1 1 1 1\n1 0 1 1 1 1 0\n1 1 1 0 1 1 1\n1 1 1 1 1 0 1\n1 1 1 1 0 0 0\n", "answer": "1 2 3 4 5 4 3\n0 1 2 3 4 3 2\n1 1 2 2 3 2 1\n1 0 1 1 2 1 0\n2 1 1 0 1 1 1\n3 2 2 1 1 0 1\n4 3 2 1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 670, "matrix": [[1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 0]], "solution": [[1, 2, 3, 4, 5, 4, 3], [0, 1, 2, 3, 4, 3, 2], [1, 1, 2, 2, 3, 2, 1], [1, 0, 1, 1, 2, 1, 0], [2, 1, 1, 0, 1, 1, 1], [3, 2, 2, 1, 1, 0, 1], [4, 3, 2, 1, 0, 0, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0 0 1 0 0 0 0\n1 0 1 1 1 1 0 0 0\n1 1 1 1 0 0 1 1 0\n1 1 1 0 0 1 1 0 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1\n1 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n", "answer": "0 0 0 0 1 0 0 0 0\n1 0 1 1 1 1 0 0 0\n2 1 2 1 0 0 1 1 0\n3 2 1 0 0 1 1 0 1\n4 3 2 1 1 2 2 1 2\n3 2 3 2 2 2 1 2 3\n2 1 2 3 2 1 0 1 2\n1 0 1 2 3 2 1 2 3\n2 1 2 3 4 3 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 671, "matrix": [[0, 0, 0, 0, 1, 0, 0, 0, 0], [1, 0, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 0, 0, 0, 1, 0, 0, 0, 0], [1, 0, 1, 1, 1, 1, 0, 0, 0], [2, 1, 2, 1, 0, 0, 1, 1, 0], [3, 2, 1, 0, 0, 1, 1, 0, 1], [4, 3, 2, 1, 1, 2, 2, 1, 2], [3, 2, 3, 2, 2, 2, 1, 2, 3], [2, 1, 2, 3, 2, 1, 0, 1, 2], [1, 0, 1, 2, 3, 2, 1, 2, 3], [2, 1, 2, 3, 4, 3, 2, 3, 4]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n0 1 0 1\n1 1 0 1\n1 1 1 0\n", "answer": "1 2 1 2\n0 1 0 1\n1 1 0 1\n2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 672, "matrix": [[1, 1, 1, 1], [0, 1, 0, 1], [1, 1, 0, 1], [1, 1, 1, 0]], "solution": [[1, 2, 1, 2], [0, 1, 0, 1], [1, 1, 0, 1], [2, 2, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 0 1 1\n1 0 0 1\n1 1 1 1\n", "answer": "2 1 1 0\n1 0 1 1\n1 0 0 1\n2 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 673, "matrix": [[1, 1, 1, 0], [1, 0, 1, 1], [1, 0, 0, 1], [1, 1, 1, 1]], "solution": [[2, 1, 1, 0], [1, 0, 1, 1], [1, 0, 0, 1], [2, 1, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 1 1 1\n0 0 0 1 1\n1 1 1 0 1\n1 1 1 0 1\n", "answer": "2 2 2 3 4\n1 1 1 2 3\n0 0 0 1 2\n1 1 1 0 1\n2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 674, "matrix": [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [0, 0, 0, 1, 1], [1, 1, 1, 0, 1], [1, 1, 1, 0, 1]], "solution": [[2, 2, 2, 3, 4], [1, 1, 1, 2, 3], [0, 0, 0, 1, 2], [1, 1, 1, 0, 1], [2, 2, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0 1 1\n1 1 1 1 1 1\n1 1 1 1 1 0\n1 0 0 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n", "answer": "0 0 1 0 1 2\n1 1 2 1 2 1\n2 1 1 2 1 0\n1 0 0 1 2 1\n2 1 1 2 3 2\n3 2 2 3 4 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 675, "matrix": [[0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]], "solution": [[0, 0, 1, 0, 1, 2], [1, 1, 2, 1, 2, 1], [2, 1, 1, 2, 1, 0], [1, 0, 0, 1, 2, 1], [2, 1, 1, 2, 3, 2], [3, 2, 2, 3, 4, 3]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0 1 0\n0 1 1 0 1 1 1\n1 1 1 1 1 1 1\n1 1 0 1 1 1 1\n0 1 1 1 1 1 1\n1 1 0 1 1 0 0\n1 1 1 1 1 0 1\n", "answer": "0 1 1 0 0 1 0\n0 1 1 0 1 2 1\n1 2 1 1 2 3 2\n1 1 0 1 2 2 2\n0 1 1 2 2 1 1\n1 1 0 1 1 0 0\n2 2 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 676, "matrix": [[0, 1, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1]], "solution": [[0, 1, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 2, 1], [1, 2, 1, 1, 2, 3, 2], [1, 1, 0, 1, 2, 2, 2], [0, 1, 1, 2, 2, 1, 1], [1, 1, 0, 1, 1, 0, 0], [2, 2, 1, 2, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1\n1 0 1 0 1 1 0\n1 1 1 1 1 1 1\n0 1 0 1 1 0 0\n1 1 0 1 0 1 1\n0 0 1 1 1 1 1\n1 0 1 1 1 1 1\n", "answer": "2 1 0 1 2 2 1\n1 0 1 0 1 1 0\n1 1 1 1 2 1 1\n0 1 0 1 1 0 0\n1 1 0 1 0 1 1\n0 0 1 2 1 2 2\n1 0 1 2 2 3 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 677, "matrix": [[1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 0, 0], [1, 1, 0, 1, 0, 1, 1], [0, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 2, 2, 1], [1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 2, 1, 1], [0, 1, 0, 1, 1, 0, 0], [1, 1, 0, 1, 0, 1, 1], [0, 0, 1, 2, 1, 2, 2], [1, 0, 1, 2, 2, 3, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1\n1 0 1 0 1\n1 1 1 1 1\n0 1 1 1 1\n1 1 1 1 1\n", "answer": "1 0 1 1 2\n1 0 1 0 1\n1 1 2 1 2\n0 1 2 2 3\n1 2 3 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 678, "matrix": [[1, 0, 1, 1, 1], [1, 0, 1, 0, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 1, 2], [1, 0, 1, 0, 1], [1, 1, 2, 1, 2], [0, 1, 2, 2, 3], [1, 2, 3, 3, 4]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 1 1 0\n1 1 1 0 1\n1 1 0 1 0\n0 1 1 1 1\n", "answer": "4 4 3 2 1\n3 3 2 1 0\n2 2 1 0 1\n1 1 0 1 0\n0 1 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 679, "matrix": [[1, 1, 1, 1, 1], [1, 1, 1, 1, 0], [1, 1, 1, 0, 1], [1, 1, 0, 1, 0], [0, 1, 1, 1, 1]], "solution": [[4, 4, 3, 2, 1], [3, 3, 2, 1, 0], [2, 2, 1, 0, 1], [1, 1, 0, 1, 0], [0, 1, 1, 2, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0\n1 0 1 0 1\n0 1 1 1 0\n1 1 0 1 1\n0 1 0 0 1\n", "answer": "2 1 2 1 0\n1 0 1 0 1\n0 1 1 1 0\n1 1 0 1 1\n0 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 680, "matrix": [[1, 1, 1, 1, 0], [1, 0, 1, 0, 1], [0, 1, 1, 1, 0], [1, 1, 0, 1, 1], [0, 1, 0, 0, 1]], "solution": [[2, 1, 2, 1, 0], [1, 0, 1, 0, 1], [0, 1, 1, 1, 0], [1, 1, 0, 1, 1], [0, 1, 0, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 0 1 0\n0 1 1 1 1\n0 0 1 1 1\n0 0 1 1 1\n", "answer": "2 2 1 2 1\n1 1 0 1 0\n0 1 1 2 1\n0 0 1 2 2\n0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 681, "matrix": [[1, 1, 1, 1, 1], [1, 1, 0, 1, 0], [0, 1, 1, 1, 1], [0, 0, 1, 1, 1], [0, 0, 1, 1, 1]], "solution": [[2, 2, 1, 2, 1], [1, 1, 0, 1, 0], [0, 1, 1, 2, 1], [0, 0, 1, 2, 2], [0, 0, 1, 2, 3]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 1 0 1 1 0 1\n1 1 1 1 0 1 1\n1 1 1 0 1 1 1\n0 1 1 1 0 1 1\n0 0 0 1 1 1 0\n1 1 0 1 1 1 0\n", "answer": "3 2 1 2 2 1 2\n2 1 0 1 1 0 1\n2 2 1 1 0 1 2\n1 2 1 0 1 2 2\n0 1 1 1 0 1 1\n0 0 0 1 1 1 0\n1 1 0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 682, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 0]], "solution": [[3, 2, 1, 2, 2, 1, 2], [2, 1, 0, 1, 1, 0, 1], [2, 2, 1, 1, 0, 1, 2], [1, 2, 1, 0, 1, 2, 2], [0, 1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 1, 1, 0], [1, 1, 0, 1, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0\n1 1 1 0\n1 1 1 1\n1 0 1 0\n", "answer": "1 0 1 0\n2 1 1 0\n2 1 2 1\n1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 683, "matrix": [[1, 0, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [1, 0, 1, 0]], "solution": [[1, 0, 1, 0], [2, 1, 1, 0], [2, 1, 2, 1], [1, 0, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 1 1 1 1 1 1\n1 1 0 0 1 1 1\n1 0 1 1 1 1 0\n1 1 1 0 0 1 1\n1 1 1 1 0 1 1\n1 0 0 1 0 1 1\n", "answer": "4 3 2 2 3 4 3\n3 2 1 1 2 3 2\n2 1 0 0 1 2 1\n1 0 1 1 1 1 0\n2 1 1 0 0 1 1\n2 1 1 1 0 1 2\n1 0 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 684, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 0, 1, 1]], "solution": [[4, 3, 2, 2, 3, 4, 3], [3, 2, 1, 1, 2, 3, 2], [2, 1, 0, 0, 1, 2, 1], [1, 0, 1, 1, 1, 1, 0], [2, 1, 1, 0, 0, 1, 1], [2, 1, 1, 1, 0, 1, 2], [1, 0, 0, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1\n1 1 1 1 1\n1 1 1 1 1\n1 1 0 0 1\n0 0 1 0 1\n", "answer": "0 1 0 1 2\n1 2 1 2 3\n2 2 1 1 2\n1 1 0 0 1\n0 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 685, "matrix": [[0, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 0, 0, 1], [0, 0, 1, 0, 1]], "solution": [[0, 1, 0, 1, 2], [1, 2, 1, 2, 3], [2, 2, 1, 1, 2], [1, 1, 0, 0, 1], [0, 0, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 0\n1 1 1\n", "answer": "0 1 1\n1 1 0\n2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 686, "matrix": [[0, 1, 1], [1, 1, 0], [1, 1, 1]], "solution": [[0, 1, 1], [1, 1, 0], [2, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1\n1 0 1 1 1 0 1 0\n1 1 1 1 1 0 0 1\n0 0 0 0 1 1 1 0\n1 1 1 0 1 0 0 1\n0 1 1 1 1 1 1 0\n1 1 1 1 1 0 0 1\n0 0 1 1 1 0 1 1\n", "answer": "2 1 1 0 1 1 2 1\n1 0 1 1 1 0 1 0\n1 1 1 1 1 0 0 1\n0 0 0 0 1 1 1 0\n1 1 1 0 1 0 0 1\n0 1 2 1 2 1 1 0\n1 1 2 2 1 0 0 1\n0 0 1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 687, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 0, 0, 1], [0, 0, 0, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 0, 1], [0, 0, 1, 1, 1, 0, 1, 1]], "solution": [[2, 1, 1, 0, 1, 1, 2, 1], [1, 0, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 0, 0, 1], [0, 0, 0, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 0, 1], [0, 1, 2, 1, 2, 1, 1, 0], [1, 1, 2, 2, 1, 0, 0, 1], [0, 0, 1, 2, 1, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 0\n0 0 1 0 1 1 1\n0 1 1 1 1 1 1\n1 1 1 1 0 1 1\n0 1 1 1 1 1 1\n1 0 0 0 1 1 1\n0 0 1 1 1 1 1\n", "answer": "1 1 0 1 0 1 0\n0 0 1 0 1 2 1\n0 1 2 1 1 2 2\n1 2 2 1 0 1 2\n0 1 1 1 1 2 3\n1 0 0 0 1 2 3\n0 0 1 1 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 688, "matrix": [[1, 1, 0, 1, 0, 1, 0], [0, 0, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1]], "solution": [[1, 1, 0, 1, 0, 1, 0], [0, 0, 1, 0, 1, 2, 1], [0, 1, 2, 1, 1, 2, 2], [1, 2, 2, 1, 0, 1, 2], [0, 1, 1, 1, 1, 2, 3], [1, 0, 0, 0, 1, 2, 3], [0, 0, 1, 1, 2, 3, 4]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 1 1 1\n1 1 0 1\n1 1 1 1\n", "answer": "3 2 1 0\n3 2 1 1\n2 1 0 1\n3 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 689, "matrix": [[1, 1, 1, 0], [1, 1, 1, 1], [1, 1, 0, 1], [1, 1, 1, 1]], "solution": [[3, 2, 1, 0], [3, 2, 1, 1], [2, 1, 0, 1], [3, 2, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1\n1 1 1 1\n0 1 0 1\n1 1 0 0\n", "answer": "1 0 0 1\n1 1 1 2\n0 1 0 1\n1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 690, "matrix": [[1, 0, 0, 1], [1, 1, 1, 1], [0, 1, 0, 1], [1, 1, 0, 0]], "solution": [[1, 0, 0, 1], [1, 1, 1, 2], [0, 1, 0, 1], [1, 1, 0, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1 0 0\n0 1 1 1 1 1 1 1 1\n1 1 0 1 0 1 1 1 1\n1 1 1 1 1 0 0 1 1\n0 0 1 0 1 1 1 1 1\n1 1 1 1 1 0 1 1 0\n1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0 1\n1 1 1 0 0 0 1 1 1\n", "answer": "1 0 1 1 0 1 1 0 0\n0 1 1 2 1 2 2 1 1\n1 1 0 1 0 1 1 2 2\n1 1 1 1 1 0 0 1 2\n0 0 1 0 1 1 1 2 1\n1 1 2 1 1 0 1 1 0\n2 2 3 2 2 1 2 1 1\n3 3 2 1 1 1 1 0 1\n3 2 1 0 0 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 691, "matrix": [[1, 0, 1, 1, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1, 1], [0, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 0, 0, 1, 1, 1]], "solution": [[1, 0, 1, 1, 0, 1, 1, 0, 0], [0, 1, 1, 2, 1, 2, 2, 1, 1], [1, 1, 0, 1, 0, 1, 1, 2, 2], [1, 1, 1, 1, 1, 0, 0, 1, 2], [0, 0, 1, 0, 1, 1, 1, 2, 1], [1, 1, 2, 1, 1, 0, 1, 1, 0], [2, 2, 3, 2, 2, 1, 2, 1, 1], [3, 3, 2, 1, 1, 1, 1, 0, 1], [3, 2, 1, 0, 0, 0, 1, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 1 1\n1 0 1 1 1 0 1 1\n1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1\n1 0 1 1 0 1 0 1\n0 1 1 1 1 1 1 0\n0 1 1 0 1 1 1 1\n1 1 1 1 1 1 0 1\n", "answer": "2 1 0 1 0 1 2 3\n1 0 1 2 1 0 1 2\n2 1 1 2 2 1 2 3\n2 1 0 1 1 2 1 2\n1 0 1 1 0 1 0 1\n0 1 2 1 1 2 1 0\n0 1 1 0 1 2 1 1\n1 2 2 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 692, "matrix": [[1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1]], "solution": [[2, 1, 0, 1, 0, 1, 2, 3], [1, 0, 1, 2, 1, 0, 1, 2], [2, 1, 1, 2, 2, 1, 2, 3], [2, 1, 0, 1, 1, 2, 1, 2], [1, 0, 1, 1, 0, 1, 0, 1], [0, 1, 2, 1, 1, 2, 1, 0], [0, 1, 1, 0, 1, 2, 1, 1], [1, 2, 2, 1, 2, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1 1 0\n1 1 1 1 0 0 1 1 1\n0 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 0\n1 0 0 1 1 1 1 1 0\n0 1 0 1 0 1 1 0 0\n1 0 1 0 0 0 1 1 1\n1 0 1 1 1 1 1 1 1\n", "answer": "2 1 0 0 1 1 2 1 0\n1 2 1 1 0 0 1 2 1\n0 1 2 2 1 1 2 3 2\n1 2 2 2 1 2 3 2 1\n2 1 1 1 0 1 2 1 0\n1 0 0 1 1 2 2 1 0\n0 1 0 1 0 1 1 0 0\n1 0 1 0 0 0 1 1 1\n1 0 1 1 1 1 2 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 693, "matrix": [[1, 1, 0, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 0, 1, 1, 2, 1, 0], [1, 2, 1, 1, 0, 0, 1, 2, 1], [0, 1, 2, 2, 1, 1, 2, 3, 2], [1, 2, 2, 2, 1, 2, 3, 2, 1], [2, 1, 1, 1, 0, 1, 2, 1, 0], [1, 0, 0, 1, 1, 2, 2, 1, 0], [0, 1, 0, 1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 2, 2, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1\n1 1 0 1 1 1 0\n0 1 1 1 0 1 0\n1 0 0 0 1 0 1\n1 1 0 1 1 1 1\n1 1 1 1 0 1 1\n1 1 1 1 1 1 0\n", "answer": "0 1 1 2 2 2 1\n1 1 0 1 1 1 0\n0 1 1 1 0 1 0\n1 0 0 0 1 0 1\n2 1 0 1 1 1 2\n3 2 1 1 0 1 1\n4 3 2 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 694, "matrix": [[0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 0], [1, 0, 0, 0, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 1, 2, 2, 2, 1], [1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 0], [1, 0, 0, 0, 1, 0, 1], [2, 1, 0, 1, 1, 1, 2], [3, 2, 1, 1, 0, 1, 1], [4, 3, 2, 2, 1, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n1 1 1\n0 1 1\n", "answer": "1 0 1\n1 1 2\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 695, "matrix": [[1, 0, 1], [1, 1, 1], [0, 1, 1]], "solution": [[1, 0, 1], [1, 1, 2], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1\n1 1 0 1 1\n1 1 1 0 0\n1 1 1 1 1\n1 1 1 1 0\n", "answer": "2 1 0 0 1\n2 1 0 1 1\n3 2 1 0 0\n4 3 2 1 1\n4 3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 696, "matrix": [[1, 1, 0, 0, 1], [1, 1, 0, 1, 1], [1, 1, 1, 0, 0], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0]], "solution": [[2, 1, 0, 0, 1], [2, 1, 0, 1, 1], [3, 2, 1, 0, 0], [4, 3, 2, 1, 1], [4, 3, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 0 1 1 1\n1 1 1 1 1 1\n1 1 0 0 1 1\n1 1 1 1 1 1\n0 1 1 1 1 1\n", "answer": "3 2 1 2 3 4\n2 1 0 1 2 3\n3 2 1 1 2 3\n2 1 0 0 1 2\n1 2 1 1 2 3\n0 1 2 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 697, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1]], "solution": [[3, 2, 1, 2, 3, 4], [2, 1, 0, 1, 2, 3], [3, 2, 1, 1, 2, 3], [2, 1, 0, 0, 1, 2], [1, 2, 1, 1, 2, 3], [0, 1, 2, 2, 3, 4]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0\n1 1 1\n1 0 1\n", "answer": "0 0 0\n1 1 1\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 698, "matrix": [[0, 0, 0], [1, 1, 1], [1, 0, 1]], "solution": [[0, 0, 0], [1, 1, 1], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 0 1 1 1\n0 0 0 1 0 1\n1 1 1 1 1 1\n0 1 1 0 1 1\n1 1 1 0 1 1\n", "answer": "2 2 1 2 2 3\n1 1 0 1 1 2\n0 0 0 1 0 1\n1 1 1 1 1 2\n0 1 1 0 1 2\n1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 699, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [0, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1]], "solution": [[2, 2, 1, 2, 2, 3], [1, 1, 0, 1, 1, 2], [0, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 2], [0, 1, 1, 0, 1, 2], [1, 2, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 1 1\n1 1 0 0 1 1 0 1 1\n1 0 1 0 1 1 1 1 1\n1 1 0 1 1 1 0 0 1\n0 1 1 1 1 1 0 1 1\n1 1 1 1 0 1 1 1 0\n1 1 1 1 1 1 1 1 0\n0 0 0 1 1 0 1 0 1\n0 0 1 1 1 1 1 1 0\n", "answer": "3 2 1 1 2 1 0 1 2\n2 1 0 0 1 1 0 1 2\n1 0 1 0 1 2 1 1 2\n1 1 0 1 2 1 0 0 1\n0 1 1 2 1 1 0 1 1\n1 2 2 1 0 1 1 1 0\n1 1 1 2 1 1 2 1 0\n0 0 0 1 1 0 1 0 1\n0 0 1 2 2 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 700, "matrix": [[1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, 1, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1, 0]], "solution": [[3, 2, 1, 1, 2, 1, 0, 1, 2], [2, 1, 0, 0, 1, 1, 0, 1, 2], [1, 0, 1, 0, 1, 2, 1, 1, 2], [1, 1, 0, 1, 2, 1, 0, 0, 1], [0, 1, 1, 2, 1, 1, 0, 1, 1], [1, 2, 2, 1, 0, 1, 1, 1, 0], [1, 1, 1, 2, 1, 1, 2, 1, 0], [0, 0, 0, 1, 1, 0, 1, 0, 1], [0, 0, 1, 2, 2, 1, 2, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1\n0 1 1 1 1 1 1\n1 0 1 1 1 1 1\n1 1 1 1 1 1 1\n1 0 1 1 1 0 1\n0 1 0 1 0 1 1\n1 1 1 0 0 1 1\n", "answer": "1 1 0 0 1 2 3\n0 1 1 1 2 3 4\n1 0 1 2 3 2 3\n2 1 2 3 2 1 2\n1 0 1 2 1 0 1\n0 1 0 1 0 1 2\n1 2 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 701, "matrix": [[1, 1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1]], "solution": [[1, 1, 0, 0, 1, 2, 3], [0, 1, 1, 1, 2, 3, 4], [1, 0, 1, 2, 3, 2, 3], [2, 1, 2, 3, 2, 1, 2], [1, 0, 1, 2, 1, 0, 1], [0, 1, 0, 1, 0, 1, 2], [1, 2, 1, 0, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1\n0 1 0 1 0 1 1\n1 1 1 1 1 1 0\n1 1 1 0 1 1 0\n0 1 1 1 0 1 1\n1 1 0 1 1 1 0\n1 1 0 1 1 1 1\n", "answer": "1 1 0 1 1 2 2\n0 1 0 1 0 1 1\n1 2 1 1 1 1 0\n1 2 1 0 1 1 0\n0 1 1 1 0 1 1\n1 1 0 1 1 1 0\n2 1 0 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 702, "matrix": [[1, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1]], "solution": [[1, 1, 0, 1, 1, 2, 2], [0, 1, 0, 1, 0, 1, 1], [1, 2, 1, 1, 1, 1, 0], [1, 2, 1, 0, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0], [2, 1, 0, 1, 2, 2, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1\n1 1 1 1 1 1\n0 1 0 1 1 1\n1 1 1 1 0 1\n1 1 1 1 0 1\n1 0 1 1 1 1\n", "answer": "1 0 1 0 1 2\n1 1 1 1 2 3\n0 1 0 1 1 2\n1 2 1 1 0 1\n2 1 2 1 0 1\n1 0 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 703, "matrix": [[1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1]], "solution": [[1, 0, 1, 0, 1, 2], [1, 1, 1, 1, 2, 3], [0, 1, 0, 1, 1, 2], [1, 2, 1, 1, 0, 1], [2, 1, 2, 1, 0, 1], [1, 0, 1, 2, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 0 1\n1 1 1 0 1 1 1 1 1\n1 1 1 1 0 1 1 1 1\n1 1 0 1 1 1 1 1 0\n0 1 0 1 1 1 1 1 0\n0 1 1 1 0 1 1 1 1\n0 1 0 1 0 0 1 1 1\n0 1 1 1 1 1 1 1 1\n", "answer": "0 1 2 2 1 2 2 1 2\n1 2 2 1 0 1 1 0 1\n2 2 1 0 1 2 2 1 2\n2 2 1 1 0 1 2 2 1\n1 1 0 1 1 2 2 1 0\n0 1 0 1 1 2 2 1 0\n0 1 1 1 0 1 2 2 1\n0 1 0 1 0 0 1 2 2\n0 1 1 2 1 1 2 3 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 704, "matrix": [[0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 2, 2, 1, 2, 2, 1, 2], [1, 2, 2, 1, 0, 1, 1, 0, 1], [2, 2, 1, 0, 1, 2, 2, 1, 2], [2, 2, 1, 1, 0, 1, 2, 2, 1], [1, 1, 0, 1, 1, 2, 2, 1, 0], [0, 1, 0, 1, 1, 2, 2, 1, 0], [0, 1, 1, 1, 0, 1, 2, 2, 1], [0, 1, 0, 1, 0, 0, 1, 2, 2], [0, 1, 1, 2, 1, 1, 2, 3, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 1\n0 1 0 0 1 1 1\n1 0 1 1 1 1 1\n1 0 1 1 1 1 1\n1 1 0 1 1 0 1\n1 1 0 1 1 0 1\n1 1 0 1 0 1 1\n", "answer": "1 1 0 1 0 1 2\n0 1 0 0 1 2 3\n1 0 1 1 2 2 3\n1 0 1 2 2 1 2\n2 1 0 1 1 0 1\n2 1 0 1 1 0 1\n2 1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 705, "matrix": [[1, 1, 0, 1, 0, 1, 1], [0, 1, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1]], "solution": [[1, 1, 0, 1, 0, 1, 2], [0, 1, 0, 0, 1, 2, 3], [1, 0, 1, 1, 2, 2, 3], [1, 0, 1, 2, 2, 1, 2], [2, 1, 0, 1, 1, 0, 1], [2, 1, 0, 1, 1, 0, 1], [2, 1, 0, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0\n1 0 1 1\n1 1 1 1\n0 1 1 1\n", "answer": "1 0 0 0\n1 0 1 1\n1 1 2 2\n0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 706, "matrix": [[1, 0, 0, 0], [1, 0, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1]], "solution": [[1, 0, 0, 0], [1, 0, 1, 1], [1, 1, 2, 2], [0, 1, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0 0 1 1 0 1 1\n1 1 1 0 1 1 1 1 1 1\n1 1 0 0 1 1 1 1 1 1\n1 1 1 0 1 1 0 1 1 1\n1 1 0 1 1 1 1 1 0 1\n1 1 1 0 1 1 1 0 0 1\n1 1 0 0 1 0 1 1 1 1\n1 0 1 0 1 0 1 1 0 1\n1 1 0 1 1 1 1 0 1 1\n1 1 1 1 0 1 0 1 0 1\n", "answer": "1 0 0 0 0 1 1 0 1 2\n2 1 1 0 1 2 2 1 2 3\n2 1 0 0 1 2 1 2 2 3\n3 2 1 0 1 1 0 1 1 2\n2 1 0 1 2 2 1 1 0 1\n3 2 1 0 1 1 1 0 0 1\n2 1 0 0 1 0 1 1 1 2\n1 0 1 0 1 0 1 1 0 1\n2 1 0 1 1 1 1 0 1 2\n3 2 1 1 0 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 707, "matrix": [[1, 0, 0, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 0, 1]], "solution": [[1, 0, 0, 0, 0, 1, 1, 0, 1, 2], [2, 1, 1, 0, 1, 2, 2, 1, 2, 3], [2, 1, 0, 0, 1, 2, 1, 2, 2, 3], [3, 2, 1, 0, 1, 1, 0, 1, 1, 2], [2, 1, 0, 1, 2, 2, 1, 1, 0, 1], [3, 2, 1, 0, 1, 1, 1, 0, 0, 1], [2, 1, 0, 0, 1, 0, 1, 1, 1, 2], [1, 0, 1, 0, 1, 0, 1, 1, 0, 1], [2, 1, 0, 1, 1, 1, 1, 0, 1, 2], [3, 2, 1, 1, 0, 1, 0, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0\n1 0 1 1 1 1 1 1\n1 1 1 1 1 0 1 1\n1 0 1 1 1 0 1 1\n1 1 1 0 1 1 1 1\n0 0 1 1 1 1 1 1\n1 1 1 0 1 0 1 1\n1 1 1 1 1 0 1 1\n", "answer": "2 1 2 3 3 2 1 0\n1 0 1 2 2 1 2 1\n2 1 2 2 1 0 1 2\n1 0 1 1 1 0 1 2\n1 1 1 0 1 1 2 3\n0 0 1 1 2 1 2 3\n1 1 1 0 1 0 1 2\n2 2 2 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 708, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[2, 1, 2, 3, 3, 2, 1, 0], [1, 0, 1, 2, 2, 1, 2, 1], [2, 1, 2, 2, 1, 0, 1, 2], [1, 0, 1, 1, 1, 0, 1, 2], [1, 1, 1, 0, 1, 1, 2, 3], [0, 0, 1, 1, 2, 1, 2, 3], [1, 1, 1, 0, 1, 0, 1, 2], [2, 2, 2, 1, 1, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n0 1 1 1\n0 1 1 1\n1 0 0 1\n", "answer": "1 2 3 4\n0 1 2 3\n0 1 1 2\n1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 709, "matrix": [[1, 1, 1, 1], [0, 1, 1, 1], [0, 1, 1, 1], [1, 0, 0, 1]], "solution": [[1, 2, 3, 4], [0, 1, 2, 3], [0, 1, 1, 2], [1, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n0 0 0\n1 1 1\n", "answer": "1 1 1\n0 0 0\n1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 710, "matrix": [[1, 1, 1], [0, 0, 0], [1, 1, 1]], "solution": [[1, 1, 1], [0, 0, 0], [1, 1, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1\n0 0 0 1 1 1 0 1\n1 1 1 1 1 0 1 0\n1 0 1 1 1 1 1 1\n1 1 0 0 0 1 1 1\n1 0 1 0 0 0 1 1\n", "answer": "0 1 2 3 3 2 1 0\n1 1 2 3 4 3 2 1\n1 0 1 2 3 2 1 2\n0 0 0 1 2 1 0 1\n1 1 1 2 1 0 1 0\n1 0 1 1 1 1 2 1\n2 1 0 0 0 1 2 2\n1 0 1 0 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 711, "matrix": [[0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 1]], "solution": [[0, 1, 2, 3, 3, 2, 1, 0], [1, 1, 2, 3, 4, 3, 2, 1], [1, 0, 1, 2, 3, 2, 1, 2], [0, 0, 0, 1, 2, 1, 0, 1], [1, 1, 1, 2, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1, 2, 1], [2, 1, 0, 0, 0, 1, 2, 2], [1, 0, 1, 0, 0, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 0\n0 1 0 1 0\n1 1 1 0 0\n1 0 0 1 1\n0 1 1 1 1\n", "answer": "0 1 0 1 0\n0 1 0 1 0\n1 1 1 0 0\n1 0 0 1 1\n0 1 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 712, "matrix": [[0, 1, 0, 1, 0], [0, 1, 0, 1, 0], [1, 1, 1, 0, 0], [1, 0, 0, 1, 1], [0, 1, 1, 1, 1]], "solution": [[0, 1, 0, 1, 0], [0, 1, 0, 1, 0], [1, 1, 1, 0, 0], [1, 0, 0, 1, 1], [0, 1, 1, 2, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1 1\n0 0 1 1 0 0 0 1 1\n1 0 1 0 1 1 1 1 1\n0 0 1 1 1 1 0 1 1\n1 1 0 0 1 0 1 1 1\n1 0 0 0 1 0 1 1 1\n0 0 0 1 1 1 0 1 1\n", "answer": "1 0 1 2 3 3 3 4 5\n1 0 1 2 2 2 2 3 4\n1 0 1 2 1 1 1 2 3\n0 0 1 1 0 0 0 1 2\n1 0 1 0 1 1 1 2 3\n0 0 1 1 2 1 0 1 2\n1 1 0 0 1 0 1 2 3\n1 0 0 0 1 0 1 2 3\n0 0 0 1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 713, "matrix": [[1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1, 0, 1, 1]], "solution": [[1, 0, 1, 2, 3, 3, 3, 4, 5], [1, 0, 1, 2, 2, 2, 2, 3, 4], [1, 0, 1, 2, 1, 1, 1, 2, 3], [0, 0, 1, 1, 0, 0, 0, 1, 2], [1, 0, 1, 0, 1, 1, 1, 2, 3], [0, 0, 1, 1, 2, 1, 0, 1, 2], [1, 1, 0, 0, 1, 0, 1, 2, 3], [1, 0, 0, 0, 1, 0, 1, 2, 3], [0, 0, 0, 1, 2, 1, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0 0 0 0\n0 1 1 0 1 1 1 1 0 0\n1 1 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 0 1 1\n1 1 0 0 1 1 1 1 1 1\n0 0 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 0 1 1 1\n1 0 0 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 0 1 1\n", "answer": "1 2 2 1 0 1 0 0 0 0\n0 1 1 0 1 2 1 1 0 0\n1 2 2 1 2 3 2 1 1 1\n2 2 1 0 1 2 1 0 1 2\n1 1 0 0 1 2 2 1 2 3\n0 0 1 1 2 2 1 0 1 2\n1 1 1 1 2 1 0 1 2 3\n1 0 0 0 1 2 1 2 3 4\n2 1 1 1 2 3 2 1 2 3\n2 1 0 1 2 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 714, "matrix": [[1, 1, 1, 1, 0, 1, 0, 0, 0, 0], [0, 1, 1, 0, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1]], "solution": [[1, 2, 2, 1, 0, 1, 0, 0, 0, 0], [0, 1, 1, 0, 1, 2, 1, 1, 0, 0], [1, 2, 2, 1, 2, 3, 2, 1, 1, 1], [2, 2, 1, 0, 1, 2, 1, 0, 1, 2], [1, 1, 0, 0, 1, 2, 2, 1, 2, 3], [0, 0, 1, 1, 2, 2, 1, 0, 1, 2], [1, 1, 1, 1, 2, 1, 0, 1, 2, 3], [1, 0, 0, 0, 1, 2, 1, 2, 3, 4], [2, 1, 1, 1, 2, 3, 2, 1, 2, 3], [2, 1, 0, 1, 2, 2, 1, 0, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 1\n1 1 1 0 0 0 0 1 0\n1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 0 1\n0 0 1 1 1 1 1 1 1\n0 1 1 1 1 0 1 1 0\n1 0 0 0 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n", "answer": "0 1 0 1 1 2 2 3 2\n1 2 1 1 0 1 1 2 1\n2 2 1 0 0 0 0 1 0\n2 2 2 1 1 1 1 1 1\n1 1 2 2 2 1 0 0 1\n0 0 1 2 2 1 1 1 1\n0 1 1 1 1 0 1 1 0\n1 0 0 0 1 1 2 2 1\n2 1 1 1 2 2 3 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 715, "matrix": [[0, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 0, 1, 1, 2, 2, 3, 2], [1, 2, 1, 1, 0, 1, 1, 2, 1], [2, 2, 1, 0, 0, 0, 0, 1, 0], [2, 2, 2, 1, 1, 1, 1, 1, 1], [1, 1, 2, 2, 2, 1, 0, 0, 1], [0, 0, 1, 2, 2, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 0, 0, 0, 1, 1, 2, 2, 1], [2, 1, 1, 1, 2, 2, 3, 3, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 0 1 1 0\n0 1 1 0 1 1 0 0\n1 1 1 1 1 0 1 1\n1 1 1 1 1 0 1 0\n1 1 0 0 1 0 0 1\n0 1 1 1 1 1 1 0\n1 0 1 1 1 1 1 0\n1 1 1 1 0 1 0 1\n", "answer": "1 1 0 0 0 1 1 0\n0 1 1 0 1 1 0 0\n1 2 2 1 1 0 1 1\n2 2 1 1 1 0 1 0\n1 1 0 0 1 0 0 1\n0 1 1 1 2 1 1 0\n1 0 1 2 1 2 1 0\n2 1 2 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 716, "matrix": [[1, 1, 0, 0, 0, 1, 1, 0], [0, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 0, 0, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 0, 1]], "solution": [[1, 1, 0, 0, 0, 1, 1, 0], [0, 1, 1, 0, 1, 1, 0, 0], [1, 2, 2, 1, 1, 0, 1, 1], [2, 2, 1, 1, 1, 0, 1, 0], [1, 1, 0, 0, 1, 0, 0, 1], [0, 1, 1, 1, 2, 1, 1, 0], [1, 0, 1, 2, 1, 2, 1, 0], [2, 1, 2, 1, 0, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 0 1\n0 1 0\n", "answer": "2 1 2\n1 0 1\n0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 717, "matrix": [[1, 1, 1], [1, 0, 1], [0, 1, 0]], "solution": [[2, 1, 2], [1, 0, 1], [0, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0 0\n1 1 1 0 1\n0 0 0 0 1\n1 1 1 1 1\n1 1 0 1 1\n", "answer": "0 1 0 0 0\n1 1 1 0 1\n0 0 0 0 1\n1 1 1 1 2\n2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 718, "matrix": [[0, 1, 0, 0, 0], [1, 1, 1, 0, 1], [0, 0, 0, 0, 1], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1]], "solution": [[0, 1, 0, 0, 0], [1, 1, 1, 0, 1], [0, 0, 0, 0, 1], [1, 1, 1, 1, 2], [2, 1, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1\n1 1 1 1 0 1\n1 1 0 1 1 1\n0 1 1 0 0 1\n1 0 0 1 1 0\n0 1 1 0 1 1\n", "answer": "3 2 1 0 1 2\n2 2 1 1 0 1\n1 1 0 1 1 2\n0 1 1 0 0 1\n1 0 0 1 1 0\n0 1 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 719, "matrix": [[1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 1, 1]], "solution": [[3, 2, 1, 0, 1, 2], [2, 2, 1, 1, 0, 1], [1, 1, 0, 1, 1, 2], [0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 1, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 0 0\n1 1 1 1 1 0 0 0\n0 1 1 1 0 0 1 1\n0 1 1 0 1 0 1 1\n1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0\n0 1 1 1 0 0 1 1\n1 1 1 1 0 1 1 1\n", "answer": "2 1 0 0 1 1 0 0\n1 2 1 1 1 0 0 0\n0 1 2 1 0 0 1 1\n0 1 1 0 1 0 1 2\n1 2 2 1 2 1 2 1\n1 2 3 2 1 1 1 0\n0 1 2 1 0 0 1 1\n1 2 2 1 0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 720, "matrix": [[1, 1, 0, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0], [0, 1, 1, 1, 0, 0, 1, 1], [0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1]], "solution": [[2, 1, 0, 0, 1, 1, 0, 0], [1, 2, 1, 1, 1, 0, 0, 0], [0, 1, 2, 1, 0, 0, 1, 1], [0, 1, 1, 0, 1, 0, 1, 2], [1, 2, 2, 1, 2, 1, 2, 1], [1, 2, 3, 2, 1, 1, 1, 0], [0, 1, 2, 1, 0, 0, 1, 1], [1, 2, 2, 1, 0, 1, 2, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n0 1 1\n1 0 0\n", "answer": "1 0 1\n0 1 1\n1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 721, "matrix": [[1, 0, 1], [0, 1, 1], [1, 0, 0]], "solution": [[1, 0, 1], [0, 1, 1], [1, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0 0\n0 1 0 0 1\n1 0 1 1 1\n0 1 1 0 1\n1 1 1 1 1\n", "answer": "0 0 1 0 0\n0 1 0 0 1\n1 0 1 1 2\n0 1 1 0 1\n1 2 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 722, "matrix": [[0, 0, 1, 0, 0], [0, 1, 0, 0, 1], [1, 0, 1, 1, 1], [0, 1, 1, 0, 1], [1, 1, 1, 1, 1]], "solution": [[0, 0, 1, 0, 0], [0, 1, 0, 0, 1], [1, 0, 1, 1, 2], [0, 1, 1, 0, 1], [1, 2, 2, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 1 1\n1 1 0\n", "answer": "0 1 0\n1 2 1\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 723, "matrix": [[0, 1, 0], [1, 1, 1], [1, 1, 0]], "solution": [[0, 1, 0], [1, 2, 1], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0 0\n1 1 1 1 0 0 1\n1 1 1 1 1 1 0\n0 1 1 1 1 1 0\n0 1 1 0 1 1 1\n1 1 1 1 1 0 1\n1 1 1 1 1 0 0\n", "answer": "2 1 0 1 1 0 0\n2 2 1 1 0 0 1\n1 2 2 2 1 1 0\n0 1 2 1 2 1 0\n0 1 1 0 1 1 1\n1 2 2 1 1 0 1\n2 3 3 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 724, "matrix": [[1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 0]], "solution": [[2, 1, 0, 1, 1, 0, 0], [2, 2, 1, 1, 0, 0, 1], [1, 2, 2, 2, 1, 1, 0], [0, 1, 2, 1, 2, 1, 0], [0, 1, 1, 0, 1, 1, 1], [1, 2, 2, 1, 1, 0, 1], [2, 3, 3, 2, 1, 0, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 1 1 1\n1 0 0 1\n1 1 1 1\n", "answer": "3 2 1 0\n2 1 1 1\n1 0 0 1\n2 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 725, "matrix": [[1, 1, 1, 0], [1, 1, 1, 1], [1, 0, 0, 1], [1, 1, 1, 1]], "solution": [[3, 2, 1, 0], [2, 1, 1, 1], [1, 0, 0, 1], [2, 1, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0\n0 1 1 0\n1 1 1 0\n1 1 0 1\n", "answer": "0 1 0 0\n0 1 1 0\n1 2 1 0\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 726, "matrix": [[0, 1, 0, 0], [0, 1, 1, 0], [1, 1, 1, 0], [1, 1, 0, 1]], "solution": [[0, 1, 0, 0], [0, 1, 1, 0], [1, 2, 1, 0], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 0 0\n1 0 1\n", "answer": "2 1 1\n1 0 0\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 727, "matrix": [[1, 1, 1], [1, 0, 0], [1, 0, 1]], "solution": [[2, 1, 1], [1, 0, 0], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1 0\n1 1 1 1 1 1 1 1 1\n1 0 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 0 0\n1 1 0 1 0 1 1 1 1\n0 0 1 1 1 1 0 0 1\n1 0 1 1 0 1 1 1 1\n1 1 1 1 1 1 0 1 0\n1 1 0 1 1 1 0 0 1\n", "answer": "3 2 2 1 0 1 2 1 0\n2 1 2 2 1 2 1 2 1\n1 0 1 2 2 1 0 1 1\n2 1 1 2 1 2 1 0 0\n1 1 0 1 0 1 1 1 1\n0 0 1 2 1 1 0 0 1\n1 0 1 1 0 1 1 1 1\n2 1 1 2 1 1 0 1 0\n2 1 0 1 2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 728, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 0, 1, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1, 0, 0, 1]], "solution": [[3, 2, 2, 1, 0, 1, 2, 1, 0], [2, 1, 2, 2, 1, 2, 1, 2, 1], [1, 0, 1, 2, 2, 1, 0, 1, 1], [2, 1, 1, 2, 1, 2, 1, 0, 0], [1, 1, 0, 1, 0, 1, 1, 1, 1], [0, 0, 1, 2, 1, 1, 0, 0, 1], [1, 0, 1, 1, 0, 1, 1, 1, 1], [2, 1, 1, 2, 1, 1, 0, 1, 0], [2, 1, 0, 1, 2, 1, 0, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 1 0\n1 1 0 1 0 0 0 1 1\n0 1 0 0 1 1 0 1 0\n1 1 0 0 0 1 1 1 1\n1 1 0 0 0 1 1 0 1\n1 1 1 1 0 1 0 1 0\n1 1 0 0 0 1 1 1 1\n1 0 1 1 1 0 1 1 1\n1 1 1 1 0 0 0 0 0\n", "answer": "1 0 1 2 1 1 1 1 0\n1 1 0 1 0 0 0 1 1\n0 1 0 0 1 1 0 1 0\n1 1 0 0 0 1 1 1 1\n2 1 0 0 0 1 1 0 1\n3 2 1 1 0 1 0 1 0\n2 1 0 0 0 1 1 2 1\n1 0 1 1 1 0 1 1 1\n2 1 2 1 0 0 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 729, "matrix": [[1, 0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 0, 0, 0, 1, 1], [0, 1, 0, 0, 1, 1, 0, 1, 0], [1, 1, 0, 0, 0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0, 1, 0], [1, 1, 0, 0, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 0, 0]], "solution": [[1, 0, 1, 2, 1, 1, 1, 1, 0], [1, 1, 0, 1, 0, 0, 0, 1, 1], [0, 1, 0, 0, 1, 1, 0, 1, 0], [1, 1, 0, 0, 0, 1, 1, 1, 1], [2, 1, 0, 0, 0, 1, 1, 0, 1], [3, 2, 1, 1, 0, 1, 0, 1, 0], [2, 1, 0, 0, 0, 1, 1, 2, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1], [2, 1, 2, 1, 0, 0, 0, 0, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 0 0 1\n1 1 1 0\n0 1 1 1\n", "answer": "2 1 0 1\n1 0 0 1\n1 1 1 0\n0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 730, "matrix": [[1, 1, 0, 1], [1, 0, 0, 1], [1, 1, 1, 0], [0, 1, 1, 1]], "solution": [[2, 1, 0, 1], [1, 0, 0, 1], [1, 1, 1, 0], [0, 1, 2, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1\n0 1 1 1 1\n1 0 0 1 1\n1 1 1 1 0\n0 1 0 1 1\n", "answer": "1 0 0 1 2\n0 1 1 2 2\n1 0 0 1 1\n1 1 1 1 0\n0 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 731, "matrix": [[1, 0, 0, 1, 1], [0, 1, 1, 1, 1], [1, 0, 0, 1, 1], [1, 1, 1, 1, 0], [0, 1, 0, 1, 1]], "solution": [[1, 0, 0, 1, 2], [0, 1, 1, 2, 2], [1, 0, 0, 1, 1], [1, 1, 1, 1, 0], [0, 1, 0, 1, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0\n1 1 0 1 1 1 0\n1 1 1 1 0 0 0\n1 1 1 1 1 0 1\n1 0 1 1 0 0 1\n1 1 1 0 0 1 1\n1 0 1 0 1 1 0\n", "answer": "3 2 1 1 0 1 0\n2 1 0 1 1 1 0\n3 2 1 1 0 0 0\n2 1 2 2 1 0 1\n1 0 1 1 0 0 1\n2 1 1 0 0 1 1\n1 0 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 732, "matrix": [[1, 1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1, 0]], "solution": [[3, 2, 1, 1, 0, 1, 0], [2, 1, 0, 1, 1, 1, 0], [3, 2, 1, 1, 0, 0, 0], [2, 1, 2, 2, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1], [2, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 0 1 1 1 1 0\n1 1 1 1 0 1 0 1 1 1\n1 0 1 1 1 0 1 1 1 1\n1 1 1 1 0 1 1 1 0 1\n1 1 1 0 0 1 1 1 1 1\n1 1 1 0 1 1 0 1 0 0\n1 0 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 0 0\n1 1 1 1 1 0 1 1 1 1\n0 1 1 1 1 1 1 1 1 0\n", "answer": "2 1 0 0 0 1 1 2 1 0\n2 1 1 1 0 1 0 1 2 1\n1 0 1 2 1 0 1 2 1 2\n2 1 2 1 0 1 2 1 0 1\n3 2 1 0 0 1 1 2 1 1\n2 1 1 0 1 1 0 1 0 0\n1 0 1 1 2 2 1 2 1 1\n2 1 0 1 2 1 2 1 0 0\n1 2 1 2 1 0 1 2 1 1\n0 1 2 3 2 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 733, "matrix": [[1, 1, 0, 0, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[2, 1, 0, 0, 0, 1, 1, 2, 1, 0], [2, 1, 1, 1, 0, 1, 0, 1, 2, 1], [1, 0, 1, 2, 1, 0, 1, 2, 1, 2], [2, 1, 2, 1, 0, 1, 2, 1, 0, 1], [3, 2, 1, 0, 0, 1, 1, 2, 1, 1], [2, 1, 1, 0, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 2, 2, 1, 2, 1, 1], [2, 1, 0, 1, 2, 1, 2, 1, 0, 0], [1, 2, 1, 2, 1, 0, 1, 2, 1, 1], [0, 1, 2, 3, 2, 1, 2, 2, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0 1 0 1 1 0 0 1\n1 1 1 1 0 1 1 1 1 0\n0 1 1 0 1 1 0 0 1 1\n0 1 0 0 0 1 1 1 1 1\n1 0 0 0 0 0 1 1 0 1\n1 1 1 1 1 1 0 1 1 1\n0 0 1 0 0 1 1 1 1 1\n1 1 1 0 1 0 1 1 1 1\n1 1 1 1 1 1 1 0 0 1\n1 1 1 0 1 1 1 1 1 0\n", "answer": "0 0 0 1 0 1 1 0 0 1\n1 1 1 1 0 1 1 1 1 0\n0 1 1 0 1 1 0 0 1 1\n0 1 0 0 0 1 1 1 1 2\n1 0 0 0 0 0 1 1 0 1\n1 1 1 1 1 1 0 1 1 2\n0 0 1 0 0 1 1 2 2 3\n1 1 1 0 1 0 1 1 1 2\n2 2 2 1 2 1 1 0 0 1\n3 2 1 0 1 2 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 734, "matrix": [[0, 0, 0, 1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1, 0, 0, 1, 1], [0, 1, 0, 0, 0, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 0]], "solution": [[0, 0, 0, 1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1, 0, 0, 1, 1], [0, 1, 0, 0, 0, 1, 1, 1, 1, 2], [1, 0, 0, 0, 0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 2], [0, 0, 1, 0, 0, 1, 1, 2, 2, 3], [1, 1, 1, 0, 1, 0, 1, 1, 1, 2], [2, 2, 2, 1, 2, 1, 1, 0, 0, 1], [3, 2, 1, 0, 1, 2, 2, 1, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1\n1 1 1 1 1 0\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 0 1 1 1 1\n0 0 1 1 0 0\n", "answer": "4 3 2 1 0 1\n4 3 3 2 1 0\n3 2 3 3 2 1\n2 1 2 3 2 2\n1 0 1 2 1 1\n0 0 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 735, "matrix": [[1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [0, 0, 1, 1, 0, 0]], "solution": [[4, 3, 2, 1, 0, 1], [4, 3, 3, 2, 1, 0], [3, 2, 3, 3, 2, 1], [2, 1, 2, 3, 2, 2], [1, 0, 1, 2, 1, 1], [0, 0, 1, 1, 0, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 0\n1 1 0\n", "answer": "3 2 1\n2 1 0\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 736, "matrix": [[1, 1, 1], [1, 1, 0], [1, 1, 0]], "solution": [[3, 2, 1], [2, 1, 0], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0\n1 1 1 1 0\n1 1 0 0 1\n1 1 1 1 0\n1 1 1 1 1\n", "answer": "1 0 1 1 0\n2 1 1 1 0\n2 1 0 0 1\n3 2 1 1 0\n4 3 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 737, "matrix": [[1, 0, 1, 1, 0], [1, 1, 1, 1, 0], [1, 1, 0, 0, 1], [1, 1, 1, 1, 0], [1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 1, 0], [2, 1, 1, 1, 0], [2, 1, 0, 0, 1], [3, 2, 1, 1, 0], [4, 3, 2, 2, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1\n0 0 1 1 0 1\n1 0 1 0 0 1\n1 1 0 1 1 0\n1 1 1 1 1 1\n1 1 1 1 0 1\n", "answer": "0 1 2 2 1 2\n0 0 1 1 0 1\n1 0 1 0 0 1\n2 1 0 1 1 0\n3 2 1 2 1 1\n4 3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 738, "matrix": [[0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1], [1, 0, 1, 0, 0, 1], [1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1]], "solution": [[0, 1, 2, 2, 1, 2], [0, 0, 1, 1, 0, 1], [1, 0, 1, 0, 0, 1], [2, 1, 0, 1, 1, 0], [3, 2, 1, 2, 1, 1], [4, 3, 2, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0\n1 1 1 0 1 0\n0 1 1 0 1 1\n1 0 0 0 0 0\n1 0 1 1 1 1\n1 0 1 1 1 1\n", "answer": "2 3 2 1 0 0\n1 2 1 0 1 0\n0 1 1 0 1 1\n1 0 0 0 0 0\n1 0 1 1 1 1\n1 0 1 2 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 739, "matrix": [[1, 1, 1, 1, 0, 0], [1, 1, 1, 0, 1, 0], [0, 1, 1, 0, 1, 1], [1, 0, 0, 0, 0, 0], [1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1]], "solution": [[2, 3, 2, 1, 0, 0], [1, 2, 1, 0, 1, 0], [0, 1, 1, 0, 1, 1], [1, 0, 0, 0, 0, 0], [1, 0, 1, 1, 1, 1], [1, 0, 1, 2, 2, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 1 1 1\n0 1 1 1\n0 0 0 1\n", "answer": "2 3 3 4\n1 2 2 3\n0 1 1 2\n0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 740, "matrix": [[1, 1, 1, 1], [1, 1, 1, 1], [0, 1, 1, 1], [0, 0, 0, 1]], "solution": [[2, 3, 3, 4], [1, 2, 2, 3], [0, 1, 1, 2], [0, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1\n1 1 1 0 1 1\n1 0 1 1 1 0\n0 1 1 1 1 0\n1 1 1 1 1 0\n1 1 0 0 1 0\n", "answer": "3 2 1 0 1 2\n2 1 1 0 1 1\n1 0 1 1 1 0\n0 1 2 2 1 0\n1 2 1 1 1 0\n2 1 0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 741, "matrix": [[1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0]], "solution": [[3, 2, 1, 0, 1, 2], [2, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0], [0, 1, 2, 2, 1, 0], [1, 2, 1, 1, 1, 0], [2, 1, 0, 0, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 1 1\n1 0 1 1 1 1 1 1 1\n1 1 0 1 0 1 1 1 0\n1 0 1 1 1 1 1 1 0\n0 1 1 0 1 0 0 1 1\n0 0 0 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1\n", "answer": "1 0 1 2 3 4 5 5 4\n2 1 2 1 2 3 4 4 3\n2 1 1 0 1 2 3 3 2\n1 0 1 1 1 2 3 2 1\n2 1 0 1 0 1 2 1 0\n1 0 1 1 1 1 1 1 0\n0 1 1 0 1 0 0 1 1\n0 0 0 1 2 1 1 2 2\n1 1 1 2 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 742, "matrix": [[1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 0, 1, 0, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[1, 0, 1, 2, 3, 4, 5, 5, 4], [2, 1, 2, 1, 2, 3, 4, 4, 3], [2, 1, 1, 0, 1, 2, 3, 3, 2], [1, 0, 1, 1, 1, 2, 3, 2, 1], [2, 1, 0, 1, 0, 1, 2, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 0, 1, 0, 0, 1, 1], [0, 0, 0, 1, 2, 1, 1, 2, 2], [1, 1, 1, 2, 2, 1, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n0 1 0 1\n0 1 1 1\n1 1 1 1\n", "answer": "1 1 0 1\n0 1 0 1\n0 1 1 2\n1 2 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 743, "matrix": [[1, 1, 0, 1], [0, 1, 0, 1], [0, 1, 1, 1], [1, 1, 1, 1]], "solution": [[1, 1, 0, 1], [0, 1, 0, 1], [0, 1, 1, 2], [1, 2, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 1\n1 0 1 1 0 1 0 1\n1 1 1 0 1 0 0 1\n0 0 1 1 1 1 1 1\n1 0 1 1 1 1 0 1\n0 0 0 0 0 0 1 1\n1 1 1 1 1 1 1 1\n1 1 0 1 1 0 1 1\n", "answer": "1 0 1 2 1 2 1 2\n1 0 1 1 0 1 0 1\n1 1 1 0 1 0 0 1\n0 0 1 1 2 1 1 2\n1 0 1 1 1 1 0 1\n0 0 0 0 0 0 1 2\n1 1 1 1 1 1 2 3\n2 1 0 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 744, "matrix": [[1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 0, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1], [0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1]], "solution": [[1, 0, 1, 2, 1, 2, 1, 2], [1, 0, 1, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 0, 0, 1], [0, 0, 1, 1, 2, 1, 1, 2], [1, 0, 1, 1, 1, 1, 0, 1], [0, 0, 0, 0, 0, 0, 1, 2], [1, 1, 1, 1, 1, 1, 2, 3], [2, 1, 0, 1, 1, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1\n1 1 1 0 1 1 1\n0 1 0 0 1 1 1\n0 0 0 1 1 1 0\n1 1 1 1 1 1 1\n0 1 1 1 1 0 1\n1 1 1 1 0 1 0\n", "answer": "1 0 1 1 0 1 2\n1 1 1 0 1 2 2\n0 1 0 0 1 2 1\n0 0 0 1 2 1 0\n1 1 1 2 2 1 1\n0 1 2 2 1 0 1\n1 2 2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 745, "matrix": [[1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0]], "solution": [[1, 0, 1, 1, 0, 1, 2], [1, 1, 1, 0, 1, 2, 2], [0, 1, 0, 0, 1, 2, 1], [0, 0, 0, 1, 2, 1, 0], [1, 1, 1, 2, 2, 1, 1], [0, 1, 2, 2, 1, 0, 1], [1, 2, 2, 1, 0, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1 1 1\n1 1 1 1 1 0 0 1 1 0\n1 1 0 1 1 1 1 1 0 1\n1 0 0 0 1 0 1 1 1 0\n1 1 0 0 0 1 1 0 1 1\n0 1 1 1 0 1 0 1 1 0\n1 1 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 0 0 1 1 1 1 1 1 0\n1 0 1 1 1 1 1 1 1 0\n", "answer": "4 3 2 2 1 0 1 2 2 1\n3 2 1 2 1 0 0 1 1 0\n2 1 0 1 2 1 1 1 0 1\n1 0 0 0 1 0 1 1 1 0\n1 1 0 0 0 1 1 0 1 1\n0 1 1 1 0 1 0 1 1 0\n1 1 0 1 1 2 1 2 2 1\n2 1 1 2 2 3 2 3 2 1\n1 0 0 1 2 3 3 2 1 0\n1 0 1 2 3 4 3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 746, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 0, 0, 0, 1, 0, 1, 1, 1, 0], [1, 1, 0, 0, 0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[4, 3, 2, 2, 1, 0, 1, 2, 2, 1], [3, 2, 1, 2, 1, 0, 0, 1, 1, 0], [2, 1, 0, 1, 2, 1, 1, 1, 0, 1], [1, 0, 0, 0, 1, 0, 1, 1, 1, 0], [1, 1, 0, 0, 0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 2, 1, 2, 2, 1], [2, 1, 1, 2, 2, 3, 2, 3, 2, 1], [1, 0, 0, 1, 2, 3, 3, 2, 1, 0], [1, 0, 1, 2, 3, 4, 3, 2, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 0 1 1\n0 1 1 1 1 1 1 0 1 1\n1 1 1 0 1 1 1 0 1 1\n0 1 0 1 1 1 0 1 1 0\n0 0 1 1 1 1 1 0 0 0\n0 0 0 1 0 1 1 1 1 1\n1 0 1 0 1 1 1 1 1 0\n1 1 1 0 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 0 1\n0 1 1 1 1 1 1 1 1 1\n", "answer": "1 2 3 2 2 1 0 0 1 2\n0 1 2 1 2 2 1 0 1 2\n1 2 1 0 1 2 1 0 1 1\n0 1 0 1 2 1 0 1 1 0\n0 0 1 2 1 2 1 0 0 0\n0 0 0 1 0 1 2 1 1 1\n1 0 1 0 1 2 2 1 1 0\n2 1 1 0 1 2 1 0 1 1\n1 2 2 1 2 3 2 1 0 1\n0 1 2 2 3 4 3 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 747, "matrix": [[1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 1, 1, 0, 1, 1, 0], [0, 0, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 2, 3, 2, 2, 1, 0, 0, 1, 2], [0, 1, 2, 1, 2, 2, 1, 0, 1, 2], [1, 2, 1, 0, 1, 2, 1, 0, 1, 1], [0, 1, 0, 1, 2, 1, 0, 1, 1, 0], [0, 0, 1, 2, 1, 2, 1, 0, 0, 0], [0, 0, 0, 1, 0, 1, 2, 1, 1, 1], [1, 0, 1, 0, 1, 2, 2, 1, 1, 0], [2, 1, 1, 0, 1, 2, 1, 0, 1, 1], [1, 2, 2, 1, 2, 3, 2, 1, 0, 1], [0, 1, 2, 2, 3, 4, 3, 2, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1\n1 1 1 1 0 1 0\n0 1 0 1 1 1 1\n1 1 0 1 1 0 1\n1 0 0 0 1 1 1\n1 0 1 1 1 1 0\n0 1 0 1 1 1 1\n", "answer": "2 1 0 1 1 2 1\n1 2 1 1 0 1 0\n0 1 0 1 1 1 1\n1 1 0 1 1 0 1\n1 0 0 0 1 1 1\n1 0 1 1 2 1 0\n0 1 0 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 748, "matrix": [[1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 1, 2, 1], [1, 2, 1, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 1, 2, 1, 0], [0, 1, 0, 1, 2, 2, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0 1 1\n1 1 1 1 1 1\n1 1 0 0 1 1\n1 0 1 1 0 0\n1 0 1 1 1 0\n1 1 1 1 0 0\n", "answer": "0 0 1 0 1 2\n1 1 1 1 2 2\n2 1 0 0 1 1\n1 0 1 1 0 0\n1 0 1 2 1 0\n2 1 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 749, "matrix": [[0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1], [1, 0, 1, 1, 0, 0], [1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0]], "solution": [[0, 0, 1, 0, 1, 2], [1, 1, 1, 1, 2, 2], [2, 1, 0, 0, 1, 1], [1, 0, 1, 1, 0, 0], [1, 0, 1, 2, 1, 0], [2, 1, 2, 1, 0, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 0 1 1 1 1\n1 1 1 0 0 1 1 0 0\n1 1 1 1 1 1 1 1 1\n0 0 0 0 1 0 1 1 1\n0 1 1 1 1 1 1 1 1\n1 0 1 1 0 1 1 0 1\n1 1 1 1 0 0 1 0 1\n1 1 1 1 1 1 1 1 0\n1 0 0 1 1 0 1 1 0\n", "answer": "3 2 1 0 0 1 2 1 1\n2 2 1 0 0 1 1 0 0\n1 1 1 1 1 1 2 1 1\n0 0 0 0 1 0 1 2 2\n0 1 1 1 1 1 2 1 2\n1 0 1 1 0 1 1 0 1\n2 1 2 1 0 0 1 0 1\n2 1 1 2 1 1 2 1 0\n1 0 0 1 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 750, "matrix": [[1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 0, 1, 1, 0]], "solution": [[3, 2, 1, 0, 0, 1, 2, 1, 1], [2, 2, 1, 0, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 2, 1, 1], [0, 0, 0, 0, 1, 0, 1, 2, 2], [0, 1, 1, 1, 1, 1, 2, 1, 2], [1, 0, 1, 1, 0, 1, 1, 0, 1], [2, 1, 2, 1, 0, 0, 1, 0, 1], [2, 1, 1, 2, 1, 1, 2, 1, 0], [1, 0, 0, 1, 1, 0, 1, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 0 1 1\n1 0 0 1 1 0 0\n1 1 1 0 0 0 1\n1 1 1 1 1 1 1\n1 1 1 1 1 0 1\n1 1 1 1 1 1 1\n1 1 1 1 0 1 1\n", "answer": "1 0 1 0 0 1 1\n1 0 0 1 1 0 0\n2 1 1 0 0 0 1\n3 2 2 1 1 1 2\n4 3 3 2 1 0 1\n5 4 3 2 1 1 2\n4 3 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 751, "matrix": [[1, 0, 1, 0, 0, 1, 1], [1, 0, 0, 1, 1, 0, 0], [1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1]], "solution": [[1, 0, 1, 0, 0, 1, 1], [1, 0, 0, 1, 1, 0, 0], [2, 1, 1, 0, 0, 0, 1], [3, 2, 2, 1, 1, 1, 2], [4, 3, 3, 2, 1, 0, 1], [5, 4, 3, 2, 1, 1, 2], [4, 3, 2, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 0\n1 0 0 0 1 1 1\n1 1 1 1 1 0 1\n1 1 0 1 1 0 0\n0 1 0 1 0 1 1\n1 0 1 0 1 1 1\n1 1 0 0 1 1 1\n", "answer": "2 1 1 0 1 0 0\n1 0 0 0 1 1 1\n2 1 1 1 1 0 1\n1 1 0 1 1 0 0\n0 1 0 1 0 1 1\n1 0 1 0 1 2 2\n2 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 752, "matrix": [[1, 1, 1, 0, 1, 0, 0], [1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1]], "solution": [[2, 1, 1, 0, 1, 0, 0], [1, 0, 0, 0, 1, 1, 1], [2, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1, 1], [1, 0, 1, 0, 1, 2, 2], [2, 1, 0, 0, 1, 2, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 1 1 0 1\n1 1 0 1 1 1 0 1 1\n0 1 1 1 0 1 1 1 1\n1 0 1 1 0 1 1 0 1\n1 1 1 1 0 1 0 1 1\n1 1 1 1 1 0 1 0 1\n1 1 0 0 1 0 0 1 1\n0 1 1 1 1 1 0 1 0\n1 1 1 1 1 1 1 1 1\n", "answer": "1 0 0 1 2 2 1 0 1\n1 1 0 1 1 1 0 1 2\n0 1 1 1 0 1 1 1 2\n1 0 1 1 0 1 1 0 1\n2 1 2 1 0 1 0 1 2\n2 2 1 1 1 0 1 0 1\n1 1 0 0 1 0 0 1 1\n0 1 1 1 2 1 0 1 0\n1 2 2 2 3 2 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 753, "matrix": [[1, 0, 0, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 0, 0, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 0, 1, 2, 2, 1, 0, 1], [1, 1, 0, 1, 1, 1, 0, 1, 2], [0, 1, 1, 1, 0, 1, 1, 1, 2], [1, 0, 1, 1, 0, 1, 1, 0, 1], [2, 1, 2, 1, 0, 1, 0, 1, 2], [2, 2, 1, 1, 1, 0, 1, 0, 1], [1, 1, 0, 0, 1, 0, 0, 1, 1], [0, 1, 1, 1, 2, 1, 0, 1, 0], [1, 2, 2, 2, 3, 2, 1, 2, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1 1 0\n1 0 0 1 0 1 0 1 1 1\n1 0 1 1 1 1 1 1 1 0\n1 1 0 1 1 1 1 0 1 1\n0 1 1 1 1 1 0 1 1 0\n1 1 1 0 1 1 0 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 1 1\n1 1 0 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 0 1 1\n", "answer": "2 1 1 2 1 0 1 2 1 0\n1 0 0 1 0 1 0 1 2 1\n1 0 1 2 1 2 1 1 1 0\n1 1 0 1 2 2 1 0 1 1\n0 1 1 1 2 1 0 1 1 0\n1 2 1 0 1 1 0 1 2 1\n2 3 2 1 2 1 1 2 3 2\n3 2 1 2 1 0 1 2 3 3\n2 1 0 1 2 1 2 1 2 3\n3 2 1 0 1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 754, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1]], "solution": [[2, 1, 1, 2, 1, 0, 1, 2, 1, 0], [1, 0, 0, 1, 0, 1, 0, 1, 2, 1], [1, 0, 1, 2, 1, 2, 1, 1, 1, 0], [1, 1, 0, 1, 2, 2, 1, 0, 1, 1], [0, 1, 1, 1, 2, 1, 0, 1, 1, 0], [1, 2, 1, 0, 1, 1, 0, 1, 2, 1], [2, 3, 2, 1, 2, 1, 1, 2, 3, 2], [3, 2, 1, 2, 1, 0, 1, 2, 3, 3], [2, 1, 0, 1, 2, 1, 2, 1, 2, 3], [3, 2, 1, 0, 1, 2, 1, 0, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 1 1 1 1\n0 1 0 0 1 1 1 1 0\n0 1 0 1 0 1 0 1 1\n1 1 1 1 0 0 1 0 1\n1 1 1 1 0 1 0 1 1\n0 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 0\n1 1 1 0 0 1 1 1 0\n", "answer": "0 0 1 1 0 1 2 2 1\n0 1 0 0 1 2 1 1 0\n0 1 0 1 0 1 0 1 1\n1 2 1 1 0 0 1 0 1\n1 2 2 1 0 1 0 1 2\n0 1 2 2 1 1 0 1 2\n1 2 1 2 2 2 1 2 1\n2 1 0 1 1 2 2 1 0\n3 2 1 0 0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 755, "matrix": [[0, 0, 1, 1, 0, 1, 1, 1, 1], [0, 1, 0, 0, 1, 1, 1, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 1, 1, 1, 0]], "solution": [[0, 0, 1, 1, 0, 1, 2, 2, 1], [0, 1, 0, 0, 1, 2, 1, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1, 1], [1, 2, 1, 1, 0, 0, 1, 0, 1], [1, 2, 2, 1, 0, 1, 0, 1, 2], [0, 1, 2, 2, 1, 1, 0, 1, 2], [1, 2, 1, 2, 2, 2, 1, 2, 1], [2, 1, 0, 1, 1, 2, 2, 1, 0], [3, 2, 1, 0, 0, 1, 2, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 0 1 1 1\n1 1 0 1 1 0 0 1 1\n1 1 1 1 1 1 1 1 1\n1 1 0 1 0 0 1 1 1\n1 1 0 1 1 1 1 1 1\n0 1 1 1 1 1 0 1 1\n1 1 0 1 0 0 1 1 1\n1 1 1 1 1 1 1 0 0\n1 0 0 1 1 1 1 1 1\n", "answer": "2 1 0 1 0 0 1 2 3\n2 1 0 1 1 0 0 1 2\n3 2 1 2 1 1 1 2 3\n2 1 0 1 0 0 1 2 3\n1 1 0 1 1 1 1 2 3\n0 1 1 2 1 1 0 1 2\n1 1 0 1 0 0 1 1 1\n2 1 1 2 1 1 1 0 0\n1 0 0 1 2 2 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 756, "matrix": [[1, 1, 0, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 0, 0, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 0, 0, 1, 2, 3], [2, 1, 0, 1, 1, 0, 0, 1, 2], [3, 2, 1, 2, 1, 1, 1, 2, 3], [2, 1, 0, 1, 0, 0, 1, 2, 3], [1, 1, 0, 1, 1, 1, 1, 2, 3], [0, 1, 1, 2, 1, 1, 0, 1, 2], [1, 1, 0, 1, 0, 0, 1, 1, 1], [2, 1, 1, 2, 1, 1, 1, 0, 0], [1, 0, 0, 1, 2, 2, 2, 1, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0\n0 0 1 0 1 0\n1 0 0 1 1 0\n0 1 0 1 1 1\n1 1 1 1 1 0\n1 1 1 1 1 1\n", "answer": "1 1 2 1 0 0\n0 0 1 0 1 0\n1 0 0 1 1 0\n0 1 0 1 2 1\n1 2 1 2 1 0\n2 3 2 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 757, "matrix": [[1, 1, 1, 1, 0, 0], [0, 0, 1, 0, 1, 0], [1, 0, 0, 1, 1, 0], [0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1]], "solution": [[1, 1, 2, 1, 0, 0], [0, 0, 1, 0, 1, 0], [1, 0, 0, 1, 1, 0], [0, 1, 0, 1, 2, 1], [1, 2, 1, 2, 1, 0], [2, 3, 2, 3, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1 0 1 1\n1 0 1 0 0 1 1 0 1 1\n1 1 1 1 1 1 1 1 1 1\n0 1 0 1 0 1 1 1 1 0\n1 1 1 1 0 1 1 0 0 1\n1 1 1 0 0 1 0 1 0 1\n1 1 0 0 1 1 0 1 1 1\n1 0 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 1 1\n", "answer": "2 1 0 0 1 2 1 0 1 2\n1 0 1 0 0 1 1 0 1 2\n1 1 1 1 1 2 2 1 2 1\n0 1 0 1 0 1 2 1 1 0\n1 2 1 1 0 1 1 0 0 1\n2 2 1 0 0 1 0 1 0 1\n2 1 0 0 1 1 0 1 1 2\n1 0 1 1 2 2 1 2 2 3\n2 1 1 2 3 3 2 3 3 4\n2 1 0 1 2 3 3 4 4 5", "metadata": {"source_dataset": "binary_matrix", "source_index": 758, "matrix": [[1, 1, 0, 0, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 0, 0, 1, 0, 1, 0, 1], [1, 1, 0, 0, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 0, 1, 2, 1, 0, 1, 2], [1, 0, 1, 0, 0, 1, 1, 0, 1, 2], [1, 1, 1, 1, 1, 2, 2, 1, 2, 1], [0, 1, 0, 1, 0, 1, 2, 1, 1, 0], [1, 2, 1, 1, 0, 1, 1, 0, 0, 1], [2, 2, 1, 0, 0, 1, 0, 1, 0, 1], [2, 1, 0, 0, 1, 1, 0, 1, 1, 2], [1, 0, 1, 1, 2, 2, 1, 2, 2, 3], [2, 1, 1, 2, 3, 3, 2, 3, 3, 4], [2, 1, 0, 1, 2, 3, 3, 4, 4, 5]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0 1\n1 1 0 0\n1 1 1 1\n1 0 1 1\n", "answer": "0 0 0 1\n1 1 0 0\n2 1 1 1\n1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 759, "matrix": [[0, 0, 0, 1], [1, 1, 0, 0], [1, 1, 1, 1], [1, 0, 1, 1]], "solution": [[0, 0, 0, 1], [1, 1, 0, 0], [2, 1, 1, 1], [1, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1\n1 1 1 1 1\n1 1 0 1 1\n1 1 0 1 1\n1 1 1 1 1\n", "answer": "1 0 1 0 1\n2 1 1 1 2\n2 1 0 1 2\n2 1 0 1 2\n3 2 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 760, "matrix": [[1, 0, 1, 0, 1], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 0, 1], [2, 1, 1, 1, 2], [2, 1, 0, 1, 2], [2, 1, 0, 1, 2], [3, 2, 1, 2, 3]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0\n0 1 1 0\n1 1 0 0\n1 1 1 1\n", "answer": "1 1 0 0\n0 1 1 0\n1 1 0 0\n2 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 761, "matrix": [[1, 1, 0, 0], [0, 1, 1, 0], [1, 1, 0, 0], [1, 1, 1, 1]], "solution": [[1, 1, 0, 0], [0, 1, 1, 0], [1, 1, 0, 0], [2, 2, 1, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 1 1 0 1\n1 1 1 1 1 1 1 1 1 1\n1 0 1 0 1 1 0 1 1 0\n1 1 1 1 1 0 1 0 1 1\n1 1 1 0 1 1 1 0 1 1\n1 1 0 1 0 1 0 1 1 1\n1 1 1 1 1 0 1 1 1 1\n1 1 1 0 0 1 0 1 1 0\n1 0 0 1 1 1 0 1 1 1\n0 1 1 1 1 0 0 1 0 1\n", "answer": "0 0 1 2 3 3 2 1 0 1\n1 1 2 1 2 2 1 2 1 1\n1 0 1 0 1 1 0 1 1 0\n2 1 2 1 1 0 1 0 1 1\n3 2 1 0 1 1 1 0 1 2\n2 1 0 1 0 1 0 1 2 2\n3 2 1 1 1 0 1 2 2 1\n2 1 1 0 0 1 0 1 1 0\n1 0 0 1 1 1 0 1 1 1\n0 1 1 2 1 0 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 762, "matrix": [[0, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 0, 1, 0, 1]], "solution": [[0, 0, 1, 2, 3, 3, 2, 1, 0, 1], [1, 1, 2, 1, 2, 2, 1, 2, 1, 1], [1, 0, 1, 0, 1, 1, 0, 1, 1, 0], [2, 1, 2, 1, 1, 0, 1, 0, 1, 1], [3, 2, 1, 0, 1, 1, 1, 0, 1, 2], [2, 1, 0, 1, 0, 1, 0, 1, 2, 2], [3, 2, 1, 1, 1, 0, 1, 2, 2, 1], [2, 1, 1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 2, 1, 0, 0, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 1 1 0\n1 1 1 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 0 1 1\n0 0 1 1 1 1 0 1 0 1\n0 1 1 0 0 1 1 0 0 1\n0 1 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 0 1 1\n1 1 1 0 1 1 0 0 1 1\n1 1 1 0 0 1 1 1 0 1\n0 0 1 0 1 0 1 1 1 1\n", "answer": "1 0 1 2 1 2 3 2 1 0\n2 1 2 1 0 1 2 1 2 1\n1 1 2 2 1 2 1 0 1 2\n0 0 1 1 1 1 0 1 0 1\n0 1 1 0 0 1 1 0 0 1\n0 1 2 1 1 2 2 1 1 2\n1 2 1 0 1 2 1 0 1 2\n2 2 1 0 1 1 0 0 1 2\n1 1 1 0 0 1 1 1 0 1\n0 0 1 0 1 0 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 763, "matrix": [[1, 0, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 0, 1, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 0, 0, 1, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 0, 1, 1, 1, 1]], "solution": [[1, 0, 1, 2, 1, 2, 3, 2, 1, 0], [2, 1, 2, 1, 0, 1, 2, 1, 2, 1], [1, 1, 2, 2, 1, 2, 1, 0, 1, 2], [0, 0, 1, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 0, 0, 1, 1, 0, 0, 1], [0, 1, 2, 1, 1, 2, 2, 1, 1, 2], [1, 2, 1, 0, 1, 2, 1, 0, 1, 2], [2, 2, 1, 0, 1, 1, 0, 0, 1, 2], [1, 1, 1, 0, 0, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 0, 1, 2, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1 0 1 1\n1 1 1 1 0 1 1 0 1 1\n1 0 0 1 0 1 1 0 1 1\n1 0 1 0 1 1 0 0 1 1\n1 0 1 0 1 1 1 0 0 1\n0 1 1 0 0 1 1 0 1 1\n1 1 1 1 1 1 0 1 1 1\n0 1 0 1 1 1 1 0 1 1\n1 1 1 1 0 1 1 1 0 1\n1 1 1 1 1 0 1 0 1 0\n", "answer": "1 0 1 1 0 1 1 0 1 2\n2 1 1 1 0 1 1 0 1 2\n1 0 0 1 0 1 1 0 1 2\n1 0 1 0 1 1 0 0 1 2\n1 0 1 0 1 2 1 0 0 1\n0 1 1 0 0 1 1 0 1 2\n1 2 1 1 1 1 0 1 2 3\n0 1 0 1 1 2 1 0 1 2\n1 2 1 1 0 1 2 1 0 1\n2 3 2 2 1 0 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 764, "matrix": [[1, 0, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 0, 0, 1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 0, 0, 1], [0, 1, 1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1, 0]], "solution": [[1, 0, 1, 1, 0, 1, 1, 0, 1, 2], [2, 1, 1, 1, 0, 1, 1, 0, 1, 2], [1, 0, 0, 1, 0, 1, 1, 0, 1, 2], [1, 0, 1, 0, 1, 1, 0, 0, 1, 2], [1, 0, 1, 0, 1, 2, 1, 0, 0, 1], [0, 1, 1, 0, 0, 1, 1, 0, 1, 2], [1, 2, 1, 1, 1, 1, 0, 1, 2, 3], [0, 1, 0, 1, 1, 2, 1, 0, 1, 2], [1, 2, 1, 1, 0, 1, 2, 1, 0, 1], [2, 3, 2, 2, 1, 0, 1, 0, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 0 1 1\n1 1 1 1 1 1 0 1\n1 1 1 1 1 0 1 1\n1 1 1 1 0 0 1 1\n1 1 0 1 1 0 1 1\n1 1 1 1 1 0 1 1\n1 1 0 1 1 0 1 1\n1 1 1 0 1 0 1 1\n", "answer": "2 1 0 0 1 0 1 2\n3 2 1 1 2 1 0 1\n4 3 2 2 1 0 1 2\n3 2 1 1 0 0 1 2\n2 1 0 1 1 0 1 2\n3 2 1 2 1 0 1 2\n2 1 0 1 1 0 1 2\n3 2 1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 765, "matrix": [[1, 1, 0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1]], "solution": [[2, 1, 0, 0, 1, 0, 1, 2], [3, 2, 1, 1, 2, 1, 0, 1], [4, 3, 2, 2, 1, 0, 1, 2], [3, 2, 1, 1, 0, 0, 1, 2], [2, 1, 0, 1, 1, 0, 1, 2], [3, 2, 1, 2, 1, 0, 1, 2], [2, 1, 0, 1, 1, 0, 1, 2], [3, 2, 1, 0, 1, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 1 1\n1 1 1 1 1 0 1 1\n1 0 0 1 0 1 1 1\n0 1 1 0 0 1 1 1\n1 1 0 1 1 1 0 1\n1 0 1 1 1 1 1 1\n0 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1\n", "answer": "0 1 2 2 1 0 1 2\n1 1 1 2 1 0 1 2\n1 0 0 1 0 1 2 3\n0 1 1 0 0 1 1 2\n1 1 0 1 1 1 0 1\n1 0 1 2 2 2 1 2\n0 1 2 3 3 3 2 3\n1 0 1 2 3 4 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 766, "matrix": [[0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 0, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 2, 2, 1, 0, 1, 2], [1, 1, 1, 2, 1, 0, 1, 2], [1, 0, 0, 1, 0, 1, 2, 3], [0, 1, 1, 0, 0, 1, 1, 2], [1, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 2, 2, 2, 1, 2], [0, 1, 2, 3, 3, 3, 2, 3], [1, 0, 1, 2, 3, 4, 3, 4]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 0\n1 1 0\n", "answer": "3 2 1\n2 1 0\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 767, "matrix": [[1, 1, 1], [1, 1, 0], [1, 1, 0]], "solution": [[3, 2, 1], [2, 1, 0], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 0 1 1\n1 1 1 1 1 1 1 1 1 1\n1 0 0 0 1 1 1 1 1 0\n1 0 1 1 0 0 1 0 1 1\n1 1 1 1 1 0 1 0 1 0\n1 0 1 1 1 0 1 1 1 1\n1 1 1 0 1 1 1 1 1 1\n1 1 1 1 0 1 0 1 1 0\n1 1 1 1 0 0 1 1 1 1\n1 0 1 0 1 1 1 1 1 1\n", "answer": "3 2 2 1 0 1 1 0 1 2\n2 1 1 1 1 2 2 1 2 1\n1 0 0 0 1 1 2 1 1 0\n1 0 1 1 0 0 1 0 1 1\n2 1 2 2 1 0 1 0 1 0\n1 0 1 1 1 0 1 1 2 1\n2 1 1 0 1 1 1 2 2 1\n3 2 2 1 0 1 0 1 1 0\n2 1 2 1 0 0 1 2 2 1\n1 0 1 0 1 1 2 3 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 768, "matrix": [[1, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1, 1]], "solution": [[3, 2, 2, 1, 0, 1, 1, 0, 1, 2], [2, 1, 1, 1, 1, 2, 2, 1, 2, 1], [1, 0, 0, 0, 1, 1, 2, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 0, 1, 1], [2, 1, 2, 2, 1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1, 2, 1], [2, 1, 1, 0, 1, 1, 1, 2, 2, 1], [3, 2, 2, 1, 0, 1, 0, 1, 1, 0], [2, 1, 2, 1, 0, 0, 1, 2, 2, 1], [1, 0, 1, 0, 1, 1, 2, 3, 3, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 1 1 0\n1 1 1 1\n0 0 0 1\n", "answer": "3 2 1 0\n2 2 1 0\n1 1 1 1\n0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 769, "matrix": [[1, 1, 1, 0], [1, 1, 1, 0], [1, 1, 1, 1], [0, 0, 0, 1]], "solution": [[3, 2, 1, 0], [2, 2, 1, 0], [1, 1, 1, 1], [0, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 0\n1 1 1\n", "answer": "3 2 1\n2 1 0\n3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 770, "matrix": [[1, 1, 1], [1, 1, 0], [1, 1, 1]], "solution": [[3, 2, 1], [2, 1, 0], [3, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n1 1 0 1 1\n1 0 1 0 1\n1 0 1 0 0\n1 1 1 1 0\n", "answer": "3 2 1 2 3\n2 1 0 1 2\n1 0 1 0 1\n1 0 1 0 0\n2 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 771, "matrix": [[1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 0, 1, 0, 1], [1, 0, 1, 0, 0], [1, 1, 1, 1, 0]], "solution": [[3, 2, 1, 2, 3], [2, 1, 0, 1, 2], [1, 0, 1, 0, 1], [1, 0, 1, 0, 0], [2, 1, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n0 1 1 0 1\n1 0 1 1 1\n1 1 1 0 1\n0 0 1 0 1\n", "answer": "1 2 2 1 2\n0 1 1 0 1\n1 0 1 1 2\n1 1 1 0 1\n0 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 772, "matrix": [[1, 1, 1, 1, 1], [0, 1, 1, 0, 1], [1, 0, 1, 1, 1], [1, 1, 1, 0, 1], [0, 0, 1, 0, 1]], "solution": [[1, 2, 2, 1, 2], [0, 1, 1, 0, 1], [1, 0, 1, 1, 2], [1, 1, 1, 0, 1], [0, 0, 1, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 0\n1 1 0\n", "answer": "0 1 1\n1 1 0\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 773, "matrix": [[0, 1, 1], [1, 1, 0], [1, 1, 0]], "solution": [[0, 1, 1], [1, 1, 0], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1\n1 1 1 1 1\n1 1 1 1 0\n0 1 1 1 1\n1 0 1 1 0\n", "answer": "0 1 2 3 2\n1 2 3 2 1\n1 2 2 1 0\n0 1 2 2 1\n1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 774, "matrix": [[0, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0], [0, 1, 1, 1, 1], [1, 0, 1, 1, 0]], "solution": [[0, 1, 2, 3, 2], [1, 2, 3, 2, 1], [1, 2, 2, 1, 0], [0, 1, 2, 2, 1], [1, 0, 1, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0\n0 0 0 1 1\n1 1 1 1 1\n1 0 0 0 0\n1 1 0 0 1\n", "answer": "0 1 1 1 0\n0 0 0 1 1\n1 1 1 1 1\n1 0 0 0 0\n2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 775, "matrix": [[0, 1, 1, 1, 0], [0, 0, 0, 1, 1], [1, 1, 1, 1, 1], [1, 0, 0, 0, 0], [1, 1, 0, 0, 1]], "solution": [[0, 1, 1, 1, 0], [0, 0, 0, 1, 1], [1, 1, 1, 1, 1], [1, 0, 0, 0, 0], [2, 1, 0, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 0 1\n1 1 1 0 1 1 1 1 1 1\n1 1 1 0 0 0 1 0 1 1\n1 1 0 1 1 1 0 1 1 1\n1 1 0 1 1 0 1 1 1 1\n1 0 0 1 1 0 1 0 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 0 1 0\n1 1 1 1 1 1 1 0 1 1\n", "answer": "5 4 3 2 3 3 3 2 1 2\n4 3 2 1 2 2 2 1 0 1\n3 2 1 0 1 1 2 1 1 2\n3 2 1 0 0 0 1 0 1 2\n2 1 0 1 1 1 0 1 2 3\n2 1 0 1 1 0 1 1 2 3\n1 0 0 1 1 0 1 0 1 2\n2 1 1 2 2 1 2 1 2 1\n3 2 2 2 1 0 1 0 1 0\n4 3 3 3 2 1 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 776, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[5, 4, 3, 2, 3, 3, 3, 2, 1, 2], [4, 3, 2, 1, 2, 2, 2, 1, 0, 1], [3, 2, 1, 0, 1, 1, 2, 1, 1, 2], [3, 2, 1, 0, 0, 0, 1, 0, 1, 2], [2, 1, 0, 1, 1, 1, 0, 1, 2, 3], [2, 1, 0, 1, 1, 0, 1, 1, 2, 3], [1, 0, 0, 1, 1, 0, 1, 0, 1, 2], [2, 1, 1, 2, 2, 1, 2, 1, 2, 1], [3, 2, 2, 2, 1, 0, 1, 0, 1, 0], [4, 3, 3, 3, 2, 1, 1, 0, 1, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 1 1\n1 1 1 1 0 0 0 1\n1 1 1 1 1 1 1 1\n0 1 1 1 1 0 0 0\n1 0 1 0 1 0 0 1\n0 1 1 0 0 0 1 1\n1 1 1 1 0 1 1 1\n1 1 0 1 0 1 0 1\n", "answer": "0 1 2 2 1 0 1 2\n1 2 2 1 0 0 0 1\n1 2 3 2 1 1 1 1\n0 1 2 1 1 0 0 0\n1 0 1 0 1 0 0 1\n0 1 1 0 0 0 1 2\n1 2 1 1 0 1 1 2\n2 1 0 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 777, "matrix": [[0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 0, 0], [1, 0, 1, 0, 1, 0, 0, 1], [0, 1, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 1, 0, 1]], "solution": [[0, 1, 2, 2, 1, 0, 1, 2], [1, 2, 2, 1, 0, 0, 0, 1], [1, 2, 3, 2, 1, 1, 1, 1], [0, 1, 2, 1, 1, 0, 0, 0], [1, 0, 1, 0, 1, 0, 0, 1], [0, 1, 1, 0, 0, 0, 1, 2], [1, 2, 1, 1, 0, 1, 1, 2], [2, 1, 0, 1, 0, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 0\n1 0 0 1 1 1\n1 1 1 1 0 1\n0 1 1 1 1 1\n1 1 1 1 0 0\n1 0 1 1 1 1\n", "answer": "0 1 1 1 0 0\n1 0 0 1 1 1\n1 1 1 1 0 1\n0 1 2 2 1 1\n1 1 2 1 0 0\n1 0 1 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 778, "matrix": [[0, 1, 1, 1, 0, 0], [1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1]], "solution": [[0, 1, 1, 1, 0, 0], [1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1], [0, 1, 2, 2, 1, 1], [1, 1, 2, 1, 0, 0], [1, 0, 1, 2, 1, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1 1\n1 1 1 0 1 0 1 0 1 1\n1 0 1 0 1 0 1 1 1 1\n1 1 1 1 0 1 1 1 0 0\n0 0 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 0 1\n0 0 1 1 1 1 1 1 1 1\n1 0 1 1 1 0 0 1 1 1\n1 1 1 1 0 1 1 1 1 1\n0 0 1 1 1 0 1 1 1 1\n", "answer": "3 2 2 1 2 1 2 1 2 3\n2 1 1 0 1 0 1 0 1 2\n1 0 1 0 1 0 1 1 1 1\n1 1 2 1 0 1 2 1 0 0\n0 0 1 2 1 2 3 2 1 1\n1 1 2 3 2 2 2 1 0 1\n0 0 1 2 2 1 1 2 1 2\n1 0 1 2 1 0 0 1 2 3\n1 1 2 1 0 1 1 2 3 4\n0 0 1 2 1 0 1 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 779, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 1, 1, 1, 1]], "solution": [[3, 2, 2, 1, 2, 1, 2, 1, 2, 3], [2, 1, 1, 0, 1, 0, 1, 0, 1, 2], [1, 0, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 2, 1, 0, 1, 2, 1, 0, 0], [0, 0, 1, 2, 1, 2, 3, 2, 1, 1], [1, 1, 2, 3, 2, 2, 2, 1, 0, 1], [0, 0, 1, 2, 2, 1, 1, 2, 1, 2], [1, 0, 1, 2, 1, 0, 0, 1, 2, 3], [1, 1, 2, 1, 0, 1, 1, 2, 3, 4], [0, 0, 1, 2, 1, 0, 1, 2, 3, 4]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 1 1 1\n1 1 0 1\n1 1 0 0\n", "answer": "3 2 1 0\n3 2 1 1\n2 1 0 1\n2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 780, "matrix": [[1, 1, 1, 0], [1, 1, 1, 1], [1, 1, 0, 1], [1, 1, 0, 0]], "solution": [[3, 2, 1, 0], [3, 2, 1, 1], [2, 1, 0, 1], [2, 1, 0, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 0 1\n0 0 1 1 1 1 0 1\n0 0 0 1 0 1 1 1\n1 1 1 0 0 1 0 1\n1 1 1 1 1 0 1 1\n0 1 1 0 1 0 1 0\n1 1 1 1 1 0 0 0\n1 1 1 1 0 1 1 1\n", "answer": "1 1 0 1 2 1 0 1\n0 0 1 2 1 1 0 1\n0 0 0 1 0 1 1 2\n1 1 1 0 0 1 0 1\n1 2 2 1 1 0 1 1\n0 1 1 0 1 0 1 0\n1 2 2 1 1 0 0 0\n2 3 2 1 0 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 781, "matrix": [[1, 1, 0, 1, 1, 1, 0, 1], [0, 0, 1, 1, 1, 1, 0, 1], [0, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 0, 1, 0, 1, 0], [1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 0, 1, 1, 1]], "solution": [[1, 1, 0, 1, 2, 1, 0, 1], [0, 0, 1, 2, 1, 1, 0, 1], [0, 0, 0, 1, 0, 1, 1, 2], [1, 1, 1, 0, 0, 1, 0, 1], [1, 2, 2, 1, 1, 0, 1, 1], [0, 1, 1, 0, 1, 0, 1, 0], [1, 2, 2, 1, 1, 0, 0, 0], [2, 3, 2, 1, 0, 1, 1, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1\n1 1 0 0 0\n1 1 0 1 0\n1 1 1 1 1\n0 1 1 1 0\n", "answer": "0 1 0 1 1\n1 1 0 0 0\n2 1 0 1 0\n1 2 1 2 1\n0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 782, "matrix": [[0, 1, 0, 1, 1], [1, 1, 0, 0, 0], [1, 1, 0, 1, 0], [1, 1, 1, 1, 1], [0, 1, 1, 1, 0]], "solution": [[0, 1, 0, 1, 1], [1, 1, 0, 0, 0], [2, 1, 0, 1, 0], [1, 2, 1, 2, 1], [0, 1, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 1\n1 0 1 1 1 0 0\n1 1 1 1 1 1 1\n1 1 1 1 1 1 1\n1 1 0 0 1 0 0\n1 1 1 1 0 1 1\n1 1 0 1 1 1 1\n", "answer": "2 1 1 0 1 0 1\n1 0 1 1 1 0 0\n2 1 2 2 2 1 1\n3 2 1 1 2 1 1\n2 1 0 0 1 0 0\n3 2 1 1 0 1 1\n2 1 0 1 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 783, "matrix": [[1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 0, 0], [1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1]], "solution": [[2, 1, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 0], [2, 1, 2, 2, 2, 1, 1], [3, 2, 1, 1, 2, 1, 1], [2, 1, 0, 0, 1, 0, 0], [3, 2, 1, 1, 0, 1, 1], [2, 1, 0, 1, 1, 2, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 1\n1 1 0 1 1 0 0\n0 0 0 1 1 0 1\n0 0 1 1 0 0 1\n1 1 1 1 1 1 1\n0 1 1 0 0 1 1\n0 1 0 1 1 1 1\n", "answer": "0 1 1 2 1 0 1\n1 1 0 1 1 0 0\n0 0 0 1 1 0 1\n0 0 1 1 0 0 1\n1 1 2 1 1 1 2\n0 1 1 0 0 1 2\n0 1 0 1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 784, "matrix": [[0, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 0], [0, 0, 0, 1, 1, 0, 1], [0, 0, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 1], [0, 1, 0, 1, 1, 1, 1]], "solution": [[0, 1, 1, 2, 1, 0, 1], [1, 1, 0, 1, 1, 0, 0], [0, 0, 0, 1, 1, 0, 1], [0, 0, 1, 1, 0, 0, 1], [1, 1, 2, 1, 1, 1, 2], [0, 1, 1, 0, 0, 1, 2], [0, 1, 0, 1, 1, 2, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 0 1 0 0 1\n1 1 1 0 1 1 1 1\n1 0 1 1 1 0 1 1\n0 1 1 0 0 0 1 1\n1 1 1 1 0 0 1 0\n1 1 1 0 0 0 1 1\n1 1 0 1 1 1 0 1\n1 0 1 1 0 0 1 1\n", "answer": "1 0 0 0 1 0 0 1\n2 1 1 0 1 1 1 2\n1 0 1 1 1 0 1 2\n0 1 1 0 0 0 1 1\n1 2 2 1 0 0 1 0\n2 2 1 0 0 0 1 1\n2 1 0 1 1 1 0 1\n1 0 1 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 785, "matrix": [[1, 0, 0, 0, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0], [1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1, 1]], "solution": [[1, 0, 0, 0, 1, 0, 0, 1], [2, 1, 1, 0, 1, 1, 1, 2], [1, 0, 1, 1, 1, 0, 1, 2], [0, 1, 1, 0, 0, 0, 1, 1], [1, 2, 2, 1, 0, 0, 1, 0], [2, 2, 1, 0, 0, 0, 1, 1], [2, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 1 1 1 1\n0 1 1 0 0 0\n1 1 0 0 1 1\n0 1 0 1 0 1\n0 1 0 0 1 1\n", "answer": "2 3 3 2 2 2\n1 2 2 1 1 1\n0 1 1 0 0 0\n1 1 0 0 1 1\n0 1 0 1 0 1\n0 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 786, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 0, 0], [1, 1, 0, 0, 1, 1], [0, 1, 0, 1, 0, 1], [0, 1, 0, 0, 1, 1]], "solution": [[2, 3, 3, 2, 2, 2], [1, 2, 2, 1, 1, 1], [0, 1, 1, 0, 0, 0], [1, 1, 0, 0, 1, 1], [0, 1, 0, 1, 0, 1], [0, 1, 0, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1\n1 0 0 1 1 1\n0 1 1 1 1 0\n1 1 1 1 1 1\n1 0 1 0 1 1\n1 1 1 1 1 0\n", "answer": "0 1 1 2 3 2\n1 0 0 1 2 1\n0 1 1 2 1 0\n1 1 2 1 2 1\n1 0 1 0 1 1\n2 1 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 787, "matrix": [[0, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 1, 2, 3, 2], [1, 0, 0, 1, 2, 1], [0, 1, 1, 2, 1, 0], [1, 1, 2, 1, 2, 1], [1, 0, 1, 0, 1, 1], [2, 1, 2, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0\n1 0 1 1\n1 1 0 0\n1 1 1 1\n", "answer": "1 0 1 0\n1 0 1 1\n2 1 0 0\n3 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 788, "matrix": [[1, 0, 1, 0], [1, 0, 1, 1], [1, 1, 0, 0], [1, 1, 1, 1]], "solution": [[1, 0, 1, 0], [1, 0, 1, 1], [2, 1, 0, 0], [3, 2, 1, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0\n1 1 1 1 1\n1 0 1 0 1\n0 0 1 1 1\n1 1 0 1 0\n", "answer": "1 0 1 1 0\n2 1 2 1 1\n1 0 1 0 1\n0 0 1 1 1\n1 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 789, "matrix": [[1, 0, 1, 1, 0], [1, 1, 1, 1, 1], [1, 0, 1, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 1, 0]], "solution": [[1, 0, 1, 1, 0], [2, 1, 2, 1, 1], [1, 0, 1, 0, 1], [0, 0, 1, 1, 1], [1, 1, 0, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1\n1 1 1 0 0 1 1 1\n1 1 1 1 1 1 1 0\n1 1 1 1 0 1 1 1\n1 0 1 0 0 1 1 1\n1 1 1 1 1 1 0 1\n0 1 1 1 0 1 1 1\n0 0 1 1 0 0 0 0\n", "answer": "4 3 2 1 1 2 3 2\n3 2 1 0 0 1 2 1\n3 2 2 1 1 2 1 0\n2 1 2 1 0 1 2 1\n1 0 1 0 0 1 1 2\n1 1 2 1 1 1 0 1\n0 1 2 1 0 1 1 1\n0 0 1 1 0 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 790, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 0, 0, 0, 0]], "solution": [[4, 3, 2, 1, 1, 2, 3, 2], [3, 2, 1, 0, 0, 1, 2, 1], [3, 2, 2, 1, 1, 2, 1, 0], [2, 1, 2, 1, 0, 1, 2, 1], [1, 0, 1, 0, 0, 1, 1, 2], [1, 1, 2, 1, 1, 1, 0, 1], [0, 1, 2, 1, 0, 1, 1, 1], [0, 0, 1, 1, 0, 0, 0, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1\n0 0 1 1 0 1 1\n0 1 1 1 1 1 1\n1 1 1 1 1 0 1\n0 1 1 1 1 1 1\n1 1 1 1 1 1 0\n1 0 1 1 1 1 1\n", "answer": "1 0 1 2 1 2 3\n0 0 1 1 0 1 2\n0 1 2 2 1 1 2\n1 2 3 2 1 0 1\n0 1 2 3 2 1 1\n1 1 2 3 2 1 0\n1 0 1 2 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 791, "matrix": [[1, 0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 2, 1, 2, 3], [0, 0, 1, 1, 0, 1, 2], [0, 1, 2, 2, 1, 1, 2], [1, 2, 3, 2, 1, 0, 1], [0, 1, 2, 3, 2, 1, 1], [1, 1, 2, 3, 2, 1, 0], [1, 0, 1, 2, 3, 2, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1\n1 1 1 1 1 1 1\n1 1 1 1 1 1 1\n1 1 1 1 0 1 1\n0 0 1 1 1 1 1\n1 1 0 1 1 0 1\n1 1 1 1 1 1 1\n", "answer": "2 1 0 1 2 3 4\n3 2 1 2 2 3 4\n2 2 2 2 1 2 3\n1 1 2 1 0 1 2\n0 0 1 2 1 1 2\n1 1 0 1 1 0 1\n2 2 1 2 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 792, "matrix": [[1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1], [0, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 2, 3, 4], [3, 2, 1, 2, 2, 3, 4], [2, 2, 2, 2, 1, 2, 3], [1, 1, 2, 1, 0, 1, 2], [0, 0, 1, 2, 1, 1, 2], [1, 1, 0, 1, 1, 0, 1], [2, 2, 1, 2, 2, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1\n1 1 1 0 0 1\n1 1 1 0 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n0 0 0 1 1 1\n", "answer": "1 0 1 0 1 2\n2 1 1 0 0 1\n3 2 1 0 1 2\n2 2 2 1 2 3\n1 1 1 2 3 4\n0 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 793, "matrix": [[1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1]], "solution": [[1, 0, 1, 0, 1, 2], [2, 1, 1, 0, 0, 1], [3, 2, 1, 0, 1, 2], [2, 2, 2, 1, 2, 3], [1, 1, 1, 2, 3, 4], [0, 0, 0, 1, 2, 3]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 0 1\n0 0 1 1 0 1 1 0 1\n1 1 0 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 1\n0 1 1 1 1 1 0 1 1\n0 1 0 1 0 1 1 0 1\n1 0 1 1 1 1 0 0 1\n1 1 1 1 1 0 0 0 1\n1 1 0 1 1 1 1 1 1\n", "answer": "1 1 0 1 1 2 1 0 1\n0 0 1 1 0 1 1 0 1\n1 1 0 1 1 2 2 1 2\n1 1 0 1 2 2 1 2 3\n0 1 1 2 1 1 0 1 2\n0 1 0 1 0 1 1 0 1\n1 0 1 2 1 1 0 0 1\n2 1 1 2 1 0 0 0 1\n2 1 0 1 2 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 794, "matrix": [[1, 1, 0, 1, 1, 1, 1, 0, 1], [0, 0, 1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 0, 0, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1]], "solution": [[1, 1, 0, 1, 1, 2, 1, 0, 1], [0, 0, 1, 1, 0, 1, 1, 0, 1], [1, 1, 0, 1, 1, 2, 2, 1, 2], [1, 1, 0, 1, 2, 2, 1, 2, 3], [0, 1, 1, 2, 1, 1, 0, 1, 2], [0, 1, 0, 1, 0, 1, 1, 0, 1], [1, 0, 1, 2, 1, 1, 0, 0, 1], [2, 1, 1, 2, 1, 0, 0, 0, 1], [2, 1, 0, 1, 2, 1, 1, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 0 0 1 1\n1 1 1 1 0 1 1\n1 1 1 1 1 0 1\n0 1 1 1 1 0 0\n1 1 1 0 1 0 1\n1 1 1 1 0 1 1\n1 1 1 0 1 1 1\n", "answer": "0 1 0 0 0 1 2\n1 2 1 1 0 1 2\n1 2 2 2 1 0 1\n0 1 2 1 1 0 0\n1 2 1 0 1 0 1\n2 3 2 1 0 1 2\n3 2 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 795, "matrix": [[0, 1, 0, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 0], [1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1]], "solution": [[0, 1, 0, 0, 0, 1, 2], [1, 2, 1, 1, 0, 1, 2], [1, 2, 2, 2, 1, 0, 1], [0, 1, 2, 1, 1, 0, 0], [1, 2, 1, 0, 1, 0, 1], [2, 3, 2, 1, 0, 1, 2], [3, 2, 1, 0, 1, 2, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 0 1 0\n1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 0\n0 1 0 1 1 1 0 1\n1 0 1 1 1 0 0 0\n1 1 0 1 0 0 1 1\n1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 0\n", "answer": "0 0 1 2 1 0 1 0\n1 1 2 1 2 1 2 1\n1 2 1 0 1 2 1 0\n0 1 0 1 2 1 0 1\n1 0 1 2 1 0 0 0\n2 1 0 1 0 0 1 1\n3 2 1 2 1 0 1 1\n4 3 2 3 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 796, "matrix": [[0, 0, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[0, 0, 1, 2, 1, 0, 1, 0], [1, 1, 2, 1, 2, 1, 2, 1], [1, 2, 1, 0, 1, 2, 1, 0], [0, 1, 0, 1, 2, 1, 0, 1], [1, 0, 1, 2, 1, 0, 0, 0], [2, 1, 0, 1, 0, 0, 1, 1], [3, 2, 1, 2, 1, 0, 1, 1], [4, 3, 2, 3, 2, 1, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 1 0 0\n1 0 1 1\n1 0 0 1\n", "answer": "2 1 0 1\n2 1 0 0\n1 0 1 1\n1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 797, "matrix": [[1, 1, 0, 1], [1, 1, 0, 0], [1, 0, 1, 1], [1, 0, 0, 1]], "solution": [[2, 1, 0, 1], [2, 1, 0, 0], [1, 0, 1, 1], [1, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 0 1 1 1\n1 1 1 0 0 1\n1 1 1 1 1 1\n0 1 1 0 1 1\n", "answer": "4 3 2 3 3 4\n3 2 1 2 2 3\n2 1 0 1 1 2\n2 2 1 0 0 1\n1 2 2 1 1 2\n0 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 798, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1]], "solution": [[4, 3, 2, 3, 3, 4], [3, 2, 1, 2, 2, 3], [2, 1, 0, 1, 1, 2], [2, 2, 1, 0, 0, 1], [1, 2, 2, 1, 1, 2], [0, 1, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 1 1 1\n0 1 0 1 1 1 0 1 1\n0 1 1 1 1 1 1 0 1\n0 1 0 1 1 1 0 1 1\n1 1 1 1 1 0 0 1 1\n1 1 1 1 1 1 1 0 1\n0 1 1 1 1 1 1 1 0\n0 0 1 1 1 1 0 1 0\n1 1 1 1 0 1 0 1 0\n", "answer": "1 2 1 0 1 2 1 2 3\n0 1 0 1 2 1 0 1 2\n0 1 1 2 3 2 1 0 1\n0 1 0 1 2 1 0 1 2\n1 2 1 2 1 0 0 1 2\n1 2 2 3 2 1 1 0 1\n0 1 2 3 2 2 1 1 0\n0 0 1 2 1 1 0 1 0\n1 1 2 1 0 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 799, "matrix": [[1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 0, 1, 0]], "solution": [[1, 2, 1, 0, 1, 2, 1, 2, 3], [0, 1, 0, 1, 2, 1, 0, 1, 2], [0, 1, 1, 2, 3, 2, 1, 0, 1], [0, 1, 0, 1, 2, 1, 0, 1, 2], [1, 2, 1, 2, 1, 0, 0, 1, 2], [1, 2, 2, 3, 2, 1, 1, 0, 1], [0, 1, 2, 3, 2, 2, 1, 1, 0], [0, 0, 1, 2, 1, 1, 0, 1, 0], [1, 1, 2, 1, 0, 1, 0, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1\n1 1 1 1\n1 1 1 1\n1 0 1 1\n", "answer": "1 0 0 1\n2 1 1 2\n2 1 2 3\n1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 800, "matrix": [[1, 0, 0, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 1]], "solution": [[1, 0, 0, 1], [2, 1, 1, 2], [2, 1, 2, 3], [1, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 0\n1 1 1\n", "answer": "3 2 1\n2 1 0\n3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 801, "matrix": [[1, 1, 1], [1, 1, 0], [1, 1, 1]], "solution": [[3, 2, 1], [2, 1, 0], [3, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n0 1 1 0 1 1\n1 1 1 0 1 1\n0 1 0 1 0 1\n", "answer": "3 4 4 3 4 5\n2 3 3 2 3 4\n1 2 2 1 2 3\n0 1 1 0 1 2\n1 2 1 0 1 2\n0 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 802, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 0, 1]], "solution": [[3, 4, 4, 3, 4, 5], [2, 3, 3, 2, 3, 4], [1, 2, 2, 1, 2, 3], [0, 1, 1, 0, 1, 2], [1, 2, 1, 0, 1, 2], [0, 1, 0, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n0 1 0\n1 1 1\n", "answer": "0 1 1\n0 1 0\n1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 803, "matrix": [[0, 1, 1], [0, 1, 0], [1, 1, 1]], "solution": [[0, 1, 1], [0, 1, 0], [1, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n0 0 0 0\n1 1 0 1\n1 1 1 0\n", "answer": "1 0 1 1\n0 0 0 0\n1 1 0 1\n2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 804, "matrix": [[1, 0, 1, 1], [0, 0, 0, 0], [1, 1, 0, 1], [1, 1, 1, 0]], "solution": [[1, 0, 1, 1], [0, 0, 0, 0], [1, 1, 0, 1], [2, 2, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1 1\n1 1 1 1 1 1 0 0 1\n1 1 1 0 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 1\n0 0 1 1 1 1 1 0 1\n1 1 1 1 0 1 0 1 1\n1 1 1 1 0 1 1 1 1\n", "answer": "5 4 3 2 1 0 1 1 2\n4 3 2 1 2 1 0 0 1\n3 2 1 0 1 2 1 1 2\n3 3 2 1 2 2 2 2 3\n2 2 3 2 2 1 2 2 3\n1 1 2 2 1 0 1 1 2\n0 0 1 2 1 1 1 0 1\n1 1 2 1 0 1 0 1 2\n2 2 2 1 0 1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 805, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1]], "solution": [[5, 4, 3, 2, 1, 0, 1, 1, 2], [4, 3, 2, 1, 2, 1, 0, 0, 1], [3, 2, 1, 0, 1, 2, 1, 1, 2], [3, 3, 2, 1, 2, 2, 2, 2, 3], [2, 2, 3, 2, 2, 1, 2, 2, 3], [1, 1, 2, 2, 1, 0, 1, 1, 2], [0, 0, 1, 2, 1, 1, 1, 0, 1], [1, 1, 2, 1, 0, 1, 0, 1, 2], [2, 2, 2, 1, 0, 1, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1 1 0 1\n1 1 1 1 0 1 1 1 1 1\n1 0 0 1 1 0 1 1 1 1\n1 1 1 0 1 1 0 1 1 1\n0 0 1 0 1 1 0 1 1 0\n1 0 0 1 1 0 0 1 1 0\n1 1 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 0 1 1\n0 0 1 0 0 1 0 1 1 0\n1 1 1 0 0 1 1 1 1 0\n", "answer": "1 0 1 1 0 1 2 1 0 1\n2 1 1 1 0 1 2 2 1 2\n1 0 0 1 1 0 1 2 2 2\n1 1 1 0 1 1 0 1 2 1\n0 0 1 0 1 1 0 1 1 0\n1 0 0 1 1 0 0 1 1 0\n2 1 1 2 2 1 1 0 1 1\n1 1 2 1 1 2 1 0 1 1\n0 0 1 0 0 1 0 1 1 0\n1 1 1 0 0 1 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 806, "matrix": [[1, 0, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 1], [0, 0, 1, 0, 1, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 0, 1, 0, 0, 1, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1, 1, 1, 1, 0]], "solution": [[1, 0, 1, 1, 0, 1, 2, 1, 0, 1], [2, 1, 1, 1, 0, 1, 2, 2, 1, 2], [1, 0, 0, 1, 1, 0, 1, 2, 2, 2], [1, 1, 1, 0, 1, 1, 0, 1, 2, 1], [0, 0, 1, 0, 1, 1, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [2, 1, 1, 2, 2, 1, 1, 0, 1, 1], [1, 1, 2, 1, 1, 2, 1, 0, 1, 1], [0, 0, 1, 0, 0, 1, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1, 1, 2, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n0 1 1\n1 1 1\n", "answer": "1 1 0\n0 1 1\n1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 807, "matrix": [[1, 1, 0], [0, 1, 1], [1, 1, 1]], "solution": [[1, 1, 0], [0, 1, 1], [1, 2, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1 1 1\n0 1 1 1 1 1 0 1 0 1\n1 1 1 1 1 0 1 1 1 0\n1 0 1 0 1 1 1 1 1 0\n1 0 1 0 1 1 0 1 1 0\n1 1 1 1 1 1 0 0 1 1\n1 1 0 0 0 1 0 1 1 1\n1 0 1 1 1 1 1 1 0 1\n1 1 1 0 0 1 0 1 0 1\n1 0 0 1 1 1 1 0 1 0\n", "answer": "1 2 2 1 0 1 1 2 1 2\n0 1 2 2 1 1 0 1 0 1\n1 1 2 1 1 0 1 2 1 0\n1 0 1 0 1 1 1 2 1 0\n1 0 1 0 1 1 0 1 1 0\n2 1 1 1 1 1 0 0 1 1\n2 1 0 0 0 1 0 1 1 2\n1 0 1 1 1 2 1 1 0 1\n2 1 1 0 0 1 0 1 0 1\n1 0 0 1 1 2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 808, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 0, 1, 0, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1, 0, 1, 0]], "solution": [[1, 2, 2, 1, 0, 1, 1, 2, 1, 2], [0, 1, 2, 2, 1, 1, 0, 1, 0, 1], [1, 1, 2, 1, 1, 0, 1, 2, 1, 0], [1, 0, 1, 0, 1, 1, 1, 2, 1, 0], [1, 0, 1, 0, 1, 1, 0, 1, 1, 0], [2, 1, 1, 1, 1, 1, 0, 0, 1, 1], [2, 1, 0, 0, 0, 1, 0, 1, 1, 2], [1, 0, 1, 1, 1, 2, 1, 1, 0, 1], [2, 1, 1, 0, 0, 1, 0, 1, 0, 1], [1, 0, 0, 1, 1, 2, 1, 0, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 0 1\n1 1 1 1 0 0 0 0 1\n1 0 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 0 0\n1 1 1 0 0 1 1 1 1\n0 1 0 1 1 1 0 1 1\n1 1 0 1 1 1 1 1 1\n0 0 1 0 1 1 1 1 0\n1 0 1 1 0 0 1 0 0\n", "answer": "3 2 3 2 1 0 1 0 1\n2 1 2 1 0 0 0 0 1\n1 0 1 2 1 1 0 1 1\n2 1 2 1 1 2 1 0 0\n1 2 1 0 0 1 1 1 1\n0 1 0 1 1 1 0 1 2\n1 1 0 1 2 2 1 2 1\n0 0 1 0 1 1 2 1 0\n1 0 1 1 0 0 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 809, "matrix": [[1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 0, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 0, 0]], "solution": [[3, 2, 3, 2, 1, 0, 1, 0, 1], [2, 1, 2, 1, 0, 0, 0, 0, 1], [1, 0, 1, 2, 1, 1, 0, 1, 1], [2, 1, 2, 1, 1, 2, 1, 0, 0], [1, 2, 1, 0, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 0, 1, 2], [1, 1, 0, 1, 2, 2, 1, 2, 1], [0, 0, 1, 0, 1, 1, 2, 1, 0], [1, 0, 1, 1, 0, 0, 1, 0, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n1 1 0\n1 1 1\n", "answer": "1 0 1\n2 1 0\n3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 810, "matrix": [[1, 0, 1], [1, 1, 0], [1, 1, 1]], "solution": [[1, 0, 1], [2, 1, 0], [3, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 1 1\n0 1 1 0 1 1 0 1 1\n1 1 1 0 1 1 1 0 1\n1 1 1 0 0 1 1 1 0\n1 1 1 1 1 1 1 0 0\n1 1 0 0 1 0 1 1 1\n1 1 1 1 1 1 0 1 1\n1 1 1 1 0 1 1 0 1\n1 0 1 1 1 1 1 0 1\n", "answer": "0 1 2 1 2 2 1 2 3\n0 1 1 0 1 1 0 1 2\n1 2 1 0 1 2 1 0 1\n2 2 1 0 0 1 2 1 0\n3 2 1 1 1 1 1 0 0\n2 1 0 0 1 0 1 1 1\n3 2 1 1 1 1 0 1 2\n2 1 2 1 0 1 1 0 1\n1 0 1 2 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 811, "matrix": [[0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1]], "solution": [[0, 1, 2, 1, 2, 2, 1, 2, 3], [0, 1, 1, 0, 1, 1, 0, 1, 2], [1, 2, 1, 0, 1, 2, 1, 0, 1], [2, 2, 1, 0, 0, 1, 2, 1, 0], [3, 2, 1, 1, 1, 1, 1, 0, 0], [2, 1, 0, 0, 1, 0, 1, 1, 1], [3, 2, 1, 1, 1, 1, 0, 1, 2], [2, 1, 2, 1, 0, 1, 1, 0, 1], [1, 0, 1, 2, 1, 2, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 0 1\n1 1 1 1 1 0 1 1\n0 0 1 1 1 0 1 1\n0 1 1 1 1 1 0 1\n1 0 1 1 1 1 1 0\n1 1 1 1 1 1 1 1\n1 0 1 1 1 0 1 1\n1 0 1 1 1 0 1 1\n", "answer": "2 1 0 1 2 1 0 1\n1 1 1 2 1 0 1 2\n0 0 1 2 1 0 1 2\n0 1 2 3 2 1 0 1\n1 0 1 2 3 2 1 0\n2 1 2 3 2 1 2 1\n1 0 1 2 1 0 1 2\n1 0 1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 812, "matrix": [[1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1], [0, 0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1]], "solution": [[2, 1, 0, 1, 2, 1, 0, 1], [1, 1, 1, 2, 1, 0, 1, 2], [0, 0, 1, 2, 1, 0, 1, 2], [0, 1, 2, 3, 2, 1, 0, 1], [1, 0, 1, 2, 3, 2, 1, 0], [2, 1, 2, 3, 2, 1, 2, 1], [1, 0, 1, 2, 1, 0, 1, 2], [1, 0, 1, 2, 1, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1\n1 0 0 0 1 1\n1 0 1 0 1 1\n1 1 1 0 0 1\n1 1 1 0 1 1\n1 1 1 1 1 0\n", "answer": "0 1 1 1 2 3\n1 0 0 0 1 2\n1 0 1 0 1 2\n2 1 1 0 0 1\n3 2 1 0 1 1\n4 3 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 813, "matrix": [[0, 1, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1], [1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 1, 1, 2, 3], [1, 0, 0, 0, 1, 2], [1, 0, 1, 0, 1, 2], [2, 1, 1, 0, 0, 1], [3, 2, 1, 0, 1, 1], [4, 3, 2, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 0 1 1 1 1\n1 1 0 1 1 1\n1 1 1 1 1 1\n1 1 1 0 1 1\n0 1 0 1 0 1\n", "answer": "2 1 2 3 4 5\n1 0 1 2 3 4\n2 1 0 1 2 3\n2 2 1 1 2 3\n1 2 1 0 1 2\n0 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 814, "matrix": [[1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 0, 1]], "solution": [[2, 1, 2, 3, 4, 5], [1, 0, 1, 2, 3, 4], [2, 1, 0, 1, 2, 3], [2, 2, 1, 1, 2, 3], [1, 2, 1, 0, 1, 2], [0, 1, 0, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 1 1 1 0 1\n0 1 1 1 1 0 1 1 1 1\n1 1 1 1 0 1 0 1 1 1\n1 0 1 0 1 1 1 1 1 1\n0 0 0 1 0 1 1 1 1 1\n1 1 0 1 1 1 0 1 1 1\n1 1 1 1 1 1 0 1 1 1\n1 0 1 1 1 1 1 0 1 0\n0 1 1 1 0 1 0 1 1 0\n1 1 1 0 0 0 1 1 1 1\n", "answer": "0 0 1 1 0 1 2 1 0 1\n0 1 2 2 1 0 1 2 1 2\n1 1 2 1 0 1 0 1 2 3\n1 0 1 0 1 2 1 2 3 4\n0 0 0 1 0 1 1 2 3 3\n1 1 0 1 1 1 0 1 2 2\n2 1 1 2 2 1 0 1 2 1\n1 0 1 2 1 2 1 0 1 0\n0 1 2 1 0 1 0 1 1 0\n1 2 1 0 0 0 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 815, "matrix": [[0, 0, 1, 1, 0, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1, 0], [0, 1, 1, 1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 0, 0, 0, 1, 1, 1, 1]], "solution": [[0, 0, 1, 1, 0, 1, 2, 1, 0, 1], [0, 1, 2, 2, 1, 0, 1, 2, 1, 2], [1, 1, 2, 1, 0, 1, 0, 1, 2, 3], [1, 0, 1, 0, 1, 2, 1, 2, 3, 4], [0, 0, 0, 1, 0, 1, 1, 2, 3, 3], [1, 1, 0, 1, 1, 1, 0, 1, 2, 2], [2, 1, 1, 2, 2, 1, 0, 1, 2, 1], [1, 0, 1, 2, 1, 2, 1, 0, 1, 0], [0, 1, 2, 1, 0, 1, 0, 1, 1, 0], [1, 2, 1, 0, 0, 0, 1, 2, 2, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n0 1 1 1\n1 1 1 0\n0 1 0 1\n", "answer": "1 1 0 1\n0 1 1 1\n1 2 1 0\n0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 816, "matrix": [[1, 1, 0, 1], [0, 1, 1, 1], [1, 1, 1, 0], [0, 1, 0, 1]], "solution": [[1, 1, 0, 1], [0, 1, 1, 1], [1, 2, 1, 0], [0, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0\n1 1 0 1 1 1\n1 1 1 0 1 1\n1 1 1 1 0 1\n0 1 1 0 0 1\n1 0 1 1 1 1\n", "answer": "3 2 1 0 1 0\n2 1 0 1 2 1\n2 2 1 0 1 2\n1 2 2 1 0 1\n0 1 1 0 0 1\n1 0 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 817, "matrix": [[1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 1]], "solution": [[3, 2, 1, 0, 1, 0], [2, 1, 0, 1, 2, 1], [2, 2, 1, 0, 1, 2], [1, 2, 2, 1, 0, 1], [0, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1\n1 1 1 1 1\n1 1 1 0 1\n1 0 1 0 1\n1 1 1 1 0\n", "answer": "0 0 1 2 3\n1 1 2 1 2\n2 1 1 0 1\n1 0 1 0 1\n2 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 818, "matrix": [[0, 0, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 0, 1], [1, 0, 1, 0, 1], [1, 1, 1, 1, 0]], "solution": [[0, 0, 1, 2, 3], [1, 1, 2, 1, 2], [2, 1, 1, 0, 1], [1, 0, 1, 0, 1], [2, 1, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 1 1 1 1\n1 1 0 1 1 0 0 0 1 1\n1 1 1 0 1 1 1 1 1 0\n1 1 1 1 1 1 1 1 0 1\n0 1 1 1 0 1 1 1 0 1\n1 0 1 1 0 0 1 1 1 0\n0 1 1 0 1 1 0 1 1 1\n1 1 1 1 1 1 0 1 1 1\n1 1 1 1 1 1 1 0 0 0\n1 1 1 1 1 1 1 1 1 0\n", "answer": "0 0 1 2 2 1 1 1 2 2\n1 1 0 1 1 0 0 0 1 1\n2 2 1 0 1 1 1 1 1 0\n1 2 2 1 1 2 2 1 0 1\n0 1 2 1 0 1 2 1 0 1\n1 0 1 1 0 0 1 2 1 0\n0 1 1 0 1 1 0 1 2 1\n1 2 2 1 2 1 0 1 1 1\n2 3 3 2 3 2 1 0 0 0\n3 4 4 3 4 3 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 819, "matrix": [[0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 0, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1, 1, 1, 0], [0, 1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[0, 0, 1, 2, 2, 1, 1, 1, 2, 2], [1, 1, 0, 1, 1, 0, 0, 0, 1, 1], [2, 2, 1, 0, 1, 1, 1, 1, 1, 0], [1, 2, 2, 1, 1, 2, 2, 1, 0, 1], [0, 1, 2, 1, 0, 1, 2, 1, 0, 1], [1, 0, 1, 1, 0, 0, 1, 2, 1, 0], [0, 1, 1, 0, 1, 1, 0, 1, 2, 1], [1, 2, 2, 1, 2, 1, 0, 1, 1, 1], [2, 3, 3, 2, 3, 2, 1, 0, 0, 0], [3, 4, 4, 3, 4, 3, 2, 1, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 0 0 1 0 1\n0 0 0 1 1 0\n0 1 1 1 1 1\n1 1 1 1 1 0\n1 1 1 1 1 0\n", "answer": "2 1 1 2 1 2\n1 0 0 1 0 1\n0 0 0 1 1 0\n0 1 1 2 2 1\n1 2 2 2 1 0\n2 3 3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 820, "matrix": [[1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1], [0, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0]], "solution": [[2, 1, 1, 2, 1, 2], [1, 0, 0, 1, 0, 1], [0, 0, 0, 1, 1, 0], [0, 1, 1, 2, 2, 1], [1, 2, 2, 2, 1, 0], [2, 3, 3, 2, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1\n1 1 1 1 1 0 1\n1 1 0 1 1 1 0\n1 1 1 0 1 1 0\n1 1 1 1 1 1 1\n0 1 0 0 0 1 1\n1 1 1 0 1 1 0\n", "answer": "2 1 0 0 1 1 2\n3 2 1 1 1 0 1\n2 1 0 1 2 1 0\n2 2 1 0 1 1 0\n1 2 1 1 1 2 1\n0 1 0 0 0 1 1\n1 2 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 821, "matrix": [[1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0]], "solution": [[2, 1, 0, 0, 1, 1, 2], [3, 2, 1, 1, 1, 0, 1], [2, 1, 0, 1, 2, 1, 0], [2, 2, 1, 0, 1, 1, 0], [1, 2, 1, 1, 1, 2, 1], [0, 1, 0, 0, 0, 1, 1], [1, 2, 1, 0, 1, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 1 1 0 1 0 1\n1 0 0 1 0 1 1\n1 1 1 0 0 1 0\n1 1 0 1 1 1 1\n1 1 1 0 1 1 0\n1 1 1 1 0 1 0\n", "answer": "3 2 2 1 2 1 2\n2 1 1 0 1 0 1\n1 0 0 1 0 1 1\n2 1 1 0 0 1 0\n2 1 0 1 1 2 1\n3 2 1 0 1 1 0\n4 3 2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 822, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1], [1, 0, 0, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 0], [1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 0, 1, 0]], "solution": [[3, 2, 2, 1, 2, 1, 2], [2, 1, 1, 0, 1, 0, 1], [1, 0, 0, 1, 0, 1, 1], [2, 1, 1, 0, 0, 1, 0], [2, 1, 0, 1, 1, 2, 1], [3, 2, 1, 0, 1, 1, 0], [4, 3, 2, 1, 0, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1 1\n0 1 0 1 1 1 0 1 1\n1 0 1 1 1 1 1 1 1\n0 0 1 1 1 0 1 1 0\n0 1 1 1 0 1 1 0 0\n1 1 1 1 1 0 1 1 1\n1 1 0 1 1 1 0 1 0\n1 1 1 1 1 1 1 0 1\n", "answer": "0 1 2 3 4 3 2 1 0\n1 2 1 2 3 2 1 2 1\n0 1 0 1 2 1 0 1 2\n1 0 1 2 2 1 1 2 1\n0 0 1 2 1 0 1 1 0\n0 1 2 1 0 1 1 0 0\n1 2 1 2 1 0 1 1 1\n2 1 0 1 2 1 0 1 0\n3 2 1 2 3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 823, "matrix": [[0, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1]], "solution": [[0, 1, 2, 3, 4, 3, 2, 1, 0], [1, 2, 1, 2, 3, 2, 1, 2, 1], [0, 1, 0, 1, 2, 1, 0, 1, 2], [1, 0, 1, 2, 2, 1, 1, 2, 1], [0, 0, 1, 2, 1, 0, 1, 1, 0], [0, 1, 2, 1, 0, 1, 1, 0, 0], [1, 2, 1, 2, 1, 0, 1, 1, 1], [2, 1, 0, 1, 2, 1, 0, 1, 0], [3, 2, 1, 2, 3, 2, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1\n1 1 1 0\n1 0 0 0\n1 1 1 1\n", "answer": "0 0 1 1\n1 1 1 0\n1 0 0 0\n2 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 824, "matrix": [[0, 0, 1, 1], [1, 1, 1, 0], [1, 0, 0, 0], [1, 1, 1, 1]], "solution": [[0, 0, 1, 1], [1, 1, 1, 0], [1, 0, 0, 0], [2, 1, 1, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1\n0 1 1 1 1\n1 0 1 1 1\n1 1 1 1 1\n1 1 0 1 1\n", "answer": "1 2 1 0 1\n0 1 2 1 2\n1 0 1 2 3\n2 1 1 2 3\n2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 825, "matrix": [[1, 1, 1, 0, 1], [0, 1, 1, 1, 1], [1, 0, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1]], "solution": [[1, 2, 1, 0, 1], [0, 1, 2, 1, 2], [1, 0, 1, 2, 3], [2, 1, 1, 2, 3], [2, 1, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 0 0 0 1\n1 1 1 1 1 0 1 0 1\n1 1 1 1 1 1 1 1 1\n0 1 1 1 1 0 1 1 1\n1 1 1 0 1 1 0 1 0\n0 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 0 1\n0 0 1 0 1 1 1 1 1\n1 0 1 0 1 1 1 0 0\n", "answer": "0 1 1 0 1 0 0 0 1\n1 2 2 1 1 0 1 0 1\n1 2 3 2 2 1 2 1 2\n0 1 2 1 1 0 1 2 1\n1 2 1 0 1 1 0 1 0\n0 1 2 1 1 2 1 1 1\n1 1 2 1 0 1 1 0 1\n0 0 1 0 1 2 2 1 1\n1 0 1 0 1 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 826, "matrix": [[0, 1, 1, 0, 1, 0, 0, 0, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1], [0, 0, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 0, 0]], "solution": [[0, 1, 1, 0, 1, 0, 0, 0, 1], [1, 2, 2, 1, 1, 0, 1, 0, 1], [1, 2, 3, 2, 2, 1, 2, 1, 2], [0, 1, 2, 1, 1, 0, 1, 2, 1], [1, 2, 1, 0, 1, 1, 0, 1, 0], [0, 1, 2, 1, 1, 2, 1, 1, 1], [1, 1, 2, 1, 0, 1, 1, 0, 1], [0, 0, 1, 0, 1, 2, 2, 1, 1], [1, 0, 1, 0, 1, 2, 1, 0, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 0 1 0 0\n0 0 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 1\n0 1 1 1 1 1 1 1 1\n0 1 1 1 1 0 0 1 1\n1 1 0 1 1 1 1 1 1\n1 1 1 0 0 1 1 0 0\n1 1 0 0 1 1 1 1 0\n0 1 1 1 1 1 1 1 1\n", "answer": "1 0 0 1 1 0 1 0 0\n0 0 1 2 2 1 2 1 1\n1 1 2 2 1 0 1 2 2\n0 1 2 3 2 1 1 2 3\n0 1 1 2 1 0 0 1 2\n1 1 0 1 1 1 1 1 1\n2 2 1 0 0 1 1 0 0\n1 1 0 0 1 2 2 1 0\n0 1 1 1 2 3 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 827, "matrix": [[1, 0, 0, 1, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 0, 1, 1, 0, 1, 0, 0], [0, 0, 1, 2, 2, 1, 2, 1, 1], [1, 1, 2, 2, 1, 0, 1, 2, 2], [0, 1, 2, 3, 2, 1, 1, 2, 3], [0, 1, 1, 2, 1, 0, 0, 1, 2], [1, 1, 0, 1, 1, 1, 1, 1, 1], [2, 2, 1, 0, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 2, 2, 1, 0], [0, 1, 1, 1, 2, 3, 3, 2, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n0 1 1 1 1 1\n1 1 1 1 1 1\n0 0 1 1 0 1\n1 1 1 1 1 1\n1 0 0 1 1 1\n", "answer": "1 2 3 4 3 4\n0 1 2 3 2 3\n1 1 2 2 1 2\n0 0 1 1 0 1\n1 1 1 2 1 2\n1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 828, "matrix": [[1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1]], "solution": [[1, 2, 3, 4, 3, 4], [0, 1, 2, 3, 2, 3], [1, 1, 2, 2, 1, 2], [0, 0, 1, 1, 0, 1], [1, 1, 1, 2, 1, 2], [1, 0, 0, 1, 2, 3]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1\n1 1 1 1 1 0 0 1\n0 0 1 0 0 1 1 1\n1 1 0 1 1 1 1 1\n1 1 1 1 0 1 1 1\n1 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1\n1 1 1 0 0 1 0 1\n", "answer": "2 1 0 1 2 1 1 2\n1 1 1 1 1 0 0 1\n0 0 1 0 0 1 1 2\n1 1 0 1 1 2 2 3\n2 2 1 1 0 1 2 3\n2 1 2 2 1 2 2 3\n1 0 1 1 1 2 1 2\n2 1 1 0 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 829, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1], [0, 0, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 0, 1]], "solution": [[2, 1, 0, 1, 2, 1, 1, 2], [1, 1, 1, 1, 1, 0, 0, 1], [0, 0, 1, 0, 0, 1, 1, 2], [1, 1, 0, 1, 1, 2, 2, 3], [2, 2, 1, 1, 0, 1, 2, 3], [2, 1, 2, 2, 1, 2, 2, 3], [1, 0, 1, 1, 1, 2, 1, 2], [2, 1, 1, 0, 0, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 1 1 1 0\n0 0 1 1 1 1 1 1 0 0\n1 1 0 0 1 1 1 1 1 1\n0 1 0 1 0 1 1 1 1 0\n0 1 1 1 0 1 0 0 1 1\n1 0 1 1 0 0 0 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 0 0 1 1 1 0 1\n1 1 1 1 1 1 1 1 1 1\n0 1 0 1 1 1 1 1 0 1\n", "answer": "1 1 0 1 0 1 2 2 1 0\n0 0 1 1 1 2 2 1 0 0\n1 1 0 0 1 2 2 2 1 1\n0 1 0 1 0 1 1 1 1 0\n0 1 1 1 0 1 0 0 1 1\n1 0 1 1 0 0 0 1 2 2\n2 1 2 1 1 1 1 2 1 2\n2 2 1 0 0 1 2 1 0 1\n1 2 1 1 1 2 3 2 1 2\n0 1 0 1 2 3 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 830, "matrix": [[1, 1, 0, 1, 0, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 0, 0, 1, 1], [1, 0, 1, 1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1]], "solution": [[1, 1, 0, 1, 0, 1, 2, 2, 1, 0], [0, 0, 1, 1, 1, 2, 2, 1, 0, 0], [1, 1, 0, 0, 1, 2, 2, 2, 1, 1], [0, 1, 0, 1, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 0, 0, 1, 1], [1, 0, 1, 1, 0, 0, 0, 1, 2, 2], [2, 1, 2, 1, 1, 1, 1, 2, 1, 2], [2, 2, 1, 0, 0, 1, 2, 1, 0, 1], [1, 2, 1, 1, 1, 2, 3, 2, 1, 2], [0, 1, 0, 1, 2, 3, 2, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n0 1 1 1 1\n1 1 1 1 0\n1 1 1 1 1\n1 1 1 1 1\n", "answer": "1 2 3 3 2\n0 1 2 2 1\n1 2 2 1 0\n2 3 3 2 1\n3 4 4 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 831, "matrix": [[1, 1, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 1, 1, 0], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]], "solution": [[1, 2, 3, 3, 2], [0, 1, 2, 2, 1], [1, 2, 2, 1, 0], [2, 3, 3, 2, 1], [3, 4, 4, 3, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0\n1 0 1 0 1\n0 0 1 0 1\n0 1 0 1 1\n1 1 0 1 1\n", "answer": "0 1 1 0 0\n1 0 1 0 1\n0 0 1 0 1\n0 1 0 1 2\n1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 832, "matrix": [[0, 1, 1, 0, 0], [1, 0, 1, 0, 1], [0, 0, 1, 0, 1], [0, 1, 0, 1, 1], [1, 1, 0, 1, 1]], "solution": [[0, 1, 1, 0, 0], [1, 0, 1, 0, 1], [0, 0, 1, 0, 1], [0, 1, 0, 1, 2], [1, 1, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 0 1\n1 1 1 0 1 1 0\n1 1 1 1 1 1 1\n1 0 0 1 0 1 0\n1 1 1 1 1 1 1\n0 1 1 0 1 1 0\n1 1 1 1 1 1 1\n", "answer": "2 1 0 1 0 0 1\n3 2 1 0 1 1 0\n2 1 1 1 1 2 1\n1 0 0 1 0 1 0\n1 1 1 1 1 2 1\n0 1 1 0 1 1 0\n1 2 2 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 833, "matrix": [[1, 1, 0, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 0, 0, 1], [3, 2, 1, 0, 1, 1, 0], [2, 1, 1, 1, 1, 2, 1], [1, 0, 0, 1, 0, 1, 0], [1, 1, 1, 1, 1, 2, 1], [0, 1, 1, 0, 1, 1, 0], [1, 2, 2, 1, 2, 2, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 0 0\n0 1 1\n", "answer": "0 1 1\n1 0 0\n0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 834, "matrix": [[0, 1, 1], [1, 0, 0], [0, 1, 1]], "solution": [[0, 1, 1], [1, 0, 0], [0, 1, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n0 1 1 1 1 1\n1 1 1 0 1 1\n1 1 0 1 1 1\n1 0 1 1 1 1\n1 1 1 0 1 1\n", "answer": "1 2 3 2 3 4\n0 1 2 1 2 3\n1 2 1 0 1 2\n2 1 0 1 2 3\n1 0 1 1 2 3\n2 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 835, "matrix": [[1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1]], "solution": [[1, 2, 3, 2, 3, 4], [0, 1, 2, 1, 2, 3], [1, 2, 1, 0, 1, 2], [2, 1, 0, 1, 2, 3], [1, 0, 1, 1, 2, 3], [2, 1, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0\n1 1 1 1 1 0 1\n1 1 1 1 1 1 0\n1 1 1 1 1 1 1\n1 1 1 1 0 0 1\n0 1 1 0 1 0 0\n1 1 1 1 1 0 1\n", "answer": "5 5 4 3 2 1 0\n4 4 3 2 1 0 1\n3 4 4 3 2 1 0\n2 3 3 2 1 1 1\n1 2 2 1 0 0 1\n0 1 1 0 1 0 0\n1 2 2 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 836, "matrix": [[1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1], [0, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1]], "solution": [[5, 5, 4, 3, 2, 1, 0], [4, 4, 3, 2, 1, 0, 1], [3, 4, 4, 3, 2, 1, 0], [2, 3, 3, 2, 1, 1, 1], [1, 2, 2, 1, 0, 0, 1], [0, 1, 1, 0, 1, 0, 0], [1, 2, 2, 1, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 1 0 1\n1 1 0 1\n1 0 1 0\n", "answer": "3 2 1 2\n2 1 0 1\n2 1 0 1\n1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 837, "matrix": [[1, 1, 1, 1], [1, 1, 0, 1], [1, 1, 0, 1], [1, 0, 1, 0]], "solution": [[3, 2, 1, 2], [2, 1, 0, 1], [2, 1, 0, 1], [1, 0, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 1 0 1\n1 1 0 0\n1 1 0 1\n", "answer": "3 2 1 2\n2 1 0 1\n2 1 0 0\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 838, "matrix": [[1, 1, 1, 1], [1, 1, 0, 1], [1, 1, 0, 0], [1, 1, 0, 1]], "solution": [[3, 2, 1, 2], [2, 1, 0, 1], [2, 1, 0, 0], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 1 0 1\n0 0 1 1 1 0 1 1\n1 0 1 1 1 0 1 1\n1 1 1 1 1 0 1 1\n1 1 1 0 1 0 0 1\n1 0 0 1 1 0 0 1\n1 1 1 1 1 0 1 0\n1 1 0 1 0 1 0 1\n", "answer": "1 1 1 0 1 1 0 1\n0 0 1 1 1 0 1 2\n1 0 1 2 1 0 1 2\n2 1 2 1 1 0 1 2\n2 1 1 0 1 0 0 1\n1 0 0 1 1 0 0 1\n2 1 1 2 1 0 1 0\n2 1 0 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 839, "matrix": [[1, 1, 1, 0, 1, 1, 0, 1], [0, 0, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1], [1, 0, 0, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 0, 1, 0, 1]], "solution": [[1, 1, 1, 0, 1, 1, 0, 1], [0, 0, 1, 1, 1, 0, 1, 2], [1, 0, 1, 2, 1, 0, 1, 2], [2, 1, 2, 1, 1, 0, 1, 2], [2, 1, 1, 0, 1, 0, 0, 1], [1, 0, 0, 1, 1, 0, 0, 1], [2, 1, 1, 2, 1, 0, 1, 0], [2, 1, 0, 1, 0, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 1\n1 1 1\n", "answer": "0 1 2\n1 2 3\n2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 840, "matrix": [[0, 1, 1], [1, 1, 1], [1, 1, 1]], "solution": [[0, 1, 2], [1, 2, 3], [2, 3, 4]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n0 1 1 1\n1 1 0 1\n1 0 0 0\n", "answer": "1 2 2 3\n0 1 1 2\n1 1 0 1\n1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 841, "matrix": [[1, 1, 1, 1], [0, 1, 1, 1], [1, 1, 0, 1], [1, 0, 0, 0]], "solution": [[1, 2, 2, 3], [0, 1, 1, 2], [1, 1, 0, 1], [1, 0, 0, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 0 0 1\n1 1 0 1\n1 0 0 1\n", "answer": "2 1 0 1\n1 0 0 1\n2 1 0 1\n1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 842, "matrix": [[1, 1, 0, 1], [1, 0, 0, 1], [1, 1, 0, 1], [1, 0, 0, 1]], "solution": [[2, 1, 0, 1], [1, 0, 0, 1], [2, 1, 0, 1], [1, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 0 1 1\n1 0 1 1 1 1 1 1\n0 1 1 0 0 1 0 1\n1 1 1 1 0 1 1 1\n0 0 1 1 1 1 0 1\n0 1 0 1 1 1 0 0\n1 1 1 1 0 0 1 1\n0 0 1 0 1 1 1 0\n", "answer": "0 1 2 1 0 0 1 2\n1 0 1 1 1 1 1 2\n0 1 1 0 0 1 0 1\n1 1 2 1 0 1 1 2\n0 0 1 2 1 1 0 1\n0 1 0 1 1 1 0 0\n1 1 1 1 0 0 1 1\n0 0 1 0 1 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 843, "matrix": [[0, 1, 1, 1, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0, 1, 1], [0, 0, 1, 0, 1, 1, 1, 0]], "solution": [[0, 1, 2, 1, 0, 0, 1, 2], [1, 0, 1, 1, 1, 1, 1, 2], [0, 1, 1, 0, 0, 1, 0, 1], [1, 1, 2, 1, 0, 1, 1, 2], [0, 0, 1, 2, 1, 1, 0, 1], [0, 1, 0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 0, 0, 1, 1], [0, 0, 1, 0, 1, 1, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 0\n1 1 1 1 1 0\n1 1 0 1 0 1\n1 1 1 0 1 1\n1 1 1 1 1 0\n1 0 1 1 1 1\n", "answer": "0 0 1 2 1 0\n1 1 1 2 1 0\n2 1 0 1 0 1\n3 2 1 0 1 1\n2 1 2 1 1 0\n1 0 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 844, "matrix": [[0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1]], "solution": [[0, 0, 1, 2, 1, 0], [1, 1, 1, 2, 1, 0], [2, 1, 0, 1, 0, 1], [3, 2, 1, 0, 1, 1], [2, 1, 2, 1, 1, 0], [1, 0, 1, 2, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 0 1 0 1\n1 1 1 1 1 0 1 1 0 0\n1 1 1 1 1 1 1 1 1 1\n1 0 1 1 0 1 1 1 0 0\n1 1 0 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 0 1\n0 1 1 1 0 1 1 1 1 1\n1 1 1 1 1 1 0 0 0 1\n1 1 0 1 0 1 1 1 1 1\n", "answer": "1 0 1 2 3 2 1 0 1 2\n2 1 2 3 2 1 0 1 0 1\n3 2 3 2 1 0 1 1 0 0\n2 1 2 2 1 1 2 2 1 1\n1 0 1 1 0 1 2 1 0 0\n2 1 0 1 1 1 2 2 1 1\n1 2 1 2 1 0 1 1 0 1\n0 1 2 1 0 1 1 1 1 2\n1 2 1 2 1 1 0 0 0 1\n2 1 0 1 0 1 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 845, "matrix": [[1, 0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 2, 3, 2, 1, 0, 1, 2], [2, 1, 2, 3, 2, 1, 0, 1, 0, 1], [3, 2, 3, 2, 1, 0, 1, 1, 0, 0], [2, 1, 2, 2, 1, 1, 2, 2, 1, 1], [1, 0, 1, 1, 0, 1, 2, 1, 0, 0], [2, 1, 0, 1, 1, 1, 2, 2, 1, 1], [1, 2, 1, 2, 1, 0, 1, 1, 0, 1], [0, 1, 2, 1, 0, 1, 1, 1, 1, 2], [1, 2, 1, 2, 1, 1, 0, 0, 0, 1], [2, 1, 0, 1, 0, 1, 1, 1, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 1 1 1\n1 1 1 1\n1 1 0 1\n", "answer": "2 1 0 1\n3 2 1 2\n3 2 1 2\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 846, "matrix": [[1, 1, 0, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 0, 1]], "solution": [[2, 1, 0, 1], [3, 2, 1, 2], [3, 2, 1, 2], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0\n1 0 1 1 0 0\n1 0 0 0 1 1\n1 1 0 0 1 0\n0 1 1 1 1 1\n1 0 1 1 1 1\n", "answer": "2 1 0 1 1 0\n1 0 1 1 0 0\n1 0 0 0 1 1\n1 1 0 0 1 0\n0 1 1 1 2 1\n1 0 1 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 847, "matrix": [[1, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 0], [1, 0, 0, 0, 1, 1], [1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 0], [1, 0, 0, 0, 1, 1], [1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 2, 1], [1, 0, 1, 2, 3, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 1\n1 0 1\n", "answer": "3 2 3\n2 1 2\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 848, "matrix": [[1, 1, 1], [1, 1, 1], [1, 0, 1]], "solution": [[3, 2, 3], [2, 1, 2], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1 0 1 0\n1 1 1 1 1 1 0 1 0\n1 1 1 0 1 1 1 0 1\n1 1 0 1 1 1 1 1 1\n1 0 1 0 1 0 1 1 1\n1 1 1 1 1 1 1 0 0\n0 1 1 0 1 0 1 1 1\n1 1 1 1 1 0 1 1 1\n1 1 0 0 0 1 0 0 0\n", "answer": "0 1 2 1 0 1 0 1 0\n1 2 2 1 1 1 0 1 0\n2 2 1 0 1 2 1 0 1\n2 1 0 1 2 1 2 1 2\n1 0 1 0 1 0 1 1 1\n1 1 2 1 2 1 1 0 0\n0 1 1 0 1 0 1 1 1\n1 2 1 1 1 0 1 1 1\n2 1 0 0 0 1 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 849, "matrix": [[0, 1, 1, 1, 0, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 0, 0]], "solution": [[0, 1, 2, 1, 0, 1, 0, 1, 0], [1, 2, 2, 1, 1, 1, 0, 1, 0], [2, 2, 1, 0, 1, 2, 1, 0, 1], [2, 1, 0, 1, 2, 1, 2, 1, 2], [1, 0, 1, 0, 1, 0, 1, 1, 1], [1, 1, 2, 1, 2, 1, 1, 0, 0], [0, 1, 1, 0, 1, 0, 1, 1, 1], [1, 2, 1, 1, 1, 0, 1, 1, 1], [2, 1, 0, 0, 0, 1, 0, 0, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0 1\n1 0 1 1 1 0\n1 1 1 0 1 1\n1 1 0 1 1 1\n1 1 0 1 1 0\n0 0 1 1 1 1\n", "answer": "0 1 2 1 0 1\n1 0 1 1 1 0\n2 1 1 0 1 1\n2 1 0 1 2 1\n1 1 0 1 1 0\n0 0 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 850, "matrix": [[0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0], [0, 0, 1, 1, 1, 1]], "solution": [[0, 1, 2, 1, 0, 1], [1, 0, 1, 1, 1, 0], [2, 1, 1, 0, 1, 1], [2, 1, 0, 1, 2, 1], [1, 1, 0, 1, 1, 0], [0, 0, 1, 2, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 0 1 0 1 1 1\n1 1 1 1 0 1 1\n0 0 0 1 1 0 0\n0 0 1 0 1 1 1\n1 0 0 0 1 1 0\n1 1 1 0 1 0 1\n", "answer": "2 1 2 1 2 3 3\n1 0 1 0 1 2 2\n1 1 1 1 0 1 1\n0 0 0 1 1 0 0\n0 0 1 0 1 1 1\n1 0 0 0 1 1 0\n2 1 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 851, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, 0], [1, 1, 1, 0, 1, 0, 1]], "solution": [[2, 1, 2, 1, 2, 3, 3], [1, 0, 1, 0, 1, 2, 2], [1, 1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, 0], [2, 1, 1, 0, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1 0 1\n0 1 1 1 0 1 0 1 1 1\n1 0 1 1 1 0 1 1 1 0\n1 1 0 1 1 1 1 1 0 1\n1 1 1 1 0 1 1 0 0 1\n0 1 1 0 1 1 1 1 1 0\n1 0 1 1 1 0 0 1 1 1\n1 1 0 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1 0 1\n1 1 0 1 0 0 1 1 0 1\n", "answer": "1 1 0 1 1 2 1 1 0 1\n0 1 1 1 0 1 0 1 1 1\n1 0 1 2 1 0 1 2 1 0\n2 1 0 1 1 1 2 1 0 1\n1 2 1 1 0 1 1 0 0 1\n0 1 1 0 1 1 1 1 1 0\n1 0 1 1 1 0 0 1 2 1\n2 1 0 1 2 1 1 2 1 2\n1 0 1 2 1 1 2 1 0 1\n2 1 0 1 0 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 852, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 0, 0, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 0, 1, 1, 0, 1]], "solution": [[1, 1, 0, 1, 1, 2, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 2, 1, 0, 1, 2, 1, 0], [2, 1, 0, 1, 1, 1, 2, 1, 0, 1], [1, 2, 1, 1, 0, 1, 1, 0, 0, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0, 0, 1, 2, 1], [2, 1, 0, 1, 2, 1, 1, 2, 1, 2], [1, 0, 1, 2, 1, 1, 2, 1, 0, 1], [2, 1, 0, 1, 0, 0, 1, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n1 1 1\n0 1 1\n", "answer": "1 0 1\n1 1 2\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 853, "matrix": [[1, 0, 1], [1, 1, 1], [0, 1, 1]], "solution": [[1, 0, 1], [1, 1, 2], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0 1 0\n0 1 1 1 0 1\n1 1 1 0 0 1\n1 0 1 1 1 0\n1 0 1 0 1 1\n1 1 1 1 0 1\n", "answer": "0 0 1 0 1 0\n0 1 2 1 0 1\n1 1 1 0 0 1\n1 0 1 1 1 0\n1 0 1 0 1 1\n2 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 854, "matrix": [[0, 0, 1, 0, 1, 0], [0, 1, 1, 1, 0, 1], [1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1]], "solution": [[0, 0, 1, 0, 1, 0], [0, 1, 2, 1, 0, 1], [1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1], [2, 1, 2, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n1 1 1\n1 1 1\n", "answer": "1 0 1\n2 1 2\n3 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 855, "matrix": [[1, 0, 1], [1, 1, 1], [1, 1, 1]], "solution": [[1, 0, 1], [2, 1, 2], [3, 2, 3]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1 1 0\n0 1 1 1 1 1 0 1 1\n1 0 1 1 0 1 0 1 1\n1 1 1 1 1 1 0 0 0\n0 1 1 0 1 1 0 0 1\n1 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 0 1 1\n1 1 0 1 0 1 1 1 1\n1 0 1 1 1 0 0 1 1\n", "answer": "1 0 1 1 0 1 1 1 0\n0 1 2 2 1 1 0 1 1\n1 0 1 1 0 1 0 1 1\n1 1 2 1 1 1 0 0 0\n0 1 1 0 1 1 0 0 1\n1 2 2 1 1 2 1 1 2\n2 2 1 1 0 1 0 1 2\n2 1 0 1 0 1 1 2 3\n1 0 1 2 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 856, "matrix": [[1, 0, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 1, 1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0, 1, 1]], "solution": [[1, 0, 1, 1, 0, 1, 1, 1, 0], [0, 1, 2, 2, 1, 1, 0, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 2, 1, 1, 1, 0, 0, 0], [0, 1, 1, 0, 1, 1, 0, 0, 1], [1, 2, 2, 1, 1, 2, 1, 1, 2], [2, 2, 1, 1, 0, 1, 0, 1, 2], [2, 1, 0, 1, 0, 1, 1, 2, 3], [1, 0, 1, 2, 1, 0, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0\n0 1 1 1 0\n1 1 1 0 0\n1 1 1 0 0\n0 1 1 1 0\n", "answer": "0 1 1 0 0\n0 1 2 1 0\n1 2 1 0 0\n1 2 1 0 0\n0 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 857, "matrix": [[0, 1, 1, 0, 0], [0, 1, 1, 1, 0], [1, 1, 1, 0, 0], [1, 1, 1, 0, 0], [0, 1, 1, 1, 0]], "solution": [[0, 1, 1, 0, 0], [0, 1, 2, 1, 0], [1, 2, 1, 0, 0], [1, 2, 1, 0, 0], [0, 1, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1\n1 1 0 0 1 0\n1 1 0 1 1 1\n1 0 1 1 1 1\n1 0 0 0 1 1\n0 0 0 0 1 1\n", "answer": "0 1 0 1 2 1\n1 1 0 0 1 0\n2 1 0 1 2 1\n1 0 1 1 2 2\n1 0 0 0 1 2\n0 0 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 858, "matrix": [[0, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 0], [1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1], [0, 0, 0, 0, 1, 1]], "solution": [[0, 1, 0, 1, 2, 1], [1, 1, 0, 0, 1, 0], [2, 1, 0, 1, 2, 1], [1, 0, 1, 1, 2, 2], [1, 0, 0, 0, 1, 2], [0, 0, 0, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 1 1 1 0\n1 0 1 1 1 1 1 0 0\n0 1 1 1 1 1 1 0 1\n1 1 0 1 1 1 1 1 1\n0 1 0 1 1 1 1 1 1\n1 1 1 0 1 1 1 1 1\n0 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 1 1\n1 1 0 1 0 1 1 1 1\n", "answer": "2 1 0 0 1 2 2 1 0\n1 0 1 1 2 2 1 0 0\n0 1 1 2 3 2 1 0 1\n1 1 0 1 2 3 2 1 2\n0 1 0 1 2 3 3 2 2\n1 2 1 0 1 2 3 2 1\n0 1 2 1 2 3 2 1 0\n1 2 1 2 1 2 3 2 1\n2 1 0 1 0 1 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 859, "matrix": [[1, 1, 0, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1]], "solution": [[2, 1, 0, 0, 1, 2, 2, 1, 0], [1, 0, 1, 1, 2, 2, 1, 0, 0], [0, 1, 1, 2, 3, 2, 1, 0, 1], [1, 1, 0, 1, 2, 3, 2, 1, 2], [0, 1, 0, 1, 2, 3, 3, 2, 2], [1, 2, 1, 0, 1, 2, 3, 2, 1], [0, 1, 2, 1, 2, 3, 2, 1, 0], [1, 2, 1, 2, 1, 2, 3, 2, 1], [2, 1, 0, 1, 0, 1, 2, 3, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 0 1 1 1 1 1\n1 0 1 0 0 1 1\n0 0 1 1 0 1 1\n1 1 1 1 1 1 1\n1 1 1 0 1 0 1\n0 0 0 1 1 1 1\n", "answer": "2 1 2 2 2 3 4\n1 0 1 1 1 2 3\n1 0 1 0 0 1 2\n0 0 1 1 0 1 2\n1 1 2 1 1 1 2\n1 1 1 0 1 0 1\n0 0 0 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 860, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 0, 0, 1, 1], [0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1], [0, 0, 0, 1, 1, 1, 1]], "solution": [[2, 1, 2, 2, 2, 3, 4], [1, 0, 1, 1, 1, 2, 3], [1, 0, 1, 0, 0, 1, 2], [0, 0, 1, 1, 0, 1, 2], [1, 1, 2, 1, 1, 1, 2], [1, 1, 1, 0, 1, 0, 1], [0, 0, 0, 1, 2, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 0 1\n0 0 1\n", "answer": "2 1 2\n1 0 1\n0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 861, "matrix": [[1, 1, 1], [1, 0, 1], [0, 0, 1]], "solution": [[2, 1, 2], [1, 0, 1], [0, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 0\n1 1 1 1 0 1 1\n0 1 1 1 0 1 1\n0 0 1 0 1 0 1\n1 0 1 1 1 1 0\n1 1 1 1 1 0 1\n1 1 0 1 1 1 1\n", "answer": "2 2 1 0 1 0 0\n1 2 2 1 0 1 1\n0 1 2 1 0 1 2\n0 0 1 0 1 0 1\n1 0 1 1 2 1 0\n2 1 1 2 1 0 1\n2 1 0 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 862, "matrix": [[1, 1, 1, 0, 1, 0, 0], [1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1], [0, 0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1]], "solution": [[2, 2, 1, 0, 1, 0, 0], [1, 2, 2, 1, 0, 1, 1], [0, 1, 2, 1, 0, 1, 2], [0, 0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 2, 1, 0], [2, 1, 1, 2, 1, 0, 1], [2, 1, 0, 1, 2, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1\n1 0 1 1 1 1 1 1\n0 1 1 1 1 0 1 1\n0 0 0 1 0 1 1 1\n0 1 1 1 1 1 0 1\n1 1 1 1 0 1 1 1\n1 1 1 1 1 0 1 1\n1 1 0 1 1 0 1 1\n", "answer": "2 1 0 1 2 2 3 4\n1 0 1 2 2 1 2 3\n0 1 1 2 1 0 1 2\n0 0 0 1 0 1 1 2\n0 1 1 2 1 1 0 1\n1 2 2 1 0 1 1 2\n2 2 1 2 1 0 1 2\n2 1 0 1 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 863, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1]], "solution": [[2, 1, 0, 1, 2, 2, 3, 4], [1, 0, 1, 2, 2, 1, 2, 3], [0, 1, 1, 2, 1, 0, 1, 2], [0, 0, 0, 1, 0, 1, 1, 2], [0, 1, 1, 2, 1, 1, 0, 1], [1, 2, 2, 1, 0, 1, 1, 2], [2, 2, 1, 2, 1, 0, 1, 2], [2, 1, 0, 1, 1, 0, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 0 1\n1 1 1\n", "answer": "2 1 2\n1 0 1\n2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 864, "matrix": [[1, 1, 1], [1, 0, 1], [1, 1, 1]], "solution": [[2, 1, 2], [1, 0, 1], [2, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1 1\n0 0 1 0 1 1 1 0 1\n1 1 1 1 0 1 1 1 0\n0 1 1 0 0 1 0 1 1\n0 1 1 1 0 1 1 0 0\n1 0 1 0 1 1 0 1 0\n1 0 1 1 1 0 1 1 1\n0 1 1 0 0 0 1 1 0\n0 1 1 1 1 1 1 1 1\n", "answer": "1 1 2 1 0 1 2 1 2\n0 0 1 0 1 2 1 0 1\n1 1 2 1 0 1 1 1 0\n0 1 1 0 0 1 0 1 1\n0 1 2 1 0 1 1 0 0\n1 0 1 0 1 1 0 1 0\n1 0 1 1 1 0 1 2 1\n0 1 1 0 0 0 1 1 0\n0 1 2 1 1 1 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 865, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 0, 0, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 1, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 1, 2, 1, 0, 1, 2, 1, 2], [0, 0, 1, 0, 1, 2, 1, 0, 1], [1, 1, 2, 1, 0, 1, 1, 1, 0], [0, 1, 1, 0, 0, 1, 0, 1, 1], [0, 1, 2, 1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 1, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0, 1, 2, 1], [0, 1, 1, 0, 0, 0, 1, 1, 0], [0, 1, 2, 1, 1, 1, 2, 2, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 1 1\n1 1 0\n", "answer": "0 1 0\n1 2 1\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 866, "matrix": [[0, 1, 0], [1, 1, 1], [1, 1, 0]], "solution": [[0, 1, 0], [1, 2, 1], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0\n1 1 1 1 0 1\n0 1 1 1 0 1\n1 0 1 0 0 1\n1 1 1 1 1 1\n0 0 0 0 0 1\n", "answer": "0 1 2 2 1 0\n1 2 2 1 0 1\n0 1 2 1 0 1\n1 0 1 0 0 1\n1 1 1 1 1 2\n0 0 0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 867, "matrix": [[0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1], [1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1]], "solution": [[0, 1, 2, 2, 1, 0], [1, 2, 2, 1, 0, 1], [0, 1, 2, 1, 0, 1], [1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 1, 2], [0, 0, 0, 0, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 0 1 1 1\n1 1 0 1 1 1 1 1 1 1\n1 1 1 1 0 0 1 1 1 0\n1 1 1 1 1 1 1 1 1 1\n1 0 1 1 1 1 0 1 1 1\n0 0 1 1 1 0 0 0 1 0\n0 0 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 1 1 0\n1 1 1 1 1 1 1 1 1 0\n1 1 0 1 1 1 0 1 1 1\n", "answer": "3 2 1 0 1 0 0 1 2 2\n2 1 0 1 1 1 1 2 2 1\n3 2 1 1 0 0 1 2 1 0\n2 1 2 2 1 1 1 2 2 1\n1 0 1 2 2 1 0 1 2 1\n0 0 1 2 1 0 0 0 1 0\n0 0 1 2 1 1 1 1 2 1\n1 1 2 1 0 1 2 2 1 0\n2 2 1 2 1 2 1 2 1 0\n2 1 0 1 2 1 0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 868, "matrix": [[1, 1, 1, 0, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [0, 0, 1, 1, 1, 0, 0, 0, 1, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 0, 1, 1, 1]], "solution": [[3, 2, 1, 0, 1, 0, 0, 1, 2, 2], [2, 1, 0, 1, 1, 1, 1, 2, 2, 1], [3, 2, 1, 1, 0, 0, 1, 2, 1, 0], [2, 1, 2, 2, 1, 1, 1, 2, 2, 1], [1, 0, 1, 2, 2, 1, 0, 1, 2, 1], [0, 0, 1, 2, 1, 0, 0, 0, 1, 0], [0, 0, 1, 2, 1, 1, 1, 1, 2, 1], [1, 1, 2, 1, 0, 1, 2, 2, 1, 0], [2, 2, 1, 2, 1, 2, 1, 2, 1, 0], [2, 1, 0, 1, 2, 1, 0, 1, 2, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 0 0 0\n0 1 1 1 1 1 1 1 1 0\n1 1 0 1 1 1 1 0 1 1\n1 1 1 1 0 1 1 0 1 1\n1 1 0 1 1 1 1 1 1 0\n1 1 1 0 0 0 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n0 0 0 1 1 0 0 1 1 1\n1 1 1 0 1 0 1 1 1 1\n0 0 1 1 1 1 0 1 1 1\n", "answer": "1 2 2 3 2 1 0 0 0 0\n0 1 1 2 2 2 1 1 1 0\n1 1 0 1 1 2 1 0 1 1\n2 2 1 1 0 1 1 0 1 1\n2 1 0 1 1 1 2 1 1 0\n2 2 1 0 0 0 1 2 2 1\n1 1 1 1 1 1 1 2 3 2\n0 0 0 1 1 0 0 1 2 3\n1 1 1 0 1 0 1 2 3 4\n0 0 1 1 2 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 869, "matrix": [[1, 1, 1, 1, 1, 1, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 0, 1, 1, 1]], "solution": [[1, 2, 2, 3, 2, 1, 0, 0, 0, 0], [0, 1, 1, 2, 2, 2, 1, 1, 1, 0], [1, 1, 0, 1, 1, 2, 1, 0, 1, 1], [2, 2, 1, 1, 0, 1, 1, 0, 1, 1], [2, 1, 0, 1, 1, 1, 2, 1, 1, 0], [2, 2, 1, 0, 0, 0, 1, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 2, 3, 2], [0, 0, 0, 1, 1, 0, 0, 1, 2, 3], [1, 1, 1, 0, 1, 0, 1, 2, 3, 4], [0, 0, 1, 1, 2, 1, 0, 1, 2, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 1 1\n1 1 1 1 0 0 1\n0 1 1 1 1 1 0\n0 1 1 0 1 0 0\n1 0 1 1 1 0 1\n1 1 0 0 0 1 1\n0 1 1 1 1 1 1\n", "answer": "0 1 1 0 1 1 2\n1 2 2 1 0 0 1\n0 1 2 1 1 1 0\n0 1 1 0 1 0 0\n1 0 1 1 1 0 1\n1 1 0 0 0 1 2\n0 1 1 1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 870, "matrix": [[0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1, 0], [0, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 0, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 1, 0, 1, 1, 2], [1, 2, 2, 1, 0, 0, 1], [0, 1, 2, 1, 1, 1, 0], [0, 1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 0, 0, 1, 2], [0, 1, 1, 1, 1, 2, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1\n1 1 1 0\n0 1 1 1\n0 1 1 1\n", "answer": "0 1 2 1\n1 2 1 0\n0 1 2 1\n0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 871, "matrix": [[0, 1, 1, 1], [1, 1, 1, 0], [0, 1, 1, 1], [0, 1, 1, 1]], "solution": [[0, 1, 2, 1], [1, 2, 1, 0], [0, 1, 2, 1], [0, 1, 2, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0\n0 1 1\n1 1 1\n", "answer": "1 0 0\n0 1 1\n1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 872, "matrix": [[1, 0, 0], [0, 1, 1], [1, 1, 1]], "solution": [[1, 0, 0], [0, 1, 1], [1, 2, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1\n1 0 0 0 0\n1 0 1 1 1\n1 0 0 1 0\n1 0 1 1 0\n", "answer": "0 1 0 1 1\n1 0 0 0 0\n1 0 1 1 1\n1 0 0 1 0\n1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 873, "matrix": [[0, 1, 0, 1, 1], [1, 0, 0, 0, 0], [1, 0, 1, 1, 1], [1, 0, 0, 1, 0], [1, 0, 1, 1, 0]], "solution": [[0, 1, 0, 1, 1], [1, 0, 0, 0, 0], [1, 0, 1, 1, 1], [1, 0, 0, 1, 0], [1, 0, 1, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1\n1 0 1 1 1 0\n1 0 0 1 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n0 0 1 1 1 1\n", "answer": "2 1 0 1 2 1\n1 0 1 2 1 0\n1 0 0 1 2 1\n2 1 1 2 3 2\n1 1 2 3 4 3\n0 0 1 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 874, "matrix": [[1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 2, 1], [1, 0, 1, 2, 1, 0], [1, 0, 0, 1, 2, 1], [2, 1, 1, 2, 3, 2], [1, 1, 2, 3, 4, 3], [0, 0, 1, 2, 3, 4]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 1 0 1\n1 1 1 1\n0 1 1 1\n", "answer": "3 2 1 2\n2 1 0 1\n1 2 1 2\n0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 875, "matrix": [[1, 1, 1, 1], [1, 1, 0, 1], [1, 1, 1, 1], [0, 1, 1, 1]], "solution": [[3, 2, 1, 2], [2, 1, 0, 1], [1, 2, 1, 2], [0, 1, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 0 0 1 1 1 1\n1 1 1 0 1 1 0 0 0 0\n1 1 1 1 1 0 1 0 0 1\n0 1 1 1 1 1 1 1 1 1\n1 0 1 0 1 1 1 1 0 1\n1 0 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n0 1 1 1 0 1 1 1 1 1\n1 1 1 1 1 0 0 1 0 0\n", "answer": "4 4 3 2 1 1 2 2 2 2\n3 3 2 1 0 0 1 1 1 1\n2 2 1 0 1 1 0 0 0 0\n1 2 2 1 1 0 1 0 0 1\n0 1 2 1 2 1 2 1 1 2\n1 0 1 0 1 2 2 1 0 1\n1 0 1 1 2 3 3 2 1 2\n1 1 2 2 1 2 2 3 2 2\n0 1 2 1 0 1 1 2 1 1\n1 2 3 2 1 0 0 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 876, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1, 0, 0]], "solution": [[4, 4, 3, 2, 1, 1, 2, 2, 2, 2], [3, 3, 2, 1, 0, 0, 1, 1, 1, 1], [2, 2, 1, 0, 1, 1, 0, 0, 0, 0], [1, 2, 2, 1, 1, 0, 1, 0, 0, 1], [0, 1, 2, 1, 2, 1, 2, 1, 1, 2], [1, 0, 1, 0, 1, 2, 2, 1, 0, 1], [1, 0, 1, 1, 2, 3, 3, 2, 1, 2], [1, 1, 2, 2, 1, 2, 2, 3, 2, 2], [0, 1, 2, 1, 0, 1, 1, 2, 1, 1], [1, 2, 3, 2, 1, 0, 0, 1, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 0\n0 1 1 1 1 0 1\n1 0 0 1 1 1 1\n1 0 1 1 1 1 1\n0 0 0 1 1 0 0\n0 1 1 0 1 1 0\n1 1 1 1 1 1 0\n", "answer": "1 2 2 2 1 0 0\n0 1 1 2 1 0 1\n1 0 0 1 2 1 2\n1 0 1 2 2 1 1\n0 0 0 1 1 0 0\n0 1 1 0 1 1 0\n1 2 2 1 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 877, "matrix": [[1, 1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0]], "solution": [[1, 2, 2, 2, 1, 0, 0], [0, 1, 1, 2, 1, 0, 1], [1, 0, 0, 1, 2, 1, 2], [1, 0, 1, 2, 2, 1, 1], [0, 0, 0, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 0], [1, 2, 2, 1, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0 1 0 1 1 0\n0 1 1 0 1 0 0 1\n1 0 0 0 1 1 1 1\n1 0 1 1 0 1 1 1\n0 1 0 0 1 1 1 0\n1 1 1 1 0 1 1 1\n1 1 0 0 0 1 1 0\n1 1 1 1 1 0 1 1\n", "answer": "0 0 0 1 0 1 1 0\n0 1 1 0 1 0 0 1\n1 0 0 0 1 1 1 2\n1 0 1 1 0 1 2 1\n0 1 0 0 1 2 1 0\n1 2 1 1 0 1 2 1\n2 1 0 0 0 1 1 0\n3 2 1 1 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 878, "matrix": [[0, 0, 0, 1, 0, 1, 1, 0], [0, 1, 1, 0, 1, 0, 0, 1], [1, 0, 0, 0, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 1], [0, 1, 0, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[0, 0, 0, 1, 0, 1, 1, 0], [0, 1, 1, 0, 1, 0, 0, 1], [1, 0, 0, 0, 1, 1, 1, 2], [1, 0, 1, 1, 0, 1, 2, 1], [0, 1, 0, 0, 1, 2, 1, 0], [1, 2, 1, 1, 0, 1, 2, 1], [2, 1, 0, 0, 0, 1, 1, 0], [3, 2, 1, 1, 1, 0, 1, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0 0\n1 1 0 1 0 1 1 1\n1 0 1 1 1 1 1 1\n0 1 1 1 1 1 0 1\n1 1 1 0 1 1 1 1\n1 1 0 1 1 1 1 1\n1 1 0 0 1 1 1 1\n1 0 1 0 1 1 0 0\n", "answer": "3 2 1 1 0 1 0 0\n2 1 0 1 0 1 1 1\n1 0 1 2 1 2 1 2\n0 1 2 1 2 1 0 1\n1 2 1 0 1 2 1 2\n2 1 0 1 2 3 2 2\n2 1 0 0 1 2 1 1\n1 0 1 0 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 879, "matrix": [[1, 1, 1, 1, 0, 1, 0, 0], [1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0, 0]], "solution": [[3, 2, 1, 1, 0, 1, 0, 0], [2, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 2, 1, 2, 1, 2], [0, 1, 2, 1, 2, 1, 0, 1], [1, 2, 1, 0, 1, 2, 1, 2], [2, 1, 0, 1, 2, 3, 2, 2], [2, 1, 0, 0, 1, 2, 1, 1], [1, 0, 1, 0, 1, 1, 0, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n1 1 1\n1 1 1\n", "answer": "2 1 0\n3 2 1\n4 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 880, "matrix": [[1, 1, 0], [1, 1, 1], [1, 1, 1]], "solution": [[2, 1, 0], [3, 2, 1], [4, 3, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0 0 1 0 1 1 0\n1 0 1 1 0 0 1 1 1 1\n1 0 0 1 1 1 1 1 1 0\n1 1 1 0 1 0 0 1 1 1\n1 1 0 1 1 0 1 0 1 1\n1 1 1 1 1 1 1 1 1 0\n1 1 0 0 1 1 0 1 1 1\n0 1 1 1 1 1 1 1 0 0\n1 0 1 1 1 1 0 0 0 1\n0 1 1 1 1 0 0 1 1 1\n", "answer": "0 0 1 0 0 1 0 1 1 0\n1 0 1 1 0 0 1 2 2 1\n1 0 0 1 1 1 1 2 1 0\n2 1 1 0 1 0 0 1 2 1\n2 1 0 1 1 0 1 0 1 1\n2 2 1 1 2 1 1 1 1 0\n1 1 0 0 1 1 0 1 1 1\n0 1 1 1 2 2 1 1 0 0\n1 0 1 2 2 1 0 0 0 1\n0 1 2 2 1 0 0 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 881, "matrix": [[0, 0, 1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 0, 0, 0, 1], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1]], "solution": [[0, 0, 1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 2, 2, 1], [1, 0, 0, 1, 1, 1, 1, 2, 1, 0], [2, 1, 1, 0, 1, 0, 0, 1, 2, 1], [2, 1, 0, 1, 1, 0, 1, 0, 1, 1], [2, 2, 1, 1, 2, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 2, 2, 1, 1, 0, 0], [1, 0, 1, 2, 2, 1, 0, 0, 0, 1], [0, 1, 2, 2, 1, 0, 0, 1, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 1 1\n1 1 1 0 1 0 1 0\n0 1 1 1 1 1 1 1\n0 0 1 1 0 1 1 1\n1 1 1 0 1 1 1 0\n0 1 1 1 1 0 1 1\n0 1 0 1 1 1 1 1\n1 1 1 0 1 0 0 1\n", "answer": "2 2 1 0 1 0 1 1\n1 2 1 0 1 0 1 0\n0 1 2 1 1 1 2 1\n0 0 1 1 0 1 2 1\n1 1 1 0 1 1 1 0\n0 1 1 1 1 0 1 1\n0 1 0 1 2 1 1 2\n1 2 1 0 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 882, "matrix": [[1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1]], "solution": [[2, 2, 1, 0, 1, 0, 1, 1], [1, 2, 1, 0, 1, 0, 1, 0], [0, 1, 2, 1, 1, 1, 2, 1], [0, 0, 1, 1, 0, 1, 2, 1], [1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 2, 1, 1, 2], [1, 2, 1, 0, 1, 0, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1\n1 1 1 1\n1 0 0 1\n1 0 1 0\n", "answer": "0 1 2 3\n1 1 1 2\n1 0 0 1\n1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 883, "matrix": [[0, 1, 1, 1], [1, 1, 1, 1], [1, 0, 0, 1], [1, 0, 1, 0]], "solution": [[0, 1, 2, 3], [1, 1, 1, 2], [1, 0, 0, 1], [1, 0, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 0 0 0 1\n1 1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 0 1 1\n1 1 1 0 0 1 1 0 1\n1 1 1 0 1 1 1 1 1\n1 1 0 0 1 1 0 1 1\n1 1 1 1 0 0 1 0 1\n0 0 1 1 1 1 1 1 1\n", "answer": "1 0 1 1 0 0 0 0 1\n2 1 0 1 1 1 1 1 1\n3 2 1 2 2 2 1 1 0\n4 3 2 1 1 1 0 1 1\n3 2 1 0 0 1 1 0 1\n3 2 1 0 1 2 1 1 2\n2 1 0 0 1 1 0 1 2\n1 1 1 1 0 0 1 0 1\n0 0 1 2 1 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 884, "matrix": [[1, 0, 1, 1, 0, 0, 0, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 1, 0, 0, 0, 0, 1], [2, 1, 0, 1, 1, 1, 1, 1, 1], [3, 2, 1, 2, 2, 2, 1, 1, 0], [4, 3, 2, 1, 1, 1, 0, 1, 1], [3, 2, 1, 0, 0, 1, 1, 0, 1], [3, 2, 1, 0, 1, 2, 1, 1, 2], [2, 1, 0, 0, 1, 1, 0, 1, 2], [1, 1, 1, 1, 0, 0, 1, 0, 1], [0, 0, 1, 2, 1, 1, 2, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0\n0 0 0 0 0\n1 1 1 0 0\n1 1 1 1 1\n1 1 0 0 1\n", "answer": "0 0 1 1 0\n0 0 0 0 0\n1 1 1 0 0\n2 2 1 1 1\n2 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 885, "matrix": [[0, 0, 1, 1, 0], [0, 0, 0, 0, 0], [1, 1, 1, 0, 0], [1, 1, 1, 1, 1], [1, 1, 0, 0, 1]], "solution": [[0, 0, 1, 1, 0], [0, 0, 0, 0, 0], [1, 1, 1, 0, 0], [2, 2, 1, 1, 1], [2, 1, 0, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 1 1\n1 1 1 1 1 1 1\n1 0 1 1 0 1 1\n1 0 1 0 1 0 0\n0 1 1 0 1 1 1\n0 0 1 0 1 1 1\n1 1 1 1 0 1 1\n", "answer": "0 1 1 0 1 2 3\n1 1 2 1 1 2 2\n1 0 1 1 0 1 1\n1 0 1 0 1 0 0\n0 1 1 0 1 1 1\n0 0 1 0 1 2 2\n1 1 2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 886, "matrix": [[0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [0, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1]], "solution": [[0, 1, 1, 0, 1, 2, 3], [1, 1, 2, 1, 1, 2, 2], [1, 0, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1, 1], [0, 0, 1, 0, 1, 2, 2], [1, 1, 2, 1, 0, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1\n0 1 1 0 1 1\n1 1 1 1 1 0\n1 1 0 1 1 1\n1 1 1 1 0 0\n1 0 1 1 0 1\n", "answer": "1 0 1 1 2 2\n0 1 1 0 1 1\n1 2 1 1 1 0\n2 1 0 1 1 1\n2 1 1 1 0 0\n1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 887, "matrix": [[1, 0, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1]], "solution": [[1, 0, 1, 1, 2, 2], [0, 1, 1, 0, 1, 1], [1, 2, 1, 1, 1, 0], [2, 1, 0, 1, 1, 1], [2, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0\n1 1 1 1\n1 1 1 0\n1 1 1 1\n", "answer": "0 0 1 0\n1 1 2 1\n2 2 1 0\n3 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 888, "matrix": [[0, 0, 1, 0], [1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1]], "solution": [[0, 0, 1, 0], [1, 1, 2, 1], [2, 2, 1, 0], [3, 3, 2, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 0 1 1 1\n1 0 1 1 1 1 1 1 1\n1 0 0 0 1 1 1 0 1\n0 1 1 1 1 0 1 0 1\n1 1 0 1 1 1 1 1 1\n0 1 1 1 0 1 1 1 1\n1 1 0 1 1 1 1 1 1\n1 1 0 1 1 1 1 0 0\n1 1 1 1 1 1 1 1 1\n", "answer": "1 0 0 1 1 0 1 2 3\n1 0 1 1 2 1 2 1 2\n1 0 0 0 1 1 1 0 1\n0 1 1 1 1 0 1 0 1\n1 1 0 1 1 1 2 1 2\n0 1 1 1 0 1 2 2 2\n1 1 0 1 1 2 2 1 1\n2 1 0 1 2 2 1 0 0\n3 2 1 2 3 3 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 889, "matrix": [[1, 0, 0, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 0, 0, 1, 1, 0, 1, 2, 3], [1, 0, 1, 1, 2, 1, 2, 1, 2], [1, 0, 0, 0, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 0, 1, 1, 1, 2, 1, 2], [0, 1, 1, 1, 0, 1, 2, 2, 2], [1, 1, 0, 1, 1, 2, 2, 1, 1], [2, 1, 0, 1, 2, 2, 1, 0, 0], [3, 2, 1, 2, 3, 3, 2, 1, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n1 1 1 0\n1 0 1 1\n1 0 1 1\n", "answer": "1 0 1 1\n2 1 1 0\n1 0 1 1\n1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 890, "matrix": [[1, 0, 1, 1], [1, 1, 1, 0], [1, 0, 1, 1], [1, 0, 1, 1]], "solution": [[1, 0, 1, 1], [2, 1, 1, 0], [1, 0, 1, 1], [1, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1\n0 1 1 1 0\n1 0 1 1 1\n1 0 0 0 0\n1 1 1 1 0\n", "answer": "0 1 2 2 1\n0 1 2 1 0\n1 0 1 1 1\n1 0 0 0 0\n2 1 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 891, "matrix": [[0, 1, 1, 1, 1], [0, 1, 1, 1, 0], [1, 0, 1, 1, 1], [1, 0, 0, 0, 0], [1, 1, 1, 1, 0]], "solution": [[0, 1, 2, 2, 1], [0, 1, 2, 1, 0], [1, 0, 1, 1, 1], [1, 0, 0, 0, 0], [2, 1, 1, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 0 1 1 1 0\n0 1 0 1 1 1 1 1 1 1\n1 1 0 1 1 0 1 1 1 1\n1 1 1 1 1 1 0 1 1 1\n0 1 1 1 1 1 1 1 1 0\n1 1 0 1 0 1 1 1 1 1\n0 1 1 1 1 1 1 1 1 0\n1 1 1 0 1 1 1 1 1 0\n1 1 1 1 1 1 1 0 0 1\n0 0 1 0 1 1 0 0 0 0\n", "answer": "1 2 1 1 0 0 1 2 1 0\n0 1 0 1 1 1 2 3 2 1\n1 1 0 1 1 0 1 2 3 2\n1 2 1 2 2 1 0 1 2 1\n0 1 1 2 1 2 1 2 1 0\n1 1 0 1 0 1 2 3 2 1\n0 1 1 1 1 2 3 2 1 0\n1 2 1 0 1 2 2 1 1 0\n1 1 2 1 2 2 1 0 0 1\n0 0 1 0 1 1 0 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 892, "matrix": [[1, 1, 1, 1, 0, 0, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 0, 1], [0, 0, 1, 0, 1, 1, 0, 0, 0, 0]], "solution": [[1, 2, 1, 1, 0, 0, 1, 2, 1, 0], [0, 1, 0, 1, 1, 1, 2, 3, 2, 1], [1, 1, 0, 1, 1, 0, 1, 2, 3, 2], [1, 2, 1, 2, 2, 1, 0, 1, 2, 1], [0, 1, 1, 2, 1, 2, 1, 2, 1, 0], [1, 1, 0, 1, 0, 1, 2, 3, 2, 1], [0, 1, 1, 1, 1, 2, 3, 2, 1, 0], [1, 2, 1, 0, 1, 2, 2, 1, 1, 0], [1, 1, 2, 1, 2, 2, 1, 0, 0, 1], [0, 0, 1, 0, 1, 1, 0, 0, 0, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 1 0\n1 1 1 1 1 1 1 0 1 1\n0 1 1 1 1 1 1 0 1 0\n0 0 1 0 1 1 1 0 1 1\n1 1 1 0 0 1 1 1 1 1\n1 0 1 1 1 1 1 1 0 0\n1 1 0 1 1 1 0 1 1 0\n1 1 0 1 1 1 1 1 1 1\n0 1 1 1 1 1 0 0 1 1\n", "answer": "3 4 5 4 3 2 1 0 1 1\n2 3 4 3 4 3 2 1 1 0\n1 2 3 2 3 2 1 0 1 1\n0 1 2 1 2 2 1 0 1 0\n0 0 1 0 1 2 1 0 1 1\n1 1 1 0 0 1 2 1 1 1\n1 0 1 1 1 2 1 1 0 0\n2 1 0 1 2 1 0 1 1 0\n1 1 0 1 2 2 1 1 2 1\n0 1 1 2 2 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 893, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 0, 1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 0, 1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 0, 1, 1]], "solution": [[3, 4, 5, 4, 3, 2, 1, 0, 1, 1], [2, 3, 4, 3, 4, 3, 2, 1, 1, 0], [1, 2, 3, 2, 3, 2, 1, 0, 1, 1], [0, 1, 2, 1, 2, 2, 1, 0, 1, 0], [0, 0, 1, 0, 1, 2, 1, 0, 1, 1], [1, 1, 1, 0, 0, 1, 2, 1, 1, 1], [1, 0, 1, 1, 1, 2, 1, 1, 0, 0], [2, 1, 0, 1, 2, 1, 0, 1, 1, 0], [1, 1, 0, 1, 2, 2, 1, 1, 2, 1], [0, 1, 1, 2, 2, 1, 0, 0, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0\n1 0 1 1 1\n1 1 0 1 1\n1 1 0 1 1\n1 1 1 1 1\n", "answer": "2 1 0 1 0\n1 0 1 2 1\n2 1 0 1 2\n2 1 0 1 2\n3 2 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 894, "matrix": [[1, 1, 0, 1, 0], [1, 0, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 0], [1, 0, 1, 2, 1], [2, 1, 0, 1, 2], [2, 1, 0, 1, 2], [3, 2, 1, 2, 3]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0\n1 0 1 1 0\n0 1 1 1 1\n1 0 1 1 1\n1 0 1 1 1\n", "answer": "0 1 2 1 0\n1 0 1 1 0\n0 1 2 2 1\n1 0 1 2 2\n1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 895, "matrix": [[0, 1, 1, 1, 0], [1, 0, 1, 1, 0], [0, 1, 1, 1, 1], [1, 0, 1, 1, 1], [1, 0, 1, 1, 1]], "solution": [[0, 1, 2, 1, 0], [1, 0, 1, 1, 0], [0, 1, 2, 2, 1], [1, 0, 1, 2, 2], [1, 0, 1, 2, 3]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1 0\n0 1 1 1 0 1 1 1 1 1\n1 1 0 0 0 1 1 1 1 1\n1 1 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 0 1 0 1\n1 1 1 1 1 1 0 1 1 1\n1 1 1 1 1 0 1 0 0 1\n1 1 1 1 1 0 1 1 1 0\n1 0 0 1 1 1 0 1 1 1\n", "answer": "1 2 2 2 1 2 3 2 1 0\n0 1 1 1 0 1 2 2 2 1\n1 1 0 0 0 1 2 1 2 2\n2 2 1 1 1 2 1 0 1 2\n3 3 2 2 2 1 1 1 1 2\n4 4 3 2 1 0 0 1 0 1\n4 3 3 3 2 1 0 1 1 2\n3 2 2 2 1 0 1 0 0 1\n2 1 1 2 1 0 1 1 1 0\n1 0 0 1 2 1 0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 896, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 0, 1, 1, 1]], "solution": [[1, 2, 2, 2, 1, 2, 3, 2, 1, 0], [0, 1, 1, 1, 0, 1, 2, 2, 2, 1], [1, 1, 0, 0, 0, 1, 2, 1, 2, 2], [2, 2, 1, 1, 1, 2, 1, 0, 1, 2], [3, 3, 2, 2, 2, 1, 1, 1, 1, 2], [4, 4, 3, 2, 1, 0, 0, 1, 0, 1], [4, 3, 3, 3, 2, 1, 0, 1, 1, 2], [3, 2, 2, 2, 1, 0, 1, 0, 0, 1], [2, 1, 1, 2, 1, 0, 1, 1, 1, 0], [1, 0, 0, 1, 2, 1, 0, 1, 2, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0\n1 1 0 1\n1 0 1 1\n1 1 1 0\n", "answer": "1 0 1 0\n2 1 0 1\n1 0 1 1\n2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 897, "matrix": [[1, 0, 1, 0], [1, 1, 0, 1], [1, 0, 1, 1], [1, 1, 1, 0]], "solution": [[1, 0, 1, 0], [2, 1, 0, 1], [1, 0, 1, 1], [2, 1, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 1 1\n1 1 0 1 1 0 1 1\n1 1 1 0 1 1 1 0\n0 1 1 1 0 1 1 1\n0 0 0 1 1 0 1 1\n1 0 1 0 1 0 1 1\n0 1 1 1 0 0 0 1\n1 1 1 1 1 1 1 1\n", "answer": "3 2 1 1 0 1 2 2\n2 1 0 1 1 0 1 1\n1 2 1 0 1 1 1 0\n0 1 1 1 0 1 2 1\n0 0 0 1 1 0 1 2\n1 0 1 0 1 0 1 2\n0 1 2 1 0 0 0 1\n1 2 3 2 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 898, "matrix": [[1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 1], [0, 0, 0, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[3, 2, 1, 1, 0, 1, 2, 2], [2, 1, 0, 1, 1, 0, 1, 1], [1, 2, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 2, 1], [0, 0, 0, 1, 1, 0, 1, 2], [1, 0, 1, 0, 1, 0, 1, 2], [0, 1, 2, 1, 0, 0, 0, 1], [1, 2, 3, 2, 1, 1, 1, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 0 1 1\n1 1 1 1 0 1 1 1\n0 1 1 0 1 1 1 0\n1 1 0 1 1 0 1 1\n1 1 0 0 1 1 1 1\n1 1 1 1 1 1 1 1\n1 1 1 0 1 0 0 1\n1 1 1 1 0 1 0 1\n", "answer": "1 0 0 1 1 0 1 2\n1 1 1 1 0 1 2 1\n0 1 1 0 1 1 1 0\n1 1 0 1 1 0 1 1\n2 1 0 0 1 1 2 2\n3 2 1 1 2 1 1 2\n3 2 1 0 1 0 0 1\n4 3 2 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 899, "matrix": [[1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 0, 1, 0, 1]], "solution": [[1, 0, 0, 1, 1, 0, 1, 2], [1, 1, 1, 1, 0, 1, 2, 1], [0, 1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 1, 1, 0, 1, 1], [2, 1, 0, 0, 1, 1, 2, 2], [3, 2, 1, 1, 2, 1, 1, 2], [3, 2, 1, 0, 1, 0, 0, 1], [4, 3, 2, 1, 0, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 1 0 0 0\n0 0 1 1 0 1 1 1 1\n1 1 1 1 0 1 1 1 1\n0 1 1 1 1 1 1 1 0\n1 0 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 1 1\n1 1 1 0 1 1 0 1 1\n1 1 1 0 1 0 1 1 1\n1 0 1 1 0 0 1 1 1\n", "answer": "1 0 1 0 1 1 0 0 0\n0 0 1 1 0 1 1 1 1\n1 1 2 1 0 1 2 2 1\n0 1 2 2 1 2 2 1 0\n1 0 1 2 2 3 2 2 1\n1 0 1 1 2 2 1 2 2\n2 1 1 0 1 1 0 1 2\n2 1 1 0 1 0 1 2 3\n1 0 1 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 900, "matrix": [[1, 0, 1, 0, 1, 1, 0, 0, 0], [0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 0, 1, 1, 1]], "solution": [[1, 0, 1, 0, 1, 1, 0, 0, 0], [0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 2, 1, 0, 1, 2, 2, 1], [0, 1, 2, 2, 1, 2, 2, 1, 0], [1, 0, 1, 2, 2, 3, 2, 2, 1], [1, 0, 1, 1, 2, 2, 1, 2, 2], [2, 1, 1, 0, 1, 1, 0, 1, 2], [2, 1, 1, 0, 1, 0, 1, 2, 3], [1, 0, 1, 1, 0, 0, 1, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 1 0\n1 1 1 1 0 0\n1 1 0 1 0 1\n0 0 1 0 1 0\n1 1 1 1 0 1\n1 1 0 1 1 0\n", "answer": "1 0 0 1 1 0\n2 1 1 1 0 0\n1 1 0 1 0 1\n0 0 1 0 1 0\n1 1 1 1 0 1\n2 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 901, "matrix": [[1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 0, 0], [1, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0]], "solution": [[1, 0, 0, 1, 1, 0], [2, 1, 1, 1, 0, 0], [1, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1], [2, 1, 0, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 0 1\n0 1 1\n", "answer": "2 1 2\n1 0 1\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 902, "matrix": [[1, 1, 1], [1, 0, 1], [0, 1, 1]], "solution": [[2, 1, 2], [1, 0, 1], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0 1 1 0 0\n0 0 1 1 1 1 1 1 0\n1 1 0 1 1 1 1 1 0\n1 1 1 0 1 1 0 1 0\n0 0 1 1 1 0 1 1 1\n1 1 0 1 0 1 1 0 1\n1 1 1 1 1 1 1 0 1\n0 1 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 0 0\n", "answer": "1 0 1 1 0 1 1 0 0\n0 0 1 2 1 2 2 1 0\n1 1 0 1 2 2 1 1 0\n1 1 1 0 1 1 0 1 0\n0 0 1 1 1 0 1 1 1\n1 1 0 1 0 1 1 0 1\n1 2 1 2 1 2 1 0 1\n0 1 1 2 2 3 2 1 1\n1 1 0 1 2 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 903, "matrix": [[1, 0, 1, 1, 0, 1, 1, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 0, 1, 0], [0, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0, 0]], "solution": [[1, 0, 1, 1, 0, 1, 1, 0, 0], [0, 0, 1, 2, 1, 2, 2, 1, 0], [1, 1, 0, 1, 2, 2, 1, 1, 0], [1, 1, 1, 0, 1, 1, 0, 1, 0], [0, 0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0, 1], [1, 2, 1, 2, 1, 2, 1, 0, 1], [0, 1, 1, 2, 2, 3, 2, 1, 1], [1, 1, 0, 1, 2, 2, 1, 0, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n1 0 1\n0 1 1\n", "answer": "1 0 1\n1 0 1\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 904, "matrix": [[1, 0, 1], [1, 0, 1], [0, 1, 1]], "solution": [[1, 0, 1], [1, 0, 1], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 0 0\n1 1 1 1 1 1\n1 1 1 1 0 0\n1 1 1 1 1 1\n0 1 1 1 1 1\n0 1 1 1 0 1\n", "answer": "3 2 1 0 0 0\n3 3 2 1 1 1\n2 3 2 1 0 0\n1 2 3 2 1 1\n0 1 2 2 1 2\n0 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 905, "matrix": [[1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1]], "solution": [[3, 2, 1, 0, 0, 0], [3, 3, 2, 1, 1, 1], [2, 3, 2, 1, 0, 0], [1, 2, 3, 2, 1, 1], [0, 1, 2, 2, 1, 2], [0, 1, 2, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 0 1\n1 1 1 1 1 1 1 0\n1 1 1 1 1 0 0 0\n1 1 1 1 0 1 1 1\n0 1 0 1 1 1 1 0\n0 0 1 1 0 1 0 1\n0 0 1 0 1 0 1 1\n0 1 1 1 1 1 1 1\n", "answer": "2 1 0 1 2 1 0 1\n3 2 1 2 2 1 1 0\n2 3 2 2 1 0 0 0\n1 2 1 1 0 1 1 1\n0 1 0 1 1 2 1 0\n0 0 1 1 0 1 0 1\n0 0 1 0 1 0 1 2\n0 1 2 1 2 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 906, "matrix": [[1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 0], [0, 0, 1, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 1, 2, 1, 0, 1], [3, 2, 1, 2, 2, 1, 1, 0], [2, 3, 2, 2, 1, 0, 0, 0], [1, 2, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 1, 2, 1, 0], [0, 0, 1, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0, 1, 2], [0, 1, 2, 1, 2, 1, 2, 3]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 1\n1 1 1 1 1 1 0 1\n0 1 1 1 1 0 1 0\n1 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1\n0 1 1 1 1 1 1 0\n0 1 0 1 1 1 1 0\n", "answer": "0 1 2 1 2 3 2 3\n1 2 1 0 1 2 1 2\n1 2 2 1 2 1 0 1\n0 1 2 2 1 0 1 0\n1 2 3 3 2 1 2 1\n1 2 2 2 1 0 1 1\n0 1 1 2 2 1 1 0\n0 1 0 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 907, "matrix": [[0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0]], "solution": [[0, 1, 2, 1, 2, 3, 2, 3], [1, 2, 1, 0, 1, 2, 1, 2], [1, 2, 2, 1, 2, 1, 0, 1], [0, 1, 2, 2, 1, 0, 1, 0], [1, 2, 3, 3, 2, 1, 2, 1], [1, 2, 2, 2, 1, 0, 1, 1], [0, 1, 1, 2, 2, 1, 1, 0], [0, 1, 0, 1, 2, 2, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 0 1\n1 0 0 1 1 1\n1 1 0 1 1 1\n1 0 1 1 1 1\n0 0 1 1 1 1\n1 1 1 1 1 0\n", "answer": "0 1 1 0 0 1\n1 0 0 1 1 2\n2 1 0 1 2 3\n1 0 1 2 3 2\n0 0 1 2 2 1\n1 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 908, "matrix": [[0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 2], [2, 1, 0, 1, 2, 3], [1, 0, 1, 2, 3, 2], [0, 0, 1, 2, 2, 1], [1, 1, 2, 2, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 0\n0 0 0 1 0\n1 1 1 0 1\n1 1 0 1 1\n1 0 1 1 0\n", "answer": "0 1 1 1 0\n0 0 0 1 0\n1 1 1 0 1\n2 1 0 1 1\n1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 909, "matrix": [[0, 1, 1, 1, 0], [0, 0, 0, 1, 0], [1, 1, 1, 0, 1], [1, 1, 0, 1, 1], [1, 0, 1, 1, 0]], "solution": [[0, 1, 1, 1, 0], [0, 0, 0, 1, 0], [1, 1, 1, 0, 1], [2, 1, 0, 1, 1], [1, 0, 1, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 0 0 1\n1 0 0 1\n0 0 1 1\n", "answer": "2 1 1 2\n1 0 0 1\n1 0 0 1\n0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 910, "matrix": [[1, 1, 1, 1], [1, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 1]], "solution": [[2, 1, 1, 2], [1, 0, 0, 1], [1, 0, 0, 1], [0, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n1 0 1\n1 0 0\n", "answer": "2 1 0\n1 0 1\n1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 911, "matrix": [[1, 1, 0], [1, 0, 1], [1, 0, 0]], "solution": [[2, 1, 0], [1, 0, 1], [1, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0\n1 0 1 1 1\n0 0 0 0 1\n1 1 1 1 1\n1 1 0 1 1\n", "answer": "2 1 2 1 0\n1 0 1 1 1\n0 0 0 0 1\n1 1 1 1 2\n2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 912, "matrix": [[1, 1, 1, 1, 0], [1, 0, 1, 1, 1], [0, 0, 0, 0, 1], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1]], "solution": [[2, 1, 2, 1, 0], [1, 0, 1, 1, 1], [0, 0, 0, 0, 1], [1, 1, 1, 1, 2], [2, 1, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 1 1 0 1\n1 1 1 1 0 0 1 1 0\n1 1 1 1 1 0 1 0 1\n1 1 0 1 0 1 1 1 1\n1 0 0 1 1 0 1 0 1\n1 0 0 1 0 1 1 1 0\n0 0 1 1 1 1 0 0 1\n1 0 1 0 0 1 0 0 1\n1 1 1 1 1 0 0 1 0\n", "answer": "0 0 1 1 0 1 1 0 1\n1 1 2 1 0 0 1 1 0\n2 2 1 2 1 0 1 0 1\n2 1 0 1 0 1 2 1 2\n1 0 0 1 1 0 1 0 1\n1 0 0 1 0 1 1 1 0\n0 0 1 1 1 1 0 0 1\n1 0 1 0 0 1 0 0 1\n2 1 2 1 1 0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 913, "matrix": [[0, 0, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 0, 1, 0, 1], [1, 0, 0, 1, 0, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 0, 0, 1, 0, 0, 1], [1, 1, 1, 1, 1, 0, 0, 1, 0]], "solution": [[0, 0, 1, 1, 0, 1, 1, 0, 1], [1, 1, 2, 1, 0, 0, 1, 1, 0], [2, 2, 1, 2, 1, 0, 1, 0, 1], [2, 1, 0, 1, 0, 1, 2, 1, 2], [1, 0, 0, 1, 1, 0, 1, 0, 1], [1, 0, 0, 1, 0, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 0, 0, 1, 0, 0, 1], [2, 1, 2, 1, 1, 0, 0, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 0 1 1 1\n0 1 1 0 1 1 1 1 1\n1 1 1 1 0 1 0 1 0\n1 1 1 1 1 1 0 1 1\n1 0 1 0 1 1 1 0 1\n1 1 1 1 1 0 1 1 1\n1 1 1 1 0 0 1 1 1\n1 1 1 1 0 1 1 1 0\n1 1 1 1 1 1 1 1 1\n", "answer": "1 1 0 1 1 0 1 2 2\n0 1 1 0 1 1 1 2 1\n1 2 2 1 0 1 0 1 0\n2 1 2 1 1 1 0 1 1\n1 0 1 0 1 1 1 0 1\n2 1 2 1 1 0 1 1 2\n3 2 2 1 0 0 1 2 1\n4 3 2 1 0 1 2 1 0\n5 4 3 2 1 2 3 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 914, "matrix": [[1, 1, 0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 1, 0, 1, 1, 0, 1, 2, 2], [0, 1, 1, 0, 1, 1, 1, 2, 1], [1, 2, 2, 1, 0, 1, 0, 1, 0], [2, 1, 2, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 1, 1, 0, 1], [2, 1, 2, 1, 1, 0, 1, 1, 2], [3, 2, 2, 1, 0, 0, 1, 2, 1], [4, 3, 2, 1, 0, 1, 2, 1, 0], [5, 4, 3, 2, 1, 2, 3, 2, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0 1 1\n1 1 1 0 1 0 1 1 0 0\n1 0 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 1 1 1\n1 1 0 1 1 0 1 1 1 1\n1 0 1 1 1 0 0 1 0 1\n1 1 1 1 1 0 1 1 0 1\n1 1 1 1 1 1 1 0 1 1\n1 1 1 0 1 1 0 1 1 1\n1 1 1 1 1 0 0 1 1 1\n", "answer": "3 2 2 1 2 1 1 0 1 1\n2 1 1 0 1 0 1 1 0 0\n1 0 1 1 2 1 2 2 1 1\n2 1 1 0 1 1 2 3 2 2\n2 1 0 1 1 0 1 2 1 2\n1 0 1 2 1 0 0 1 0 1\n2 1 2 2 1 0 1 1 0 1\n3 2 2 1 2 1 1 0 1 2\n3 2 1 0 1 1 0 1 2 3\n4 3 2 1 1 0 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 915, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1, 1, 1]], "solution": [[3, 2, 2, 1, 2, 1, 1, 0, 1, 1], [2, 1, 1, 0, 1, 0, 1, 1, 0, 0], [1, 0, 1, 1, 2, 1, 2, 2, 1, 1], [2, 1, 1, 0, 1, 1, 2, 3, 2, 2], [2, 1, 0, 1, 1, 0, 1, 2, 1, 2], [1, 0, 1, 2, 1, 0, 0, 1, 0, 1], [2, 1, 2, 2, 1, 0, 1, 1, 0, 1], [3, 2, 2, 1, 2, 1, 1, 0, 1, 2], [3, 2, 1, 0, 1, 1, 0, 1, 2, 3], [4, 3, 2, 1, 1, 0, 0, 1, 2, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0\n1 1 1 0 1 1 1 0\n1 0 1 1 0 1 1 1\n1 1 1 1 0 0 1 1\n0 1 0 1 1 1 0 0\n0 0 1 0 0 1 1 1\n1 1 1 0 1 1 1 1\n0 1 0 0 1 1 1 1\n", "answer": "3 2 2 1 2 2 1 0\n2 1 1 0 1 2 1 0\n1 0 1 1 0 1 2 1\n1 1 1 1 0 0 1 1\n0 1 0 1 1 1 0 0\n0 0 1 0 0 1 1 1\n1 1 1 0 1 2 2 2\n0 1 0 0 1 2 3 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 916, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1], [0, 1, 0, 1, 1, 1, 0, 0], [0, 0, 1, 0, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 0, 0, 1, 1, 1, 1]], "solution": [[3, 2, 2, 1, 2, 2, 1, 0], [2, 1, 1, 0, 1, 2, 1, 0], [1, 0, 1, 1, 0, 1, 2, 1], [1, 1, 1, 1, 0, 0, 1, 1], [0, 1, 0, 1, 1, 1, 0, 0], [0, 0, 1, 0, 0, 1, 1, 1], [1, 1, 1, 0, 1, 2, 2, 2], [0, 1, 0, 0, 1, 2, 3, 3]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0 1 1\n0 1 1 1 0 1 0 1 1 0\n1 1 1 1 1 1 1 0 0 1\n1 0 1 1 1 0 1 1 0 1\n1 0 0 1 1 0 0 1 1 1\n1 0 1 0 1 1 1 1 1 1\n0 0 0 1 1 0 0 1 0 1\n0 1 0 0 1 1 1 1 0 1\n1 1 1 1 0 0 1 1 1 1\n1 1 1 1 1 1 0 1 1 1\n", "answer": "1 2 3 2 1 2 1 0 1 1\n0 1 2 1 0 1 0 1 1 0\n1 1 2 2 1 1 1 0 0 1\n1 0 1 2 1 0 1 1 0 1\n1 0 0 1 1 0 0 1 1 2\n1 0 1 0 1 1 1 2 1 2\n0 0 0 1 1 0 0 1 0 1\n0 1 0 0 1 1 1 1 0 1\n1 2 1 1 0 0 1 2 1 2\n2 3 2 2 1 1 0 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 917, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 1, 0, 0, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 0, 0, 1, 0, 1], [0, 1, 0, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1]], "solution": [[1, 2, 3, 2, 1, 2, 1, 0, 1, 1], [0, 1, 2, 1, 0, 1, 0, 1, 1, 0], [1, 1, 2, 2, 1, 1, 1, 0, 0, 1], [1, 0, 1, 2, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 1, 0, 0, 1, 1, 2], [1, 0, 1, 0, 1, 1, 1, 2, 1, 2], [0, 0, 0, 1, 1, 0, 0, 1, 0, 1], [0, 1, 0, 0, 1, 1, 1, 1, 0, 1], [1, 2, 1, 1, 0, 0, 1, 2, 1, 2], [2, 3, 2, 2, 1, 1, 0, 1, 2, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1 1\n0 1 1 0 1 0 1 1 1\n1 1 1 1 0 0 1 1 0\n0 0 1 0 0 1 1 0 0\n1 1 1 1 1 0 1 0 1\n0 1 0 1 0 1 1 1 0\n1 1 1 1 1 1 1 1 1\n0 0 0 1 1 1 1 1 1\n0 1 1 1 1 1 1 0 0\n", "answer": "1 1 0 1 2 1 2 3 2\n0 1 1 0 1 0 1 2 1\n1 1 2 1 0 0 1 1 0\n0 0 1 0 0 1 1 0 0\n1 1 1 1 1 0 1 0 1\n0 1 0 1 0 1 2 1 0\n1 1 1 2 1 2 3 2 1\n0 0 0 1 2 3 2 1 1\n0 1 1 2 3 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 918, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 0, 1, 0, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0, 0]], "solution": [[1, 1, 0, 1, 2, 1, 2, 3, 2], [0, 1, 1, 0, 1, 0, 1, 2, 1], [1, 1, 2, 1, 0, 0, 1, 1, 0], [0, 0, 1, 0, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 2, 1, 0], [1, 1, 1, 2, 1, 2, 3, 2, 1], [0, 0, 0, 1, 2, 3, 2, 1, 1], [0, 1, 1, 2, 3, 2, 1, 0, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 0 1\n1 0 1\n", "answer": "0 1 0\n1 0 1\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 919, "matrix": [[0, 1, 0], [1, 0, 1], [1, 0, 1]], "solution": [[0, 1, 0], [1, 0, 1], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 1 1 1 1 1 1\n0 1 1 0 1 0 1\n1 1 1 1 1 1 0\n1 1 1 0 1 1 0\n1 1 0 1 1 0 1\n1 1 1 1 1 1 1\n", "answer": "2 3 3 2 3 2 3\n1 2 2 1 2 1 2\n0 1 1 0 1 0 1\n1 2 2 1 2 1 0\n2 2 1 0 1 1 0\n2 1 0 1 1 0 1\n3 2 1 2 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 920, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 3, 3, 2, 3, 2, 3], [1, 2, 2, 1, 2, 1, 2], [0, 1, 1, 0, 1, 0, 1], [1, 2, 2, 1, 2, 1, 0], [2, 2, 1, 0, 1, 1, 0], [2, 1, 0, 1, 1, 0, 1], [3, 2, 1, 2, 2, 1, 2]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1\n1 1 1 0 0 1 1\n1 1 1 0 1 1 1\n1 1 1 1 1 1 0\n0 1 1 1 1 1 1\n1 0 1 1 1 1 1\n1 0 1 1 1 1 1\n", "answer": "1 0 1 1 1 2 3\n2 1 1 0 0 1 2\n2 2 1 0 1 2 1\n1 2 2 1 2 1 0\n0 1 2 2 3 2 1\n1 0 1 2 3 3 2\n1 0 1 2 3 4 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 921, "matrix": [[1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 1, 1, 2, 3], [2, 1, 1, 0, 0, 1, 2], [2, 2, 1, 0, 1, 2, 1], [1, 2, 2, 1, 2, 1, 0], [0, 1, 2, 2, 3, 2, 1], [1, 0, 1, 2, 3, 3, 2], [1, 0, 1, 2, 3, 4, 3]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 0\n0 1 1 1 0 1 1 1 1\n1 1 0 1 1 1 1 1 1\n1 1 1 0 1 0 0 1 1\n1 1 0 1 0 1 1 0 1\n0 1 1 1 1 0 1 0 1\n1 1 1 0 1 1 0 1 1\n1 0 0 1 0 1 0 0 1\n1 1 1 0 0 1 1 1 1\n", "answer": "1 2 2 2 1 2 2 1 0\n0 1 1 1 0 1 2 2 1\n1 1 0 1 1 1 1 2 2\n2 2 1 0 1 0 0 1 2\n1 1 0 1 0 1 1 0 1\n0 1 1 1 1 0 1 0 1\n1 1 1 0 1 1 0 1 2\n1 0 0 1 0 1 0 0 1\n2 1 1 0 0 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 922, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1, 1], [1, 0, 0, 1, 0, 1, 0, 0, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1]], "solution": [[1, 2, 2, 2, 1, 2, 2, 1, 0], [0, 1, 1, 1, 0, 1, 2, 2, 1], [1, 1, 0, 1, 1, 1, 1, 2, 2], [2, 2, 1, 0, 1, 0, 0, 1, 2], [1, 1, 0, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1], [1, 1, 1, 0, 1, 1, 0, 1, 2], [1, 0, 0, 1, 0, 1, 0, 0, 1], [2, 1, 1, 0, 0, 1, 1, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1\n1 1 1 1 1 1\n1 0 1 1 0 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 0 1 0 1 1\n", "answer": "2 1 0 1 2 3\n2 1 1 2 1 2\n1 0 1 1 0 1\n2 1 2 2 1 2\n2 1 2 1 2 3\n1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 923, "matrix": [[1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 1]], "solution": [[2, 1, 0, 1, 2, 3], [2, 1, 1, 2, 1, 2], [1, 0, 1, 1, 0, 1], [2, 1, 2, 2, 1, 2], [2, 1, 2, 1, 2, 3], [1, 0, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 1\n0 1 1\n", "answer": "2 3 4\n1 2 3\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 924, "matrix": [[1, 1, 1], [1, 1, 1], [0, 1, 1]], "solution": [[2, 3, 4], [1, 2, 3], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1\n1 1 1 1\n1 1 1 1\n0 0 0 1\n", "answer": "0 0 1 2\n1 1 2 3\n1 1 1 2\n0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 925, "matrix": [[0, 0, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [0, 0, 0, 1]], "solution": [[0, 0, 1, 2], [1, 1, 2, 3], [1, 1, 1, 2], [0, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1\n1 0 1 0\n1 1 1 1\n1 1 1 1\n", "answer": "1 0 1 1\n1 0 1 0\n2 1 2 1\n3 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 926, "matrix": [[1, 0, 1, 1], [1, 0, 1, 0], [1, 1, 1, 1], [1, 1, 1, 1]], "solution": [[1, 0, 1, 1], [1, 0, 1, 0], [2, 1, 2, 1], [3, 2, 3, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 1 1\n1 0 1 0 1 0 1 0 0\n1 0 1 1 1 0 0 1 0\n0 1 1 1 1 1 1 0 1\n1 1 1 1 1 0 1 1 1\n0 1 1 0 1 1 0 1 1\n1 1 1 1 0 0 1 0 1\n1 1 1 1 1 0 1 1 1\n1 1 1 0 1 1 1 1 1\n", "answer": "1 0 1 1 2 1 2 1 1\n1 0 1 0 1 0 1 0 0\n1 0 1 1 1 0 0 1 0\n0 1 2 2 2 1 1 0 1\n1 2 2 1 1 0 1 1 2\n0 1 1 0 1 1 0 1 2\n1 2 2 1 0 0 1 0 1\n2 3 2 1 1 0 1 1 2\n3 2 1 0 1 1 2 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 927, "matrix": [[1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 1, 2, 1, 2, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0, 0, 1, 0], [0, 1, 2, 2, 2, 1, 1, 0, 1], [1, 2, 2, 1, 1, 0, 1, 1, 2], [0, 1, 1, 0, 1, 1, 0, 1, 2], [1, 2, 2, 1, 0, 0, 1, 0, 1], [2, 3, 2, 1, 1, 0, 1, 1, 2], [3, 2, 1, 0, 1, 1, 2, 2, 3]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1 1 1\n1 0 1 0 1 1 0\n1 1 1 1 1 1 0\n0 0 0 1 0 1 1\n0 0 0 1 0 1 1\n0 0 0 1 1 1 1\n1 0 0 1 1 1 1\n", "answer": "0 1 1 0 1 2 1\n1 0 1 0 1 1 0\n1 1 1 1 1 1 0\n0 0 0 1 0 1 1\n0 0 0 1 0 1 2\n0 0 0 1 1 2 3\n1 0 0 1 2 3 4", "metadata": {"source_dataset": "binary_matrix", "source_index": 928, "matrix": [[0, 1, 1, 0, 1, 1, 1], [1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 1, 0, 1, 1], [0, 0, 0, 1, 0, 1, 1], [0, 0, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1, 1]], "solution": [[0, 1, 1, 0, 1, 2, 1], [1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 1, 0, 1, 1], [0, 0, 0, 1, 0, 1, 2], [0, 0, 0, 1, 1, 2, 3], [1, 0, 0, 1, 2, 3, 4]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 1 1\n0 1 1 1 1 1 1\n0 0 1 1 0 0 0\n1 0 0 1 1 1 1\n0 1 1 1 1 1 0\n1 0 0 1 1 0 1\n1 1 1 1 1 1 0\n", "answer": "0 0 1 1 0 1 2\n0 1 2 2 1 1 1\n0 0 1 1 0 0 0\n1 0 0 1 1 1 1\n0 1 1 2 2 1 0\n1 0 0 1 1 0 1\n2 1 1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 929, "matrix": [[0, 0, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 0, 0], [1, 0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0]], "solution": [[0, 0, 1, 1, 0, 1, 2], [0, 1, 2, 2, 1, 1, 1], [0, 0, 1, 1, 0, 0, 0], [1, 0, 0, 1, 1, 1, 1], [0, 1, 1, 2, 2, 1, 0], [1, 0, 0, 1, 1, 0, 1], [2, 1, 1, 2, 2, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n0 1 1 0\n1 1 0 0\n1 1 0 1\n", "answer": "1 1 0 1\n0 1 1 0\n1 1 0 0\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 930, "matrix": [[1, 1, 0, 1], [0, 1, 1, 0], [1, 1, 0, 0], [1, 1, 0, 1]], "solution": [[1, 1, 0, 1], [0, 1, 1, 0], [1, 1, 0, 0], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0\n1 1 1 1 1\n0 1 1 1 1\n1 1 1 0 1\n1 0 0 0 1\n", "answer": "2 3 2 1 0\n1 2 3 2 1\n0 1 2 1 2\n1 1 1 0 1\n1 0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 931, "matrix": [[1, 1, 1, 1, 0], [1, 1, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 1, 0, 1], [1, 0, 0, 0, 1]], "solution": [[2, 3, 2, 1, 0], [1, 2, 3, 2, 1], [0, 1, 2, 1, 2], [1, 1, 1, 0, 1], [1, 0, 0, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 0 1 1 1\n1 0 0 1 1 0 1 1\n1 1 1 0 1 0 0 1\n1 1 1 1 1 0 0 1\n1 1 1 1 1 1 1 1\n1 1 0 0 1 1 1 1\n0 0 1 1 1 1 1 1\n1 1 0 0 0 1 0 1\n", "answer": "0 0 1 1 0 1 2 3\n1 0 0 1 1 0 1 2\n2 1 1 0 1 0 0 1\n3 2 2 1 1 0 0 1\n2 2 1 1 2 1 1 2\n1 1 0 0 1 2 2 3\n0 0 1 1 1 2 1 2\n1 1 0 0 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 932, "matrix": [[0, 0, 1, 1, 0, 1, 1, 1], [1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1], [1, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 1]], "solution": [[0, 0, 1, 1, 0, 1, 2, 3], [1, 0, 0, 1, 1, 0, 1, 2], [2, 1, 1, 0, 1, 0, 0, 1], [3, 2, 2, 1, 1, 0, 0, 1], [2, 2, 1, 1, 2, 1, 1, 2], [1, 1, 0, 0, 1, 2, 2, 3], [0, 0, 1, 1, 1, 2, 1, 2], [1, 1, 0, 0, 0, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 0 1 0\n0 0 1 0 1 1 0 1 1 1\n1 1 0 1 1 1 1 1 1 0\n1 0 1 1 1 1 0 0 0 1\n0 1 1 1 0 0 1 0 1 1\n1 1 1 1 0 0 1 0 1 1\n0 1 1 1 1 1 1 1 1 1\n0 1 1 1 1 0 1 0 1 1\n0 0 0 1 0 0 0 0 0 1\n1 1 1 1 1 1 1 1 1 1\n", "answer": "1 1 2 1 2 2 1 0 1 0\n0 0 1 0 1 1 0 1 2 1\n1 1 0 1 2 2 1 1 1 0\n1 0 1 2 1 1 0 0 0 1\n0 1 2 1 0 0 1 0 1 2\n1 2 2 1 0 0 1 0 1 2\n0 1 2 2 1 1 2 1 2 3\n0 1 1 2 1 0 1 0 1 2\n0 0 0 1 0 0 0 0 0 1\n1 1 1 2 1 1 1 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 933, "matrix": [[1, 1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 0, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 0, 0, 0, 1], [0, 1, 1, 1, 0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 0, 0, 1, 0, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1, 1], [0, 0, 0, 1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 1, 2, 1, 2, 2, 1, 0, 1, 0], [0, 0, 1, 0, 1, 1, 0, 1, 2, 1], [1, 1, 0, 1, 2, 2, 1, 1, 1, 0], [1, 0, 1, 2, 1, 1, 0, 0, 0, 1], [0, 1, 2, 1, 0, 0, 1, 0, 1, 2], [1, 2, 2, 1, 0, 0, 1, 0, 1, 2], [0, 1, 2, 2, 1, 1, 2, 1, 2, 3], [0, 1, 1, 2, 1, 0, 1, 0, 1, 2], [0, 0, 0, 1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 2, 1, 1, 1, 1, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 0 1\n1 1 1 0 1 0 1 1\n1 1 1 1 1 1 1 1\n1 1 0 0 1 0 1 1\n1 1 1 0 1 0 1 1\n1 1 0 1 0 1 1 0\n1 1 1 0 1 1 1 1\n0 1 1 1 0 1 1 1\n", "answer": "0 1 0 1 2 1 0 1\n1 2 1 0 1 0 1 2\n2 2 1 1 2 1 2 3\n2 1 0 0 1 0 1 2\n3 2 1 0 1 0 1 1\n2 1 0 1 0 1 1 0\n1 2 1 0 1 2 2 1\n0 1 2 1 0 1 2 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 934, "matrix": [[0, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1]], "solution": [[0, 1, 0, 1, 2, 1, 0, 1], [1, 2, 1, 0, 1, 0, 1, 2], [2, 2, 1, 1, 2, 1, 2, 3], [2, 1, 0, 0, 1, 0, 1, 2], [3, 2, 1, 0, 1, 0, 1, 1], [2, 1, 0, 1, 0, 1, 1, 0], [1, 2, 1, 0, 1, 2, 2, 1], [0, 1, 2, 1, 0, 1, 2, 2]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n0 1 1\n0 1 1\n", "answer": "1 1 0\n0 1 1\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 935, "matrix": [[1, 1, 0], [0, 1, 1], [0, 1, 1]], "solution": [[1, 1, 0], [0, 1, 1], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1\n0 1 1 1 0\n1 1 1 1 0\n0 0 1 0 0\n1 0 1 1 1\n", "answer": "1 1 0 0 1\n0 1 1 1 0\n1 1 2 1 0\n0 0 1 0 0\n1 0 1 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 936, "matrix": [[1, 1, 0, 0, 1], [0, 1, 1, 1, 0], [1, 1, 1, 1, 0], [0, 0, 1, 0, 0], [1, 0, 1, 1, 1]], "solution": [[1, 1, 0, 0, 1], [0, 1, 1, 1, 0], [1, 1, 2, 1, 0], [0, 0, 1, 0, 0], [1, 0, 1, 1, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 0 1\n0 1 1 1 1 0 1 1 1 0\n0 1 1 0 1 0 1 1 1 1\n0 1 0 1 1 1 1 1 1 1\n0 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 0 1 0 0 1 1 0 0 1\n1 0 1 1 1 0 1 1 1 1\n1 1 1 1 1 1 0 0 1 0\n1 1 1 0 1 1 0 1 0 1\n", "answer": "1 2 3 2 2 1 2 1 0 1\n0 1 2 1 1 0 1 2 1 0\n0 1 1 0 1 0 1 2 2 1\n0 1 0 1 2 1 2 3 3 2\n0 1 1 2 2 2 3 2 2 3\n1 1 2 1 1 2 2 1 1 2\n1 0 1 0 0 1 1 0 0 1\n1 0 1 1 1 0 1 1 1 1\n2 1 2 1 2 1 0 0 1 0\n3 2 1 0 1 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 937, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 0, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 1, 1, 0, 1, 1, 0, 1, 0, 1]], "solution": [[1, 2, 3, 2, 2, 1, 2, 1, 0, 1], [0, 1, 2, 1, 1, 0, 1, 2, 1, 0], [0, 1, 1, 0, 1, 0, 1, 2, 2, 1], [0, 1, 0, 1, 2, 1, 2, 3, 3, 2], [0, 1, 1, 2, 2, 2, 3, 2, 2, 3], [1, 1, 2, 1, 1, 2, 2, 1, 1, 2], [1, 0, 1, 0, 0, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1], [2, 1, 2, 1, 2, 1, 0, 0, 1, 0], [3, 2, 1, 0, 1, 1, 0, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 1 1\n1 1 1 1 1 0 1 1 0\n1 1 1 0 1 1 1 0 0\n1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 0 1 1\n1 1 1 1 1 1 1 0 1\n1 1 0 1 1 1 1 1 0\n1 1 1 0 1 0 1 1 1\n1 1 1 1 1 1 1 1 1\n", "answer": "5 4 3 2 2 1 0 1 1\n4 3 2 1 1 0 1 1 0\n3 2 1 0 1 1 1 0 0\n4 3 2 1 2 2 1 1 1\n4 3 2 2 2 1 0 1 2\n3 2 1 2 3 2 1 0 1\n2 1 0 1 2 1 2 1 0\n3 2 1 0 1 0 1 2 1\n4 3 2 1 2 1 2 3 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 938, "matrix": [[1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[5, 4, 3, 2, 2, 1, 0, 1, 1], [4, 3, 2, 1, 1, 0, 1, 1, 0], [3, 2, 1, 0, 1, 1, 1, 0, 0], [4, 3, 2, 1, 2, 2, 1, 1, 1], [4, 3, 2, 2, 2, 1, 0, 1, 2], [3, 2, 1, 2, 3, 2, 1, 0, 1], [2, 1, 0, 1, 2, 1, 2, 1, 0], [3, 2, 1, 0, 1, 0, 1, 2, 1], [4, 3, 2, 1, 2, 1, 2, 3, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1\n1 1 1 1 1 0\n1 1 1 0 0 1\n0 0 1 1 1 0\n1 1 1 0 1 1\n1 0 0 1 1 0\n", "answer": "0 0 1 2 2 1\n1 1 2 1 1 0\n1 1 1 0 0 1\n0 0 1 1 1 0\n1 1 1 0 1 1\n1 0 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 939, "matrix": [[0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 1], [0, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 1, 0]], "solution": [[0, 0, 1, 2, 2, 1], [1, 1, 2, 1, 1, 0], [1, 1, 1, 0, 0, 1], [0, 0, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1], [1, 0, 0, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0\n1 0 0 1\n1 0 1 1\n1 0 1 0\n", "answer": "2 1 1 0\n1 0 0 1\n1 0 1 1\n1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 940, "matrix": [[1, 1, 1, 0], [1, 0, 0, 1], [1, 0, 1, 1], [1, 0, 1, 0]], "solution": [[2, 1, 1, 0], [1, 0, 0, 1], [1, 0, 1, 1], [1, 0, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 0 1 1 0 0 1 0\n1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0 1\n1 1 1 0 1 0 0 1 1\n1 1 1 0 0 1 1 1 1\n1 1 1 1 0 0 0 0 1\n1 1 1 1 1 0 1 0 1\n0 1 1 1 1 1 0 1 1\n0 1 1 1 1 0 1 0 1\n", "answer": "0 0 0 1 1 0 0 1 0\n1 1 1 2 2 1 1 1 1\n2 2 2 1 2 1 1 0 1\n3 2 1 0 1 0 0 1 2\n3 2 1 0 0 1 1 1 2\n2 3 2 1 0 0 0 0 1\n1 2 3 2 1 0 1 0 1\n0 1 2 3 2 1 0 1 2\n0 1 2 2 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 941, "matrix": [[0, 0, 0, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0, 0, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1]], "solution": [[0, 0, 0, 1, 1, 0, 0, 1, 0], [1, 1, 1, 2, 2, 1, 1, 1, 1], [2, 2, 2, 1, 2, 1, 1, 0, 1], [3, 2, 1, 0, 1, 0, 0, 1, 2], [3, 2, 1, 0, 0, 1, 1, 1, 2], [2, 3, 2, 1, 0, 0, 0, 0, 1], [1, 2, 3, 2, 1, 0, 1, 0, 1], [0, 1, 2, 3, 2, 1, 0, 1, 2], [0, 1, 2, 2, 1, 0, 1, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 0 1 1\n1 1 1 1\n0 0 1 1\n", "answer": "2 1 0 1\n1 0 1 2\n1 1 2 3\n0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 942, "matrix": [[1, 1, 0, 1], [1, 0, 1, 1], [1, 1, 1, 1], [0, 0, 1, 1]], "solution": [[2, 1, 0, 1], [1, 0, 1, 2], [1, 1, 2, 3], [0, 0, 1, 2]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 0 0 1\n0 1 1 0 1 1 1 0\n1 1 1 0 0 1 1 0\n0 1 1 0 1 0 1 0\n1 0 1 1 1 0 1 1\n0 1 1 0 1 1 0 0\n0 0 1 1 1 1 0 1\n0 1 0 0 1 0 0 1\n", "answer": "1 0 1 1 1 0 0 1\n0 1 1 0 1 1 1 0\n1 2 1 0 0 1 1 0\n0 1 1 0 1 0 1 0\n1 0 1 1 1 0 1 1\n0 1 1 0 1 1 0 0\n0 0 1 1 2 1 0 1\n0 1 0 0 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 943, "matrix": [[1, 0, 1, 1, 1, 0, 0, 1], [0, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 0, 1, 1, 0, 0], [0, 0, 1, 1, 1, 1, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1]], "solution": [[1, 0, 1, 1, 1, 0, 0, 1], [0, 1, 1, 0, 1, 1, 1, 0], [1, 2, 1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1], [0, 1, 1, 0, 1, 1, 0, 0], [0, 0, 1, 1, 2, 1, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 1 1 1\n1 0 0 1\n0 0 1 0\n", "answer": "3 2 2 3\n2 1 1 2\n1 0 0 1\n0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 944, "matrix": [[1, 1, 1, 1], [1, 1, 1, 1], [1, 0, 0, 1], [0, 0, 1, 0]], "solution": [[3, 2, 2, 3], [2, 1, 1, 2], [1, 0, 0, 1], [0, 0, 1, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n0 0 0\n1 0 1\n", "answer": "1 1 1\n0 0 0\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 945, "matrix": [[1, 1, 1], [0, 0, 0], [1, 0, 1]], "solution": [[1, 1, 1], [0, 0, 0], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1\n1 1 0 1 0 1 1\n1 1 1 1 1 1 1\n1 1 1 1 0 1 1\n0 0 1 1 1 1 1\n1 0 1 1 0 0 1\n1 1 1 1 1 1 0\n", "answer": "3 2 1 2 1 2 3\n2 1 0 1 0 1 2\n2 2 1 2 1 2 3\n1 1 2 1 0 1 2\n0 0 1 2 1 1 2\n1 0 1 1 0 0 1\n2 1 2 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 946, "matrix": [[1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1], [0, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 1, 1, 1, 0]], "solution": [[3, 2, 1, 2, 1, 2, 3], [2, 1, 0, 1, 0, 1, 2], [2, 2, 1, 2, 1, 2, 3], [1, 1, 2, 1, 0, 1, 2], [0, 0, 1, 2, 1, 1, 2], [1, 0, 1, 1, 0, 0, 1], [2, 1, 2, 2, 1, 1, 0]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1\n1 1 1 1\n1 1 1 1\n1 1 0 1\n", "answer": "0 1 2 3\n1 2 2 3\n2 2 1 2\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 947, "matrix": [[0, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 0, 1]], "solution": [[0, 1, 2, 3], [1, 2, 2, 3], [2, 2, 1, 2], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n1 1 1\n1 1 1\n", "answer": "1 0 1\n2 1 2\n3 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 948, "matrix": [[1, 0, 1], [1, 1, 1], [1, 1, 1]], "solution": [[1, 0, 1], [2, 1, 2], [3, 2, 3]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1\n0 1 1 1 1\n0 0 1 1 1\n0 1 1 1 0\n1 1 1 1 0\n", "answer": "0 1 0 1 2\n0 1 1 2 2\n0 0 1 2 1\n0 1 2 1 0\n1 2 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 949, "matrix": [[0, 1, 0, 1, 1], [0, 1, 1, 1, 1], [0, 0, 1, 1, 1], [0, 1, 1, 1, 0], [1, 1, 1, 1, 0]], "solution": [[0, 1, 0, 1, 2], [0, 1, 1, 2, 2], [0, 0, 1, 2, 1], [0, 1, 2, 1, 0], [1, 2, 2, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1 0\n1 1 1 0 1 1\n1 1 1 1 1 1\n1 1 1 1 1 1\n1 1 1 1 0 1\n0 0 1 0 1 1\n", "answer": "1 0 1 0 1 0\n2 1 1 0 1 1\n3 2 2 1 2 2\n2 2 3 2 1 2\n1 1 2 1 0 1\n0 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 950, "matrix": [[1, 0, 1, 0, 1, 0], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 1]], "solution": [[1, 0, 1, 0, 1, 0], [2, 1, 1, 0, 1, 1], [3, 2, 2, 1, 2, 2], [2, 2, 3, 2, 1, 2], [1, 1, 2, 1, 0, 1], [0, 0, 1, 0, 1, 2]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 0 1\n0 1 1\n", "answer": "2 1 2\n1 0 1\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 951, "matrix": [[1, 1, 1], [1, 0, 1], [0, 1, 1]], "solution": [[2, 1, 2], [1, 0, 1], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n0 1 0 1 1\n0 1 1 1 1\n1 0 1 1 1\n1 1 0 1 0\n", "answer": "1 2 1 2 3\n0 1 0 1 2\n0 1 1 2 2\n1 0 1 2 1\n2 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 952, "matrix": [[1, 1, 1, 1, 1], [0, 1, 0, 1, 1], [0, 1, 1, 1, 1], [1, 0, 1, 1, 1], [1, 1, 0, 1, 0]], "solution": [[1, 2, 1, 2, 3], [0, 1, 0, 1, 2], [0, 1, 1, 2, 2], [1, 0, 1, 2, 1], [2, 1, 0, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1\n0 0 1 1 0\n0 0 1 0 1\n1 0 1 1 1\n1 1 0 1 1\n", "answer": "1 1 2 2 1\n0 0 1 1 0\n0 0 1 0 1\n1 0 1 1 2\n2 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 953, "matrix": [[1, 1, 1, 1, 1], [0, 0, 1, 1, 0], [0, 0, 1, 0, 1], [1, 0, 1, 1, 1], [1, 1, 0, 1, 1]], "solution": [[1, 1, 2, 2, 1], [0, 0, 1, 1, 0], [0, 0, 1, 0, 1], [1, 0, 1, 1, 2], [2, 1, 0, 1, 2]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 0 1 1 1\n1 1 1 1 1 1 0 0 1 0\n1 0 1 0 1 0 0 1 1 1\n1 0 1 0 1 1 1 1 1 1\n1 0 1 1 1 1 1 1 1 1\n1 1 1 1 0 0 1 1 1 0\n1 0 1 1 1 1 1 1 0 0\n1 1 1 1 1 1 1 1 1 1\n1 0 1 1 1 1 1 0 1 1\n1 0 0 0 1 0 1 1 1 1\n", "answer": "0 0 1 2 2 1 0 1 2 1\n1 1 2 1 2 1 0 0 1 0\n1 0 1 0 1 0 0 1 2 1\n1 0 1 0 1 1 1 2 3 2\n1 0 1 1 1 1 2 3 2 1\n2 1 2 1 0 0 1 2 1 0\n1 0 1 2 1 1 2 1 0 0\n2 1 2 2 2 2 2 1 1 1\n1 0 1 1 2 1 1 0 1 2\n1 0 0 0 1 0 1 1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 954, "matrix": [[0, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1, 0], [1, 0, 1, 0, 1, 0, 0, 1, 1, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1, 0], [1, 0, 1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 0, 0, 1, 0, 1, 1, 1, 1]], "solution": [[0, 0, 1, 2, 2, 1, 0, 1, 2, 1], [1, 1, 2, 1, 2, 1, 0, 0, 1, 0], [1, 0, 1, 0, 1, 0, 0, 1, 2, 1], [1, 0, 1, 0, 1, 1, 1, 2, 3, 2], [1, 0, 1, 1, 1, 1, 2, 3, 2, 1], [2, 1, 2, 1, 0, 0, 1, 2, 1, 0], [1, 0, 1, 2, 1, 1, 2, 1, 0, 0], [2, 1, 2, 2, 2, 2, 2, 1, 1, 1], [1, 0, 1, 1, 2, 1, 1, 0, 1, 2], [1, 0, 0, 0, 1, 0, 1, 1, 2, 3]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 1 1 1\n1 0 1 1 1 0 1 1 1 1\n1 1 1 0 1 1 0 1 0 0\n1 1 1 0 0 1 1 0 1 1\n1 1 1 1 1 1 1 1 0 1\n1 1 0 1 0 1 1 1 1 0\n1 1 1 1 1 1 1 1 1 0\n0 1 1 1 1 0 1 1 0 1\n1 1 1 1 0 1 1 1 0 0\n1 0 0 1 0 1 1 1 0 1\n", "answer": "2 1 2 2 2 1 0 1 2 2\n1 0 1 1 1 0 1 2 1 1\n2 1 1 0 1 1 0 1 0 0\n3 2 1 0 0 1 1 0 1 1\n3 2 1 1 1 2 2 1 0 1\n2 1 0 1 0 1 2 2 1 0\n1 2 1 2 1 1 2 2 1 0\n0 1 2 2 1 0 1 1 0 1\n1 1 1 1 0 1 2 1 0 0\n1 0 0 1 0 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 955, "matrix": [[1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 0, 1, 0, 0], [1, 1, 1, 0, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0, 0], [1, 0, 0, 1, 0, 1, 1, 1, 0, 1]], "solution": [[2, 1, 2, 2, 2, 1, 0, 1, 2, 2], [1, 0, 1, 1, 1, 0, 1, 2, 1, 1], [2, 1, 1, 0, 1, 1, 0, 1, 0, 0], [3, 2, 1, 0, 0, 1, 1, 0, 1, 1], [3, 2, 1, 1, 1, 2, 2, 1, 0, 1], [2, 1, 0, 1, 0, 1, 2, 2, 1, 0], [1, 2, 1, 2, 1, 1, 2, 2, 1, 0], [0, 1, 2, 2, 1, 0, 1, 1, 0, 1], [1, 1, 1, 1, 0, 1, 2, 1, 0, 0], [1, 0, 0, 1, 0, 1, 2, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1\n1 1 1 1 1\n1 0 1 1 1\n0 1 1 0 0\n1 1 0 1 0\n", "answer": "1 0 1 2 3\n2 1 2 2 2\n1 0 1 1 1\n0 1 1 0 0\n1 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 956, "matrix": [[1, 0, 1, 1, 1], [1, 1, 1, 1, 1], [1, 0, 1, 1, 1], [0, 1, 1, 0, 0], [1, 1, 0, 1, 0]], "solution": [[1, 0, 1, 2, 3], [2, 1, 2, 2, 2], [1, 0, 1, 1, 1], [0, 1, 1, 0, 0], [1, 1, 0, 1, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 1 1 0\n1 1 1 1\n1 1 0 0\n", "answer": "4 3 2 1\n3 2 1 0\n3 2 1 1\n2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 957, "matrix": [[1, 1, 1, 1], [1, 1, 1, 0], [1, 1, 1, 1], [1, 1, 0, 0]], "solution": [[4, 3, 2, 1], [3, 2, 1, 0], [3, 2, 1, 1], [2, 1, 0, 0]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 0 1 1 1\n1 1 1 1 0 1 0 0 1\n0 1 0 1 0 0 0 1 1\n1 1 1 0 0 0 1 0 1\n1 1 1 1 1 0 1 1 1\n1 0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 0\n1 0 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 0\n", "answer": "0 1 2 2 1 0 1 1 2\n1 2 1 1 0 1 0 0 1\n0 1 0 1 0 0 0 1 2\n1 2 1 0 0 0 1 0 1\n2 1 2 1 1 0 1 1 2\n1 0 1 2 2 1 2 2 1\n2 1 1 2 3 2 2 1 0\n1 0 0 1 2 3 3 2 1\n2 1 1 2 3 3 2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 958, "matrix": [[0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 0, 1], [0, 1, 0, 1, 0, 0, 0, 1, 1], [1, 1, 1, 0, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0]], "solution": [[0, 1, 2, 2, 1, 0, 1, 1, 2], [1, 2, 1, 1, 0, 1, 0, 0, 1], [0, 1, 0, 1, 0, 0, 0, 1, 2], [1, 2, 1, 0, 0, 0, 1, 0, 1], [2, 1, 2, 1, 1, 0, 1, 1, 2], [1, 0, 1, 2, 2, 1, 2, 2, 1], [2, 1, 1, 2, 3, 2, 2, 1, 0], [1, 0, 0, 1, 2, 3, 3, 2, 1], [2, 1, 1, 2, 3, 3, 2, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n1 1 0\n1 1 0\n", "answer": "2 1 0\n2 1 0\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 959, "matrix": [[1, 1, 0], [1, 1, 0], [1, 1, 0]], "solution": [[2, 1, 0], [2, 1, 0], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 0 1 1 1 1\n0 1 1 1 0 1 0 1 1\n1 1 0 1 1 1 0 1 0\n1 1 0 1 1 1 0 0 1\n0 0 0 1 1 0 0 1 1\n1 1 1 0 1 1 1 1 1\n0 0 0 1 0 1 1 1 0\n1 0 1 1 0 0 1 0 1\n1 0 0 1 1 0 0 1 0\n", "answer": "1 1 0 1 0 1 1 2 2\n0 1 1 1 0 1 0 1 1\n1 1 0 1 1 1 0 1 0\n1 1 0 1 2 1 0 0 1\n0 0 0 1 1 0 0 1 2\n1 1 1 0 1 1 1 2 1\n0 0 0 1 0 1 2 1 0\n1 0 1 1 0 0 1 0 1\n1 0 0 1 1 0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 960, "matrix": [[1, 1, 0, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1, 0, 0, 1], [0, 0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1, 1, 0], [1, 0, 1, 1, 0, 0, 1, 0, 1], [1, 0, 0, 1, 1, 0, 0, 1, 0]], "solution": [[1, 1, 0, 1, 0, 1, 1, 2, 2], [0, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 0, 1, 1, 1, 0, 1, 0], [1, 1, 0, 1, 2, 1, 0, 0, 1], [0, 0, 0, 1, 1, 0, 0, 1, 2], [1, 1, 1, 0, 1, 1, 1, 2, 1], [0, 0, 0, 1, 0, 1, 2, 1, 0], [1, 0, 1, 1, 0, 0, 1, 0, 1], [1, 0, 0, 1, 1, 0, 0, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 1 1\n1 1 1 1 0 0 1 1 1 1\n1 1 1 1 0 1 1 1 0 1\n1 1 1 1 1 0 1 1 0 1\n0 1 1 0 1 1 1 1 1 1\n0 1 1 1 1 1 0 1 1 1\n1 1 1 1 1 0 1 0 1 1\n0 0 1 1 1 0 0 1 1 0\n0 1 1 0 1 0 1 1 0 1\n", "answer": "5 5 4 3 2 1 2 3 3 4\n4 4 3 2 1 0 1 2 2 3\n3 3 2 1 0 0 1 2 1 2\n2 3 2 1 0 1 2 1 0 1\n1 2 2 1 1 0 1 1 0 1\n0 1 1 0 1 1 1 2 1 2\n0 1 2 1 2 1 0 1 2 2\n1 1 2 2 1 0 1 0 1 1\n0 0 1 1 1 0 0 1 1 0\n0 1 1 0 1 0 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 961, "matrix": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 0, 1, 1], [0, 0, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 1, 0, 1, 1, 0, 1]], "solution": [[5, 5, 4, 3, 2, 1, 2, 3, 3, 4], [4, 4, 3, 2, 1, 0, 1, 2, 2, 3], [3, 3, 2, 1, 0, 0, 1, 2, 1, 2], [2, 3, 2, 1, 0, 1, 2, 1, 0, 1], [1, 2, 2, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 1, 2, 1, 2], [0, 1, 2, 1, 2, 1, 0, 1, 2, 2], [1, 1, 2, 2, 1, 0, 1, 0, 1, 1], [0, 0, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 1, 0, 1, 1, 0, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 1 0 1\n1 1 0 1 0 1 0 1 1\n0 0 1 0 1 1 1 1 1\n0 1 1 0 1 1 0 1 0\n1 1 1 0 0 1 1 1 1\n1 1 1 1 1 1 1 0 1\n1 1 0 1 1 0 1 1 1\n1 1 1 1 0 1 0 1 0\n", "answer": "0 1 2 1 2 3 2 1 2\n1 2 1 0 1 2 1 0 1\n1 1 0 1 0 1 0 1 2\n0 0 1 0 1 2 1 2 1\n0 1 1 0 1 1 0 1 0\n1 2 1 0 0 1 1 1 1\n2 2 1 1 1 1 1 0 1\n2 1 0 1 1 0 1 1 1\n3 2 1 1 0 1 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 962, "matrix": [[0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1, 0, 1, 1], [0, 0, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 0, 1, 0, 1, 0]], "solution": [[0, 1, 2, 1, 2, 3, 2, 1, 2], [1, 2, 1, 0, 1, 2, 1, 0, 1], [1, 1, 0, 1, 0, 1, 0, 1, 2], [0, 0, 1, 0, 1, 2, 1, 2, 1], [0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 2, 1, 0, 0, 1, 1, 1, 1], [2, 2, 1, 1, 1, 1, 1, 0, 1], [2, 1, 0, 1, 1, 0, 1, 1, 1], [3, 2, 1, 1, 0, 1, 0, 1, 0]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 0 1 1 1 1\n1 1 1 1 1 1 1 1 0 1\n1 0 0 1 1 1 1 1 0 0\n1 1 1 1 1 1 1 1 1 1\n0 0 0 1 1 0 1 1 1 1\n1 0 0 0 1 0 1 1 1 1\n0 1 0 0 1 1 0 1 0 1\n1 1 1 1 1 1 0 0 1 1\n1 1 1 1 0 1 1 1 0 0\n1 1 1 1 1 1 1 1 1 1\n", "answer": "3 2 2 2 1 0 1 2 1 2\n2 1 1 2 2 1 2 1 0 1\n1 0 0 1 2 2 2 1 0 0\n1 1 1 2 2 1 2 2 1 1\n0 0 0 1 1 0 1 2 2 2\n1 0 0 0 1 0 1 2 1 2\n0 1 0 0 1 1 0 1 0 1\n1 2 1 1 1 1 0 0 1 1\n2 3 2 1 0 1 1 1 0 0\n3 4 3 2 1 2 2 2 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 963, "matrix": [[1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 0, 1, 0, 1, 1, 1, 1], [0, 1, 0, 0, 1, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[3, 2, 2, 2, 1, 0, 1, 2, 1, 2], [2, 1, 1, 2, 2, 1, 2, 1, 0, 1], [1, 0, 0, 1, 2, 2, 2, 1, 0, 0], [1, 1, 1, 2, 2, 1, 2, 2, 1, 1], [0, 0, 0, 1, 1, 0, 1, 2, 2, 2], [1, 0, 0, 0, 1, 0, 1, 2, 1, 2], [0, 1, 0, 0, 1, 1, 0, 1, 0, 1], [1, 2, 1, 1, 1, 1, 0, 0, 1, 1], [2, 3, 2, 1, 0, 1, 1, 1, 0, 0], [3, 4, 3, 2, 1, 2, 2, 2, 1, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 0 1 1 0 1\n1 0 1 1 1 1 1 1\n0 1 1 1 0 0 1 0\n1 0 1 1 1 0 1 1\n1 1 1 1 1 0 1 1\n1 0 1 0 1 0 1 0\n1 1 1 1 1 1 0 1\n1 1 0 0 1 1 0 0\n", "answer": "0 0 1 0 1 1 0 1\n1 0 1 1 1 1 1 1\n0 1 2 1 0 0 1 0\n1 0 1 2 1 0 1 1\n2 1 2 1 1 0 1 1\n1 0 1 0 1 0 1 0\n2 1 1 1 2 1 0 1\n2 1 0 0 1 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 964, "matrix": [[0, 0, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 0, 0, 1, 0], [1, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 0, 1, 1, 0, 0]], "solution": [[0, 0, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1], [0, 1, 2, 1, 0, 0, 1, 0], [1, 0, 1, 2, 1, 0, 1, 1], [2, 1, 2, 1, 1, 0, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0], [2, 1, 1, 1, 2, 1, 0, 1], [2, 1, 0, 0, 1, 1, 0, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n1 1 1\n1 0 1\n", "answer": "2 1 0\n2 1 1\n1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 965, "matrix": [[1, 1, 0], [1, 1, 1], [1, 0, 1]], "solution": [[2, 1, 0], [2, 1, 1], [1, 0, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 1 1 0 1\n1 1 0 1 0 1 1 0 1 1\n1 1 1 1 1 1 0 1 0 0\n0 1 1 1 1 1 0 1 1 0\n1 1 0 1 1 0 1 1 1 1\n1 0 0 0 1 1 0 1 1 0\n1 1 1 1 1 0 1 1 1 1\n0 1 0 0 0 0 0 1 1 0\n1 1 1 1 1 1 1 0 0 0\n1 1 0 1 0 1 1 1 1 0\n", "answer": "2 1 0 1 1 2 2 1 0 1\n2 1 0 1 0 1 1 0 1 1\n1 2 1 2 1 1 0 1 0 0\n0 1 1 2 2 1 0 1 1 0\n1 1 0 1 1 0 1 2 2 1\n1 0 0 0 1 1 0 1 1 0\n1 1 1 1 1 0 1 2 2 1\n0 1 0 0 0 0 0 1 1 0\n1 2 1 1 1 1 1 0 0 0\n2 1 0 1 0 1 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 966, "matrix": [[1, 1, 0, 1, 1, 1, 1, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 0, 0, 0, 0, 0, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 1, 1, 1, 1, 0]], "solution": [[2, 1, 0, 1, 1, 2, 2, 1, 0, 1], [2, 1, 0, 1, 0, 1, 1, 0, 1, 1], [1, 2, 1, 2, 1, 1, 0, 1, 0, 0], [0, 1, 1, 2, 2, 1, 0, 1, 1, 0], [1, 1, 0, 1, 1, 0, 1, 2, 2, 1], [1, 0, 0, 0, 1, 1, 0, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 2, 2, 1], [0, 1, 0, 0, 0, 0, 0, 1, 1, 0], [1, 2, 1, 1, 1, 1, 1, 0, 0, 0], [2, 1, 0, 1, 0, 1, 2, 1, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1\n0 1 1 1 1\n0 0 1 0 1\n1 1 0 1 1\n1 0 0 0 1\n", "answer": "0 0 1 2 3\n0 1 2 1 2\n0 0 1 0 1\n1 1 0 1 2\n1 0 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 967, "matrix": [[0, 0, 1, 1, 1], [0, 1, 1, 1, 1], [0, 0, 1, 0, 1], [1, 1, 0, 1, 1], [1, 0, 0, 0, 1]], "solution": [[0, 0, 1, 2, 3], [0, 1, 2, 1, 2], [0, 0, 1, 0, 1], [1, 1, 0, 1, 2], [1, 0, 0, 0, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1\n1 1 1 0 1 0\n1 0 1 0 1 1\n1 0 1 1 1 0\n1 1 1 1 0 1\n0 1 1 1 0 1\n", "answer": "3 2 2 1 2 1\n2 1 1 0 1 0\n1 0 1 0 1 1\n1 0 1 1 1 0\n1 1 2 1 0 1\n0 1 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 968, "matrix": [[1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0], [1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1]], "solution": [[3, 2, 2, 1, 2, 1], [2, 1, 1, 0, 1, 0], [1, 0, 1, 0, 1, 1], [1, 0, 1, 1, 1, 0], [1, 1, 2, 1, 0, 1], [0, 1, 2, 1, 0, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 1 1 0 0\n0 1 0 1 0 1 1 1\n0 1 1 0 1 1 1 1\n0 1 1 1 0 1 1 0\n1 1 1 0 1 0 1 0\n0 1 1 1 0 1 1 1\n0 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1\n", "answer": "1 2 1 2 1 1 0 0\n0 1 0 1 0 1 1 1\n0 1 1 0 1 2 2 1\n0 1 2 1 0 1 1 0\n1 2 1 0 1 0 1 0\n0 1 2 1 0 1 2 1\n0 1 2 2 1 2 3 2\n1 2 3 3 2 3 4 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 969, "matrix": [[1, 1, 1, 1, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1]], "solution": [[1, 2, 1, 2, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1, 1, 1], [0, 1, 1, 0, 1, 2, 2, 1], [0, 1, 2, 1, 0, 1, 1, 0], [1, 2, 1, 0, 1, 0, 1, 0], [0, 1, 2, 1, 0, 1, 2, 1], [0, 1, 2, 2, 1, 2, 3, 2], [1, 2, 3, 3, 2, 3, 4, 3]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 1 0\n0 0 1 1 1 1 1 1\n1 0 1 0 0 1 1 1\n0 1 1 1 0 0 1 0\n1 1 0 1 0 0 1 1\n0 1 1 1 0 1 1 1\n1 1 0 0 1 0 1 0\n1 1 0 1 1 1 1 0\n", "answer": "0 0 1 2 2 2 1 0\n0 0 1 1 1 2 2 1\n1 0 1 0 0 1 2 1\n0 1 1 1 0 0 1 0\n1 1 0 1 0 0 1 1\n0 1 1 1 0 1 2 1\n1 1 0 0 1 0 1 0\n2 1 0 1 2 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 970, "matrix": [[0, 0, 1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 0, 0, 1, 0], [1, 1, 0, 1, 0, 0, 1, 1], [0, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1, 1, 0]], "solution": [[0, 0, 1, 2, 2, 2, 1, 0], [0, 0, 1, 1, 1, 2, 2, 1], [1, 0, 1, 0, 0, 1, 2, 1], [0, 1, 1, 1, 0, 0, 1, 0], [1, 1, 0, 1, 0, 0, 1, 1], [0, 1, 1, 1, 0, 1, 2, 1], [1, 1, 0, 0, 1, 0, 1, 0], [2, 1, 0, 1, 2, 1, 1, 0]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 0 0 1 1 1 1\n1 1 1 1 1 0 1 1 1 0\n1 1 1 1 1 1 1 1 1 1\n0 1 1 1 1 0 1 1 1 1\n1 1 1 1 1 0 0 0 1 1\n1 0 1 1 1 1 0 1 1 1\n1 1 0 0 1 1 1 1 1 1\n0 0 1 1 1 0 1 1 0 1\n0 1 1 1 1 1 1 1 0 1\n1 0 1 0 1 1 0 0 1 0\n", "answer": "3 2 1 0 0 0 1 2 2 1\n2 3 2 1 1 0 1 2 1 0\n1 2 3 2 2 1 2 2 2 1\n0 1 2 2 1 0 1 1 2 2\n1 1 2 2 1 0 0 0 1 2\n1 0 1 1 2 1 0 1 2 3\n1 1 0 0 1 1 1 2 1 2\n0 0 1 1 1 0 1 1 0 1\n0 1 2 1 2 1 1 1 0 1\n1 0 1 0 1 1 0 0 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 971, "matrix": [[1, 1, 1, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 0, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1, 0, 0, 1, 0]], "solution": [[3, 2, 1, 0, 0, 0, 1, 2, 2, 1], [2, 3, 2, 1, 1, 0, 1, 2, 1, 0], [1, 2, 3, 2, 2, 1, 2, 2, 2, 1], [0, 1, 2, 2, 1, 0, 1, 1, 2, 2], [1, 1, 2, 2, 1, 0, 0, 0, 1, 2], [1, 0, 1, 1, 2, 1, 0, 1, 2, 3], [1, 1, 0, 0, 1, 1, 1, 2, 1, 2], [0, 0, 1, 1, 1, 0, 1, 1, 0, 1], [0, 1, 2, 1, 2, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1, 0, 0, 1, 0]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1\n1 0 1\n0 1 1\n", "answer": "1 0 1\n1 0 1\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 972, "matrix": [[1, 0, 1], [1, 0, 1], [0, 1, 1]], "solution": [[1, 0, 1], [1, 0, 1], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1\n1 1 0 1\n1 1 1 1\n1 1 1 1\n", "answer": "3 2 1 2\n2 1 0 1\n3 2 1 2\n4 3 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 973, "matrix": [[1, 1, 1, 1], [1, 1, 0, 1], [1, 1, 1, 1], [1, 1, 1, 1]], "solution": [[3, 2, 1, 2], [2, 1, 0, 1], [3, 2, 1, 2], [4, 3, 2, 3]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 1 1 1\n1 1 0 1 1 1 1 0\n1 1 1 0 1 1 0 0\n0 1 1 0 1 1 0 1\n0 1 1 1 1 1 1 0\n1 1 0 1 0 1 1 1\n1 0 1 1 0 1 1 1\n1 1 1 1 1 1 0 1\n", "answer": "0 0 1 2 3 3 2 1\n1 1 0 1 2 2 1 0\n1 2 1 0 1 1 0 0\n0 1 1 0 1 1 0 1\n0 1 1 1 1 2 1 0\n1 1 0 1 0 1 2 1\n1 0 1 1 0 1 1 2\n2 1 2 2 1 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 974, "matrix": [[0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 0, 1, 1, 1], [1, 0, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1]], "solution": [[0, 0, 1, 2, 3, 3, 2, 1], [1, 1, 0, 1, 2, 2, 1, 0], [1, 2, 1, 0, 1, 1, 0, 0], [0, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 1, 1, 2, 1, 0], [1, 1, 0, 1, 0, 1, 2, 1], [1, 0, 1, 1, 0, 1, 1, 2], [2, 1, 2, 2, 1, 1, 0, 1]], "n": 8, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 0 1 1 1 0 0 1 0 1\n1 0 1 0 1 1 0 0 1 0\n1 1 1 1 1 1 1 1 0 1\n1 0 0 1 1 1 0 1 1 0\n1 1 1 0 1 1 1 1 0 1\n1 1 1 1 1 1 0 0 1 1\n1 1 1 1 0 0 0 1 1 1\n1 0 0 0 1 1 1 0 1 0\n1 1 1 0 1 0 1 1 1 0\n1 1 1 1 1 1 1 0 1 1\n", "answer": "0 0 1 1 1 0 0 1 0 1\n1 0 1 0 1 1 0 0 1 0\n2 1 1 1 2 2 1 1 0 1\n1 0 0 1 2 1 0 1 1 0\n2 1 1 0 1 2 1 1 0 1\n3 2 2 1 1 1 0 0 1 2\n2 1 1 1 0 0 0 1 2 1\n1 0 0 0 1 1 1 0 1 0\n2 1 1 0 1 0 1 1 1 0\n3 2 2 1 2 1 1 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 975, "matrix": [[0, 0, 1, 1, 1, 0, 0, 1, 0, 1], [1, 0, 1, 0, 1, 1, 0, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 0, 0, 0, 1, 1, 1, 0, 1, 0], [1, 1, 1, 0, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 0, 1, 1]], "solution": [[0, 0, 1, 1, 1, 0, 0, 1, 0, 1], [1, 0, 1, 0, 1, 1, 0, 0, 1, 0], [2, 1, 1, 1, 2, 2, 1, 1, 0, 1], [1, 0, 0, 1, 2, 1, 0, 1, 1, 0], [2, 1, 1, 0, 1, 2, 1, 1, 0, 1], [3, 2, 2, 1, 1, 1, 0, 0, 1, 2], [2, 1, 1, 1, 0, 0, 0, 1, 2, 1], [1, 0, 0, 0, 1, 1, 1, 0, 1, 0], [2, 1, 1, 0, 1, 0, 1, 1, 1, 0], [3, 2, 2, 1, 2, 1, 1, 0, 1, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1 0 0 1\n0 1 1 1 1 1 1 1 1\n1 1 0 0 0 1 0 0 0\n1 1 0 0 1 1 1 1 1\n1 1 0 0 0 1 1 0 0\n1 1 1 0 1 0 1 0 1\n1 0 1 1 1 0 0 1 0\n1 0 1 0 0 1 0 1 1\n1 1 1 1 1 0 0 1 1\n", "answer": "1 2 2 1 0 1 0 0 1\n0 1 1 1 1 2 1 1 1\n1 1 0 0 0 1 0 0 0\n2 1 0 0 1 2 1 1 1\n2 1 0 0 0 1 1 0 0\n2 1 1 0 1 0 1 0 1\n1 0 1 1 1 0 0 1 0\n1 0 1 0 0 1 0 1 1\n2 1 2 1 1 0 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 976, "matrix": [[1, 1, 1, 1, 0, 1, 0, 0, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 0, 0], [1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1, 0, 0], [1, 1, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 0, 1, 0], [1, 0, 1, 0, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1, 1]], "solution": [[1, 2, 2, 1, 0, 1, 0, 0, 1], [0, 1, 1, 1, 1, 2, 1, 1, 1], [1, 1, 0, 0, 0, 1, 0, 0, 0], [2, 1, 0, 0, 1, 2, 1, 1, 1], [2, 1, 0, 0, 0, 1, 1, 0, 0], [2, 1, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 0, 1, 0], [1, 0, 1, 0, 0, 1, 0, 1, 1], [2, 1, 2, 1, 1, 0, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0\n1 1 1\n0 1 1\n", "answer": "0 1 0\n1 2 1\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 977, "matrix": [[0, 1, 0], [1, 1, 1], [0, 1, 1]], "solution": [[0, 1, 0], [1, 2, 1], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 0 1 0\n1 1 1 0\n1 1 0 1\n", "answer": "2 1 0 1\n1 0 1 0\n2 1 1 0\n2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 978, "matrix": [[1, 1, 0, 1], [1, 0, 1, 0], [1, 1, 1, 0], [1, 1, 0, 1]], "solution": [[2, 1, 0, 1], [1, 0, 1, 0], [2, 1, 1, 0], [2, 1, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 0\n0 1 1 1 1\n0 1 0 1 1\n1 1 1 1 0\n1 1 1 1 1\n", "answer": "1 0 1 1 0\n0 1 1 2 1\n0 1 0 1 1\n1 2 1 1 0\n2 3 2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 979, "matrix": [[1, 0, 1, 1, 0], [0, 1, 1, 1, 1], [0, 1, 0, 1, 1], [1, 1, 1, 1, 0], [1, 1, 1, 1, 1]], "solution": [[1, 0, 1, 1, 0], [0, 1, 1, 2, 1], [0, 1, 0, 1, 1], [1, 2, 1, 1, 0], [2, 3, 2, 2, 1]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 0 1\n1 0 1 0 1\n1 1 1 1 1\n1 1 1 0 1\n1 1 1 0 0\n", "answer": "1 0 1 0 1\n1 0 1 0 1\n2 1 2 1 2\n3 2 1 0 1\n3 2 1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 980, "matrix": [[1, 0, 1, 0, 1], [1, 0, 1, 0, 1], [1, 1, 1, 1, 1], [1, 1, 1, 0, 1], [1, 1, 1, 0, 0]], "solution": [[1, 0, 1, 0, 1], [1, 0, 1, 0, 1], [2, 1, 2, 1, 2], [3, 2, 1, 0, 1], [3, 2, 1, 0, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 0 1 1 0\n1 1 0 1 0 1 1 1 1 0\n0 0 1 1 1 1 0 1 1 0\n1 1 1 0 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 1 1 0 0\n0 1 0 1 0 1 1 1 1 0\n1 0 1 1 0 1 1 1 1 0\n1 0 1 1 0 1 1 0 0 1\n1 1 1 0 1 1 1 1 1 1\n", "answer": "0 1 0 1 1 1 0 1 1 0\n1 1 0 1 0 1 1 2 1 0\n0 0 1 1 1 1 0 1 1 0\n1 1 1 0 1 2 1 2 2 1\n2 2 2 1 2 1 2 2 1 1\n1 2 1 2 1 0 1 1 0 0\n0 1 0 1 0 1 2 2 1 0\n1 0 1 1 0 1 2 1 1 0\n1 0 1 1 0 1 1 0 0 1\n2 1 1 0 1 2 2 1 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 981, "matrix": [[0, 1, 0, 1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 0, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1, 1]], "solution": [[0, 1, 0, 1, 1, 1, 0, 1, 1, 0], [1, 1, 0, 1, 0, 1, 1, 2, 1, 0], [0, 0, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 1, 2, 1, 2, 2, 1], [2, 2, 2, 1, 2, 1, 2, 2, 1, 1], [1, 2, 1, 2, 1, 0, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1, 2, 2, 1, 0], [1, 0, 1, 1, 0, 1, 2, 1, 1, 0], [1, 0, 1, 1, 0, 1, 1, 0, 0, 1], [2, 1, 1, 0, 1, 2, 2, 1, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n1 1 0\n1 1 0\n", "answer": "3 2 1\n2 1 0\n2 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 982, "matrix": [[1, 1, 1], [1, 1, 0], [1, 1, 0]], "solution": [[3, 2, 1], [2, 1, 0], [2, 1, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 1 0 1\n1 1 1 0 1 0\n1 0 1 1 1 1\n1 0 0 1 1 1\n0 1 1 1 1 1\n1 1 0 1 1 0\n", "answer": "3 2 2 1 0 1\n2 1 1 0 1 0\n1 0 1 1 2 1\n1 0 0 1 2 2\n0 1 1 2 2 1\n1 1 0 1 1 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 983, "matrix": [[1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 0], [1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0]], "solution": [[3, 2, 2, 1, 0, 1], [2, 1, 1, 0, 1, 0], [1, 0, 1, 1, 2, 1], [1, 0, 0, 1, 2, 2], [0, 1, 1, 2, 2, 1], [1, 1, 0, 1, 1, 0]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1\n0 1 1\n0 1 1\n", "answer": "1 2 3\n0 1 2\n0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 984, "matrix": [[1, 1, 1], [0, 1, 1], [0, 1, 1]], "solution": [[1, 2, 3], [0, 1, 2], [0, 1, 2]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0\n0 1 1\n1 0 0\n", "answer": "1 1 0\n0 1 1\n1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 985, "matrix": [[1, 1, 0], [0, 1, 1], [1, 0, 0]], "solution": [[1, 1, 0], [0, 1, 1], [1, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 0 0 1 1 1\n1 1 1 1 1 1 0 0 1 1\n1 1 1 1 1 1 0 0 0 1\n0 1 1 1 0 1 1 1 1 0\n0 1 1 1 1 0 1 1 1 1\n0 1 1 1 0 1 1 0 1 1\n0 1 0 0 1 1 1 0 0 0\n1 0 1 1 0 1 1 0 1 0\n1 1 0 1 1 0 0 0 1 1\n", "answer": "0 1 2 3 2 1 1 2 3 4\n1 2 3 2 1 0 0 1 2 3\n2 3 4 3 2 1 0 0 1 2\n1 2 3 2 1 1 0 0 0 1\n0 1 2 1 0 1 1 1 1 0\n0 1 2 2 1 0 1 1 2 1\n0 1 1 1 0 1 1 0 1 1\n0 1 0 0 1 2 1 0 0 0\n1 0 1 1 0 1 1 0 1 0\n2 1 0 1 1 0 0 0 1 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 986, "matrix": [[0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [0, 1, 1, 1, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1, 1], [0, 1, 0, 0, 1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 0, 1, 1, 0, 1, 0], [1, 1, 0, 1, 1, 0, 0, 0, 1, 1]], "solution": [[0, 1, 2, 3, 2, 1, 1, 2, 3, 4], [1, 2, 3, 2, 1, 0, 0, 1, 2, 3], [2, 3, 4, 3, 2, 1, 0, 0, 1, 2], [1, 2, 3, 2, 1, 1, 0, 0, 0, 1], [0, 1, 2, 1, 0, 1, 1, 1, 1, 0], [0, 1, 2, 2, 1, 0, 1, 1, 2, 1], [0, 1, 1, 1, 0, 1, 1, 0, 1, 1], [0, 1, 0, 0, 1, 2, 1, 0, 0, 0], [1, 0, 1, 1, 0, 1, 1, 0, 1, 0], [2, 1, 0, 1, 1, 0, 0, 0, 1, 1]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 0 1 1 1 1\n1 1 1 1 1 1 0\n1 0 1 1 1 0 1\n1 1 1 1 1 1 1\n1 1 1 1 1 1 1\n1 0 1 1 1 1 0\n1 1 1 1 1 0 1\n", "answer": "0 1 0 1 2 2 1\n1 1 1 2 2 1 0\n1 0 1 2 1 0 1\n2 1 2 3 2 1 2\n2 1 2 3 3 2 1\n1 0 1 2 2 1 0\n2 1 2 2 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 987, "matrix": [[0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 0, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1]], "solution": [[0, 1, 0, 1, 2, 2, 1], [1, 1, 1, 2, 2, 1, 0], [1, 0, 1, 2, 1, 0, 1], [2, 1, 2, 3, 2, 1, 2], [2, 1, 2, 3, 3, 2, 1], [1, 0, 1, 2, 2, 1, 0], [2, 1, 2, 2, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n0 1 1\n1 1 1\n", "answer": "0 1 2\n0 1 2\n1 2 3", "metadata": {"source_dataset": "binary_matrix", "source_index": 988, "matrix": [[0, 1, 1], [0, 1, 1], [1, 1, 1]], "solution": [[0, 1, 2], [0, 1, 2], [1, 2, 3]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 0\n1 1 1\n", "answer": "0 1 1\n1 1 0\n2 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 989, "matrix": [[0, 1, 1], [1, 1, 0], [1, 1, 1]], "solution": [[0, 1, 1], [1, 1, 0], [2, 2, 1]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 1 1 1 1 1 1\n1 1 1 1 0 1 1 0 0\n1 0 1 1 1 1 0 0 1\n1 1 1 1 0 1 1 1 1\n1 1 1 1 1 0 0 0 1\n1 1 1 1 0 1 1 1 0\n1 1 1 1 1 0 1 0 0\n0 1 0 1 1 0 1 1 1\n0 1 0 1 0 1 0 1 1\n", "answer": "0 1 2 2 1 2 2 1 1\n1 1 2 1 0 1 1 0 0\n1 0 1 2 1 1 0 0 1\n2 1 2 1 0 1 1 1 2\n3 2 3 2 1 0 0 0 1\n2 3 2 1 0 1 1 1 0\n1 2 1 2 1 0 1 0 0\n0 1 0 1 1 0 1 1 1\n0 1 0 1 0 1 0 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 990, "matrix": [[0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 0, 0], [1, 0, 1, 1, 1, 1, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 0, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 1, 0, 0], [0, 1, 0, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 0, 1, 1]], "solution": [[0, 1, 2, 2, 1, 2, 2, 1, 1], [1, 1, 2, 1, 0, 1, 1, 0, 0], [1, 0, 1, 2, 1, 1, 0, 0, 1], [2, 1, 2, 1, 0, 1, 1, 1, 2], [3, 2, 3, 2, 1, 0, 0, 0, 1], [2, 3, 2, 1, 0, 1, 1, 1, 0], [1, 2, 1, 2, 1, 0, 1, 0, 0], [0, 1, 0, 1, 1, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 0, 1, 2]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 0 1 0 0\n0 1 1 0 0 1\n1 1 0 0 0 1\n1 1 1 0 1 1\n1 1 1 1 1 0\n1 1 0 1 1 1\n", "answer": "1 0 0 1 0 0\n0 1 1 0 0 1\n1 1 0 0 0 1\n2 2 1 0 1 1\n3 2 1 1 1 0\n2 1 0 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 991, "matrix": [[1, 0, 0, 1, 0, 0], [0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 0, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 0, 1, 1, 1]], "solution": [[1, 0, 0, 1, 0, 0], [0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 0, 1], [2, 2, 1, 0, 1, 1], [3, 2, 1, 1, 1, 0], [2, 1, 0, 1, 2, 1]], "n": 6, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1\n1 1 0\n1 0 0\n", "answer": "0 1 1\n1 1 0\n1 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 992, "matrix": [[0, 1, 1], [1, 1, 0], [1, 0, 0]], "solution": [[0, 1, 1], [1, 1, 0], [1, 0, 0]], "n": 3, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 0 1 1 1 1 1 1 1 1\n1 0 1 1 1 0 1 0 1 1\n1 1 1 1 1 1 0 1 1 0\n1 1 1 0 0 1 1 1 1 1\n1 0 1 1 1 1 1 1 1 1\n0 0 0 0 0 1 1 0 0 1\n1 1 0 1 1 1 0 1 0 1\n0 0 1 0 1 0 1 1 1 1\n1 1 1 1 1 0 1 1 0 1\n0 0 1 0 1 0 1 1 1 1\n", "answer": "1 0 1 2 2 1 2 1 2 2\n1 0 1 2 1 0 1 0 1 1\n2 1 2 1 1 1 0 1 1 0\n2 1 1 0 0 1 1 2 2 1\n1 0 1 1 1 2 2 1 1 2\n0 0 0 0 0 1 1 0 0 1\n1 1 0 1 1 1 0 1 0 1\n0 0 1 0 1 0 1 2 1 2\n1 1 2 1 1 0 1 1 0 1\n0 0 1 0 1 0 1 2 1 2", "metadata": {"source_dataset": "binary_matrix", "source_index": 993, "matrix": [[1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 0], [1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, 1, 0, 1], [0, 0, 1, 0, 1, 0, 1, 1, 1, 1]], "solution": [[1, 0, 1, 2, 2, 1, 2, 1, 2, 2], [1, 0, 1, 2, 1, 0, 1, 0, 1, 1], [2, 1, 2, 1, 1, 1, 0, 1, 1, 0], [2, 1, 1, 0, 0, 1, 1, 2, 2, 1], [1, 0, 1, 1, 1, 2, 2, 1, 1, 2], [0, 0, 0, 0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0, 1, 2, 1, 2], [1, 1, 2, 1, 1, 0, 1, 1, 0, 1], [0, 0, 1, 0, 1, 0, 1, 2, 1, 2]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 1 0 1 0 0 1 1\n1 0 0 1 1 1 0 1 1\n1 1 1 0 1 1 1 1 1\n0 1 1 0 0 0 0 1 0\n0 1 1 0 1 0 1 1 1\n1 1 0 0 1 1 1 1 0\n0 1 1 1 0 0 0 0 1\n1 1 0 0 1 0 1 1 0\n1 0 1 1 0 1 0 0 1\n", "answer": "2 1 1 0 1 0 0 1 2\n1 0 0 1 2 1 0 1 2\n1 1 1 0 1 1 1 2 1\n0 1 1 0 0 0 0 1 0\n0 1 1 0 1 0 1 2 1\n1 1 0 0 1 1 1 1 0\n0 1 1 1 0 0 0 0 1\n1 1 0 0 1 0 1 1 0\n1 0 1 1 0 1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 994, "matrix": [[1, 1, 1, 0, 1, 0, 0, 1, 1], [1, 0, 0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1, 1], [0, 1, 1, 0, 0, 0, 0, 1, 0], [0, 1, 1, 0, 1, 0, 1, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0, 0, 0, 1], [1, 1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 1, 0, 0, 1]], "solution": [[2, 1, 1, 0, 1, 0, 0, 1, 2], [1, 0, 0, 1, 2, 1, 0, 1, 2], [1, 1, 1, 0, 1, 1, 1, 2, 1], [0, 1, 1, 0, 0, 0, 0, 1, 0], [0, 1, 1, 0, 1, 0, 1, 2, 1], [1, 1, 0, 0, 1, 1, 1, 1, 0], [0, 1, 1, 1, 0, 0, 0, 0, 1], [1, 1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 1, 1, 0, 1, 0, 0, 1]], "n": 9, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1\n1 1 1 1\n0 1 1 0\n1 0 0 1\n", "answer": "2 1 0 1\n1 2 1 1\n0 1 1 0\n1 0 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 995, "matrix": [[1, 1, 0, 1], [1, 1, 1, 1], [0, 1, 1, 0], [1, 0, 0, 1]], "solution": [[2, 1, 0, 1], [1, 2, 1, 1], [0, 1, 1, 0], [1, 0, 0, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0\n1 1 1 1\n0 0 1 0\n1 1 1 1\n", "answer": "0 1 1 0\n1 1 2 1\n0 0 1 0\n1 1 2 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 996, "matrix": [[0, 1, 1, 0], [1, 1, 1, 1], [0, 0, 1, 0], [1, 1, 1, 1]], "solution": [[0, 1, 1, 0], [1, 1, 2, 1], [0, 0, 1, 0], [1, 1, 2, 1]], "n": 4, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n0 1 1 0 1\n0 0 1 1 0\n1 1 0 1 1\n1 1 1 1 0\n0 0 0 0 0\n", "answer": "0 1 1 0 1\n0 0 1 1 0\n1 1 0 1 1\n1 1 1 1 0\n0 0 0 0 0", "metadata": {"source_dataset": "binary_matrix", "source_index": 997, "matrix": [[0, 1, 1, 0, 1], [0, 0, 1, 1, 0], [1, 1, 0, 1, 1], [1, 1, 1, 1, 0], [0, 0, 0, 0, 0]], "solution": [[0, 1, 1, 0, 1], [0, 0, 1, 1, 0], [1, 1, 0, 1, 1], [1, 1, 1, 1, 0], [0, 0, 0, 0, 0]], "n": 5, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 1 1 1 0\n1 1 0 0 1 0 1\n1 1 1 1 1 0 1\n0 1 1 1 0 1 1\n1 1 1 0 1 1 1\n1 1 1 1 1 1 0\n1 1 1 0 1 0 1\n", "answer": "2 1 0 1 2 1 0\n2 1 0 0 1 0 1\n1 2 1 1 1 0 1\n0 1 2 1 0 1 2\n1 2 1 0 1 2 1\n2 3 2 1 2 1 0\n3 2 1 0 1 0 1", "metadata": {"source_dataset": "binary_matrix", "source_index": 998, "matrix": [[1, 1, 0, 1, 1, 1, 0], [1, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 0, 1, 0, 1]], "solution": [[2, 1, 0, 1, 2, 1, 0], [2, 1, 0, 0, 1, 0, 1], [1, 2, 1, 1, 1, 0, 1], [0, 1, 2, 1, 0, 1, 2], [1, 2, 1, 0, 1, 2, 1], [2, 3, 2, 1, 2, 1, 0], [3, 2, 1, 0, 1, 0, 1]], "n": 7, "difficulty": {"n": [3, 10], "p_zero": 0.25}}} {"question": "Given a square matrix, your job is to find the taxicab (Manhattan) distance of the nearest 0 for each cell.\n\nThe output should be a matrix of the same size as the input matrix, where each cell contains the distance to the nearest 0.\n\nFind the distance to the nearest 0 for each cell in the matrix below:\n1 1 0 0 1 0 1 1 1 1\n1 1 1 1 1 1 0 1 1 1\n1 1 1 0 0 1 1 1 1 1\n0 0 1 1 0 0 0 1 1 0\n1 1 0 1 1 1 1 1 1 1\n0 0 1 1 1 1 1 0 0 1\n0 1 0 0 1 1 1 1 1 1\n1 1 1 0 1 0 0 1 1 1\n1 1 0 1 1 1 1 1 1 1\n1 1 0 1 1 1 1 1 1 1\n", "answer": "2 1 0 0 1 0 1 2 3 3\n2 2 1 1 1 1 0 1 2 2\n1 1 1 0 0 1 1 2 2 1\n0 0 1 1 0 0 0 1 1 0\n1 1 0 1 1 1 1 1 1 1\n0 0 1 1 2 2 1 0 0 1\n0 1 0 0 1 1 1 1 1 2\n1 2 1 0 1 0 0 1 2 3\n2 1 0 1 2 1 1 2 3 4\n2 1 0 1 2 2 2 3 4 5", "metadata": {"source_dataset": "binary_matrix", "source_index": 999, "matrix": [[1, 1, 0, 0, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 0, 0, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 0, 0, 1], [0, 1, 0, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1]], "solution": [[2, 1, 0, 0, 1, 0, 1, 2, 3, 3], [2, 2, 1, 1, 1, 1, 0, 1, 2, 2], [1, 1, 1, 0, 0, 1, 1, 2, 2, 1], [0, 0, 1, 1, 0, 0, 0, 1, 1, 0], [1, 1, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 2, 2, 1, 0, 0, 1], [0, 1, 0, 0, 1, 1, 1, 1, 1, 2], [1, 2, 1, 0, 1, 0, 0, 1, 2, 3], [2, 1, 0, 1, 2, 1, 1, 2, 3, 4], [2, 1, 0, 1, 2, 2, 2, 3, 4, 5]], "n": 10, "difficulty": {"n": [3, 10], "p_zero": 0.25}}}