题意:每个月或者亏损s或者盈利d 调查8次连续的5个月 问若能盈利 则最大能盈利多少
贪心算法 :先求出能使五个月亏损的最小亏亏损月数 把那些亏损月数向后靠边
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
题意:每个月或者亏损s或者盈利d 调查8次连续的5个月 问若能盈利 则最大能盈利多少
贪心算法 :先求出能使五个月亏损的最小亏亏损月数 把那些亏损月数向后靠边
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|