摘要:饭卡打啵固态思维,转换成01背包问题,学习人家dp的排版先01背包算出用m-5元可以买到最贵的菜,然后就会一次买最贵的。// File Name: hdu2546.cpp
// Author: rudolf
// Created Time: 2013年04月20日 星期六 18时51分53秒 #include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
const int maxn=1010;
int dp[maxn];
int value[maxn],weigh
阅读全文