随笔分类 -  背包问题

摘要:1 #include 2 struct group{ 3 4 int value; 5 int weight; 6 7 }; 8 void Sort(group bag[],int num) 9 {10 int i,j;11 group temp;12 for(i=1; ibag[j].value)15 {16 temp=bag[j];17 bag[j]=bag[j+1];18 bag[j+1]=temp;19 ... 阅读全文
posted @ 2014-03-03 22:10 心中的阿哲 阅读(133) 评论(0) 推荐(0)