As I sat and pondered the problem, I asked myself, "How could delaying the
departure of a truck possibly lead to a quicker crossing?" and from there it
was a short step to "Greed is good" (or at least adequate for this problem).
The data were contrived to confirm the naive programmer's belief that his
simple-minded solution was optimal. I imagine this program came from some
ACM challenge or another, and I suspect there were more data that would have
left my little script a smoldering ruin. If not, see the set below:
100 5 3
50 2000
50 1
50 1
It's a good thing the judge's decision is final!
Jim
|