题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1963 //多重背包 #include <cstdio> #include <cstring> #include <iostream> using namespace std; + ; #define N 15 long long dp[maxn], ans; int c[N], w[N], V; void Pack(int C, int W) { for(int i = C…
Investment Time Limit:10000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Description John never knew he had a grand-uncle, until he received the notary��s letter. He learned that his late grand-uncle had gathered a lot of money, somew…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1963 题目意思:有 本金 money,还有一些股票的种类,第 i 种股票买入需要 value[i] 这么多钱,相应会有一定的利息interest[i],问经过若干年 year 后,每年都以最优的方案投资,总的资金有多少? 完全背包题,不过要看清楚 这句话:The value of a bond is always a multiple of $1 000,否则TLE了 #include <iostr…
完全背包. #include <stdio.h> #include <string.h> #define max(a, b) (a>b) ? a:b ], an[]; ]; int main() { int case_n; int n, m, year; int i, j, k; scanf("%d", &case_n); while (case_n--) { scanf("%d %d", &m, &year);…
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=1908 Double Queue Description The new founded Balkan Investment Group Bank (BIG-Bank) opened a new office in Bucharest, equipped with a modern computing environment provided by IBM Romania, and using mod…
题目链接: PKU:http://poj.org/problem?id=3481 HDU:http://acm.hdu.edu.cn/showproblem.php?pid=1908 Description The new founded Balkan Investment Group Bank (BIG-Bank) opened a new office in Bucharest, equipped with a modern computing environment provided by…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5855 Less Time, More profit Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others) 问题描述 The city planners plan to build N plants in the city which has M shops. Each shop needs p…
Saving HDU Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7194 Accepted Submission(s): 3345 Problem Description 话说上回讲到海东集团面临内外交困,公司的元老也只剩下XHD夫妇二人了.显然,作为多年拼搏的商人,XHD不会坐以待毙的. 一天,当他正在苦思冥想解困良策的…