返回题库

饥饿的卡车司机

Hungry Truck Driver

专题
Brainteaser / 脑筋急转弯
难度
L5

题目详情

一名卡车司机的任务是在 AABB 城镇之间运输 30003000 苹果,这两个城镇相距 10001000 英里。然而,如果卡车司机在卡车里有苹果的情况下开车,他将以每英里 11 苹果的速度吃掉它们。该卡车每次最多可容纳 10001000 苹果。司机可以在 AABB 之间的任何点存放苹果。

他怎样才能从 AA 镇到 BB 镇获得尽可能多的苹果?

A truck driver has been tasked with transporting 30003000 apples between towns AA and BB, which are 10001000 miles apart. However, if the truck driver is driving while there are apples in his truck, he will eat them at a rate of 11 apple per mile. The truck has a maximum capacity of 10001000 apples at any one time. The driver may deposit apples at any point between AA and BB.

How can he get the maximum possible number of apples from town AA to town BB?

解析

我们有:

  • 苹果总数:3000
  • 卡车容量:1000
  • 距离:1000 英里
  • 消耗量:每次装载每英里 1 个苹果

Strategy:\text{Strategy:} 将旅程分为几个阶段,每个阶段我们在两点之间运输苹果,逐渐减少苹果总量。在每个阶段,我们都会优化移动苹果的距离,以最大限度地减少消耗。

Stage 1:\text{Stage 1:} 搬运 3000 个苹果,卡车容量 1000 k=30001000=3 tripsk = \frac{3000}{1000} = 3 \text{ trips} 每英里吃掉的苹果:2k1=52k - 1 = 5 距离 2000 个苹果还剩:5x=1000    x=2005x = 1000 \implies x = 200 英里

Stage 2:\text{Stage 2:} 移动 2000 个苹果,k = 2 趟 每英里吃掉的苹果:2k1=32k -1 = 3 距剩余 1000 个苹果的距离:3y=1000    y333.333y = 1000 \implies y \approx 333.33 英里

Stage 3:\text{Stage 3:} 移动剩余的 1000 个苹果,k = 1 趟 每英里吃掉的苹果:211=12*1-1 = 1 到 B 镇的距离:1000(200+333.33)466.671000 - (200+333.33) \approx 466.67 英里 吃掉的苹果:466.67 → 交付的苹果:1000466.675331000 - 466.67 \approx 533

Maximum apples delivered:\text{Maximum apples delivered:} 533\boxed{533}


Original Explanation

We have:

  • Total apples: 3000
  • Truck capacity: 1000
  • Distance: 1000 miles
  • Consumption: 1 apple per mile per load

Strategy:\text{Strategy:} Divide the journey into stages, where at each stage we transport apples between two points, reducing total apples gradually. At each stage, the distance we move apples is optimized to minimize consumption.

Stage 1:\text{Stage 1:} Move 3000 apples, truck capacity 1000 k=30001000=3 tripsk = \frac{3000}{1000} = 3 \text{ trips} Apples eaten per mile: 2k1=52k - 1 = 5
Distance until 2000 apples remain: 5x=1000    x=2005x = 1000 \implies x = 200 miles

Stage 2:\text{Stage 2:} Move 2000 apples, k = 2 trips
Apples eaten per mile: 2k1=32k -1 = 3
Distance until 1000 apples remain: 3y=1000    y333.333y = 1000 \implies y \approx 333.33 miles

Stage 3:\text{Stage 3:} Move remaining 1000 apples, k = 1 trip
Apples eaten per mile: 211=12*1-1 = 1
Distance to town B: 1000(200+333.33)466.671000 - (200+333.33) \approx 466.67 miles
Apples eaten: 466.67 → Apples delivered: 1000466.675331000 - 466.67 \approx 533

Maximum apples delivered:\text{Maximum apples delivered:} 533\boxed{533}