Mix.install([
{:kino, "~> 0.7.0"}
])
Input
input = Kino.Input.textarea("Input")
input =
input
|> Kino.Input.read()
|> String.split()
grid =
input
|> Enum.with_index()
|> Enum.reduce(%{}, fn {line, row}, acc ->
line
|> String.graphemes()
|> Enum.with_index()
|> Enum.reduce(acc, fn {height, col}, acc2 ->
Map.put(acc2, {row, col}