本文共 322 字,大约阅读时间需要 1 分钟。
传送门:
AC代码 背包问题,按照最高单价排列.
#include#include #include #include using namespace std;struct Node{ double weight,price;};int main(){ int n; double profit = 0,total; scanf("%d %lf",&n,&total); vector ans(n); for (int i=0; i p2; }); for (int i=0; i
转载地址:http://tqhji.baihongyu.com/