ACM: 动态规划题 poj 1036 问题简…
来源:互联网 发布:mac安装jdk 编辑:程序博客网 时间:2024/06/05 11:37
Description
The restaurant works in the interval of time [0, T].
The goal is to gather the gangsters with the maximal totalprosperity in the restaurant by opening and closing the doorappropriately.
Input
?The second line of the input file contains the moments of timewhen gangsters come to the restaurant T1, T2, ..., TN, separated byspaces. ( 0 <= Ti <= T for i = 1, 2,..., N)
?The third line of the input file contains the values of theprosperity of gangsters P1, P2, ..., PN, separated by spaces. ( 0<= Pi <= 300 for i = 1, 2, ...,N)
?The forth line of the input file contains the values of thestoutness of gangsters S1, S2, ..., SN, separated by spaces. ( 1<= Si <= K for i = 1, 2, ...,N)
All values in the input file are integers.
Output
Sample Input
4 10 20
10 16 8 16
10 11 15 1
10 7 1 8
Sample Output
26
题意: 现在有N个歹徒, 要获取旅馆里面的财物, 但是旅馆有一扇可以改变大小的门,
解题思路:
代码:
#include <cstdio>
#include <iostream>
#include <cstring>
#include <cstdlib>
using namespace std;
#define MAX 105
struct node
{
}a[MAX];
int N, K, T;
int dp[MAX];
int cmp(const void *a, const void *b)
{
}
inline int my_abs(int a)
{
}
int main()
{
//
}
- ACM: 动态规划题 poj 1036 问题简…
- ACM: dp动态规划题(难) poj 3267 …
- ACM: dp题(动态规划) poj 2151 (d…
- ACM: 树状DP 动态规划题 poj 1463 …
- ACM: 简单动态规划题 poj 2955
- ACM: 动态规划题 poj 2241
- ACM: 动态规划题 poj 1054
- ACM: 动态规划题 poj 2948
- ACM: 动态规划题 poj 1925
- ACM: 动态规划题 poj 3034
- ACM: 动态规划题 poj 2411
- ACM: 动态规划题 poj 1947
- ACM: 动态规划题 poj 2486
- ACM: 动态规划题 poj 3140
- ACM: 动态规划题 poj 3659
- ACM: 动态规划题 poj 2923
- ACM: DP训练好题 动态规划题 poj 1…
- ACM: 动态规划题 poj 1191 Nothing…
- ACM:动态规划题 poj 1015
- ARM (一) arm寄存器
- ARM (二) arm指令分类及其寻址方式
- ARM (三) arm中C/C++及汇编语言的…
- ACM: 动态规划题 poj 2033 (博客好…
- ACM: 动态规划题 poj 1036 问题简…
- ACM: 划分树 poj 2104
- ACM: 划分树 poj 2761 在poj2104基…
- ACM: 最小堆 poj 2227 最小堆 fro…
- ACM: 最小堆 poj 2274 思路清晰, …
- ACM: 线段树 poj 2352
- ACM: 线段树 poj 1151 足足想了三…
- 运算符与表达式
- ACM: 线段树 poj 1177