SWUST OJ 1139: Coin-row problem

题目描述
There is a row of n coins whose values are some positive integers c₁, c₂,...,cn, not necessarily distinct. The goal is to pick up the maximum amount of money subject to the constraint that no two coins adjacent in the initial row can be picked up.
输入
Two lines, the first line is n (0< n <=10000), and the second line is value of coin(0< value <= 2^32). 输出 the maximum amount of money. 样例输入 6 5 1 2 10 6 2 样例输出 17 #include
#include
#include

SWUST OJ 1139: Coin-row problem最先出现在Python成神之路

版权声明:
作者:congcong
链接:https://www.techfm.club/p/13853.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>