Through the introduction of the interesting questions of programming contest, which can help to stimulate the students' interest in learning and to raise the students' practical ability. This paper solves a classic competition topic named energy necklace problem by using a typical example named matrix multiply problem of the dynamic programming method, analyzes the similarity and difference of this two problems, and obtains the solving method of energy necklace problem.%通过引入程序设计竞赛中的有趣题目,有利于激发学生的学习兴趣,提高学生的实践能力.文章利用动态规划方法的一个典型例子“矩阵连乘问题”解决了一道经典的竞赛题目“能量项链问题”.分析了两个问题的相似性和相异性,得到了能量项链问题的求解方法.
展开▼