摘要: 首先想到的是贪心算法,结果贪心策略在这里行不通- -|贪心 1 #include <iostream> 2 using namespace std; 3 4 int books[5]; 5 int price=8; 6 int categorys; 7 float consumption=0.0; 8 float onSales5=0.25; 9 float onSales4=0.2;10 float onSales3=0.1;11 float onSales2=0.05;12 13 int LargestCategory(int *arr,int n)14 {15 int cnt 阅读全文
posted @ 2012-03-15 21:27 Cavia 阅读(288) 评论(0) 推荐(0) 编辑