move fget out of greedy

This commit is contained in:
onyx-and-iris 2024-01-15 12:18:31 +00:00
parent e36f91c094
commit a32d33876c

View File

@ -12,16 +12,16 @@ stations = {
} }
def greedy(): def fget():
def fget(): needed = set()
needed = set() for states in stations.values():
for states in stations.values(): needed |= states
needed |= states return needed
return needed
def greedy():
states_needed = fget() states_needed = fget()
logger.debug(states_needed) logger.debug(states_needed)
final_stations = set() final_stations = set()
while states_needed: while states_needed: