主题链接:pid=4864">http://acm.hdu.edu.cn/showproblem.php?pid=4864 Task Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1346 Accepted Submission(s): 336 Problem Description Today the company h…
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=4864 Task Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11382 Accepted Submission(s): 2782 Problem Description Today the company has m tasks t…
HDU 3433 A Task Process Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1368 Accepted Submission(s): 684 Problem Description There are two kinds of tasks, namely A and B. There are N workers…
A Task Process Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1332 Accepted Submission(s): 656 Problem Description There are two kinds of tasks, namely A and B. There are N workers and the…
题目链接:hdu 4864 其实就是个贪心,只是当初我想的有偏差,贪心的思路不对,应该是这样子的: 因为 xi 的权值更重,所以优先按照 x 来排序,而这样的排序方式决定了在满足任务(即 xi >= xj && yi >= yj)的所有机器中(设为 S)优先选择更贴近 yj 的 yi(因为我们肯定是选择最贴近任务 x,y 值的机器,要么是 xi 最贴近,要么是 yi 最贴近),这样子可以使得浪费最小——因为在后续的任务中,xj 只会越来越小,S 中的任何一台机器的 xi 值都能…