题意: 钢铁公司有N个客户的订单,每个订单有一个产量q(生产时间刚好也等于q)和订单完成截止时间。公司要求完成尽量多的订单。分析: 先按截止时间d排序,然后维护一个已经选好的订单的优先队列,如果当前无法选择的话,那么尝试和之前花费时间最长的交换。如果qi#include#include#incl.....
分类:
其他好文 时间:
2015-11-01 21:02:37
阅读次数:
194
So glad that I have such a good home where I can share what I learn and what I am confused. There is only one rule that I need to clarify: Keep Writin...
分类:
其他好文 时间:
2015-10-30 12:02:24
阅读次数:
136
一、1.首先进入BIOS 的设置主界面, 选择[POWER MANAGEMENT SETUP],再选择[PWRLost Resume State],这一项有三个选择项。 选择[Keep OFF]项,代表停电后再来电时,电脑不会自动启动。选择[Turn On]项,代表停电后...
分类:
其他好文 时间:
2015-10-24 11:41:24
阅读次数:
231
GitHackGitHack is a.gitfolder disclosure exploit.It rebuild source code from .git folder while keep directory structure unchanged.GitHack是一个.git泄露利用脚本...
分类:
其他好文 时间:
2015-10-20 22:41:35
阅读次数:
301
Lesson learnt: for any calculator problems, keep 2 stacks: 1 for operators and 1 for operands.class Solution { stack op; stack data; void...
分类:
其他好文 时间:
2015-10-19 15:40:22
阅读次数:
281
Another major villain is the hard disk. It takes substantial energy to keep it spinning at highspeed, even if there are no accesses. Many conputers, e...
分类:
其他好文 时间:
2015-10-17 07:02:12
阅读次数:
261
QUESTION NO: 415
You issued the following command on the temporary tablespace LMTEMP in your database:
SQL>ALTER TABLESPACE lmtemp SHRINK SPACE KEEP 20M;
Which requirement must be fulfilled for th...
分类:
其他好文 时间:
2015-10-15 11:23:15
阅读次数:
149
Provide Regular Time to FocusJames Leigh
Toronto, Ontario, Canada
SoFTWARE DEvEloPERS REgUlARly REPoRT that interruptions such as meetings, demos, and urgent bug fixes keep them from completing their...
分类:
其他好文 时间:
2015-10-13 13:54:11
阅读次数:
130
题目大意:有n件工作,做每件工作的消耗时间为s,截止时间为d,问最多能做完几件工作。题目分析:贪心策略:优先做截止时间靠前的,一旦做不完当前工作,则从已经做过的工作中删去一件耗时最长的,用当前工作取代之。代码如下:# include# include# include# include# inclu...
分类:
其他好文 时间:
2015-10-12 22:29:33
阅读次数:
215
题意:n个订单,每个订单有完成需要的天数,和限制的天数,求最多能完成多少订单分析:先按限制日期升序排列,若当前订单不能完成,和上面已选中的订单中需要天数中最大的比较,若比它小,则替换他。#include #include #include #include #include #include #in...
分类:
其他好文 时间:
2015-10-11 21:23:14
阅读次数:
177