AntonFagerberg / Trip

Advent of Code-like puzzle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

You have been hired as the new paper boy for the excellent magazine JayView. On your trusted bike, you plan to make as much money as possible by delivering magazines to as many subscribers as you can. However, there is one problem: you can't reach every subscriber by bike (apparently not enough bike lanes).

You can start at any address you want but you can only use your bike to reach the other addresses. For each magazine delivered you'll get a cool 10 SEK! The input file contains a list of addresses which are connected by bike lanes. Each line has two addresses separated by <-> (indicating that you can bike in both directions).

Given the following input:

2698 Oriole Park <-> 8654 Ridgeview Plaza
6767 Upham Trail <-> 80 Kenwood Drive
8222 Lillian Park <-> 2698 Oriole Park
19 Bluestem Junction <-> 8654 Ridgeview Plaza
74835 Ronald Regan Alley <-> 2849 Grim Place
7816 Stang Drive <-> 6767 Upham Trail
6483 Declaration Terrace <-> 19 Bluestem Junction

You can get a maximum of 50 SEK by biking: 8222 Lillian Park -> 2698 Oriole Park -> 8654 Ridgeview Plaza -> 19 Bluestem Junction -> 6483 Declaration Terrace.

How much dough can you make?! 💸💵🤑

About

Advent of Code-like puzzle


Languages

Language:Scala 100.0%