ThanhNam Nguyen wrote: > Since my NNTP server doesnt allow posting, I'll ask you directly > instead. > > Must I start from the first day?
No. > For example: > > 1st day: A --> B 100 bucks > 2nd day: A --> B 60 bucks > 3rd day: A --> B 40 bucks > > What would the solution be? And for how much in total? There are two correct solutions: ["A", "B"] # spend one night in A, then fly to B on day two (cost 80) ["A", "A", "B"] # spend two nights in A, then fly to B on day two (cost 80) Cheers, Brian -- http://mail.python.org/mailman/listinfo/python-list