"# [Path Sum: Four Ways](https://projecteuler.net/problem=83)\n",
"\n",
"This is the same matrix as [problem 81](https://projecteuler.net/problem=81) and [problem 82](https://projecteuler.net/problem=82)."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "95e759ee",
"metadata": {},
"outputs": [],
"source": [
"with open(\"txt/0083_matrix.txt\") as f:\n",
" mat = matrix((int(n) for n in line.split(',')) for line in f)"
]
},
{
"cell_type": "markdown",
"id": "7c263e59",
"metadata": {},
"source": [
"Once again, we can reuse our solution from problem 81, simply modifying so that when adding entries to the queue, we'll add all entries above, below, left, and right of our current entry."
"This work is licensed under the [Creative Commons Attribution-ShareAlike 4.0 International license](https://creativecommons.org/licenses/by-sa/4.0/) and the [BSD Zero Clause license](https://spdx.org/licenses/0BSD.html)."