浏览代码

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 年之前
父节点
当前提交
c828545f3b
共有 1 个文件被更改,包括 1 次插入1 次删除
  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