Browse Source

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

Of course i tried different coeffs before hitting a good one
Guillaume Koenig 7 years ago
parent
commit
c828545f3b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main.go

+ 1 - 1
main.go

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