关于训练指南P37页例题16 长城守卫(Beijing Guards,LA 3177)的一个疑问.
Closed this issue · 2 comments
GoogleCodeExporter commented
在分析中当n为奇数时,策略是:编号为偶数的人尽量往前取,编�
��为奇数的人尽量往后取.
在程序中是当(i%2 == 0)时尽量拿右边的礼物.这点不懂.
Original issue reported on code.google.com by junpeng....@gmail.com
on 16 Feb 2013 at 12:50
GoogleCodeExporter commented
看代码仓库0228版的例题程序, 书上应为(i%2 == 1),
并且遗漏了n=1的情况.
Original comment by LiuYu...@gmail.com
on 1 Mar 2013 at 10:54
GoogleCodeExporter commented
Original comment by rujia....@gmail.com
on 5 Mar 2013 at 5:37
- Changed state: Done