You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmoduleDay5Part2doimportDay5Shared,except: [parse: 1]@workers_n64defsolve({seeds,maps})doseeds# |> Enum.take(2)|>Stream.chunk_every(2)|>Stream.map(fn[start,finish]->start..(start+finish-1)|>Stream.chunk_every(@workers_n)|>Task.async_stream(fnseed_ids->seed_ids|>Stream.map(&find_lowest_location(&1,maps))|>Enum.min()end,max_concurrency: @workers_n,order: false)|>Stream.map(fn{:ok,n}->nend)|>Enum.to_list()|>Enum.min()end)|>Enum.to_list()|>Enum.min()endendinput|>Day5Shared.parse()|>Day5Part2.solve()# 81956384 is the right answer