P2858 [USACO06FEB] Treats for the Cows G/S
题目描述
FJ has purchased N (1
输入格式
无
输出格式
无
说明/提示
Explanation of the sample:
Five treats. On the first day FJ can sell either treat #1 (value 1) or treat #5 (value 2).
FJ sells the treats (values 1, 3, 1, 5, 2) in the following order of indices: 1, 5, 2, 3, 4, making 1x1 + 2x2 + 3x3 + 4x1 + 5x5 = 43.