HDU 4864 Task(基本算法-贪心)
题目大意:
有n台机器,m个任务,每台机器有xi,yi,每个任务也有xj,yj,当一个任务可以被处理的条件是,xj<=xi 且 yj<yi,处理完产生 500*xj+2*yj 的价值,问你最多产生的价值是多少?
解题思路:
注意y的范围是 y<100,也就是x相差1,y不管相差多少价值都很少。
根据贪心的做法,肯定从高价值物品生产也就是按x排好序,再贪心,高价值的物品只需要在x比它大的所有机器中选择y满足条件的最小的那个(这个思考一下)...
分类:
其他好文 时间:
2014-08-01 16:18:31
阅读次数:
340
Given an array, your task is to find the k-th occurrence (from left to right) of an integer v. To make the problem more difficult (and interesting!), you'll have to answer m such queries.
Input
Ther...
分类:
其他好文 时间:
2014-08-01 13:42:11
阅读次数:
170
Task Schedule
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3412 Accepted Submission(s): 1197
Problem Description
Our geometry...
分类:
其他好文 时间:
2014-07-31 16:56:36
阅读次数:
287
Problem DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbe...
分类:
其他好文 时间:
2014-07-31 12:54:46
阅读次数:
704
Description
Let us define a regular brackets sequence in the following way:
1. Empty sequence is a regular sequence.
2. If S is a regular sequence, then (S) and [S] are both regular sequences....
分类:
其他好文 时间:
2014-07-30 20:44:34
阅读次数:
267
http://acm.hdu.edu.cn/showproblem.php?pid=3572题意:给N个任务,M台机器。每个任务有最早才能开始做的时间S,deadline E,和持续工作的时间P。问存不存在可行的工作时间。题解:最大流。主要问题在于建模…… 建模:源点与每一个任务建边,容量为P;.....
分类:
其他好文 时间:
2014-07-30 20:37:54
阅读次数:
248
Problem Description
Given a positive integer n, your task is to find a positive integer m, which is a multiple of n, and that m contains the least number of different digits when represented in decim...
分类:
其他好文 时间:
2014-07-30 14:46:03
阅读次数:
230
1、启动流程 /** * 1 启动流程 * 当流程到达一个节点时,会在act_ru_execution表中产生1条数据 * 如果当前节点是用户任务节点,这时会在act_ru_task表中产生1条数据(任务的办理人,任务的创建时间) */ @Test public void startProc...
分类:
其他好文 时间:
2014-07-30 11:28:03
阅读次数:
315
A - N!
Time Limit:5000MS Memory Limit:32768KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N!
...
分类:
其他好文 时间:
2014-07-29 18:06:02
阅读次数:
280
之前一直用quartz做调度任务,这次改用spring了,这里做一个记录,以备查询:在配置文件中增加如下配置:xmlns:task="http://www.springframework.org/schema/task"http://www.springframework.org/schema/taskhttp://www.springframework.org/schema/task/spring-task-3.2.xsd..
分类:
编程语言 时间:
2014-07-29 15:50:19
阅读次数:
195