Explorar o código

11.76M on input D (+760k) with a simple coeff change

Of course i tried different coeffs before hitting a good one
Guillaume Koenig %!s(int64=7) %!d(string=hai) anos
pai
achega
c828545f3b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      main.go

+ 1 - 1
main.go

@@ -165,7 +165,7 @@ func Choose(c *Car) *Ride {
165 165
 		lenOfRide := r.length()
166 166
 		total := max(c.distanceTo(r.a, r.b), r.s-c.Arrival) + lenOfRide
167 167
 		// fmt.Printf("%d/%d\n", lenOfRide, total)
168
-		if bestRide == nil || lenOfRide*bestTotal > total*bestLenOfRide {
168
+		if bestRide == nil || lenOfRide*bestTotal > 90*total*bestLenOfRide {
169 169
 			bestLenOfRide = lenOfRide
170 170
 			bestTotal = total
171 171
 			bestRide = r