-// minSeedMap := SeedMap{}
-// minLoc := utils.MaxInt
-// for _, seedmap := range seedsmap {
-// for _, i := range []int{seedmap.seed, seedmap.seed+seedmap.range_len} {
-// soil := lookup_dest(i, almanac.seed2soil)
-// fert := lookup_dest(soil, almanac.soil2fert)
-// water := lookup_dest(fert, almanac.fert2water)
-// light := lookup_dest(water, almanac.water2light)
-// temp := lookup_dest(light, almanac.light2temp)
-// humid := lookup_dest(temp, almanac.temp2humid)
-// loc := lookup_dest(humid, almanac.humid2loc)
-// if loc < minLoc {
-// minSeedMap = seedmap
-// minLoc = loc
-// }
-// }
-// }
+ minLoc := uint64(utils.MaxInt)
+ for _, seedmap := range seedsmap {
+ for i := seedmap.seed;i<seedmap.seed+seedmap.range_len;i++ {
+ soil := lookup_dest(i, almanac.seed2soil)
+ fert := lookup_dest(soil, almanac.soil2fert)
+ water := lookup_dest(fert, almanac.fert2water)
+ light := lookup_dest(water, almanac.water2light)
+ temp := lookup_dest(light, almanac.light2temp)
+ humid := lookup_dest(temp, almanac.temp2humid)
+ loc := lookup_dest(humid, almanac.humid2loc)
+ if loc < minLoc {
+ minLoc = loc
+ }
+ }
+ fmt.Println(minLoc)
+ }