07-23 18:16:17.641: W/SQLiteConnectionPool(28390): A SQLiteConnection object for database '/storage/emulated/0/cnOA.db' was leaked! Pl...
分类:
移动开发 时间:
2014-07-23 20:36:55
阅读次数:
246
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4864
题意:N个机器,M个任务,每个机器每天只能完成一件任务。每台机器有它的最长工作时间t和等级lv,每个任务也有它的需要时间t和等级lv,工作时间超过需要时间并且等级超过任务等级的机器人才能完成这个任务。完成每个任务获得的收益是500*t+2*lv,问最多可以当天可以获得多少收益。
思路:将所有机器...
分类:
其他好文 时间:
2014-07-23 17:07:21
阅读次数:
161
Problem Description
Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M
Angel's friends want to save Angel. Their task is: approach Angel. W...
分类:
其他好文 时间:
2014-07-23 16:40:42
阅读次数:
233
Problem Description
Today the company has m tasks to complete. The ith task need xi minutes to complete. Meanwhile, this task has a difficulty level yi. The machine whose level below this task’s le...
分类:
其他好文 时间:
2014-07-23 16:36:41
阅读次数:
208
.NET异步编程之新利器——Task与Await、Async一.FrameWork 4.0之前的线程世界 在.NET FrameWork 4.0之前,如果我们使用线程。一般有以下几种方式:使用System.Threading.Thread 类,调用实例方法Start()开启一个新线程,调用...
分类:
Web程序 时间:
2014-07-23 16:33:41
阅读次数:
398
http://acm.hdu.edu.cn/showproblem.php?pid=4864【题意】 有n个机器每个机器都有一个最长工作时间和等级,m个任务,每个任务有一个需要花费的时间和任务等级,每个任务完成了可以得打到500*time+2*rank 块钱,一个机器只能对应做一个时间和等级都 .....
分类:
其他好文 时间:
2014-07-23 16:30:41
阅读次数:
241
对task和machine的yi由小到大进行排序,然后对machine来跟task配对。当machine[].yi >= task[].yi时,就更新线段树,在1-1440上做线段树,线段树存的是task[].xi,同时用用优先队列保存task[].yi;当machine[].yi 2 #incl....
分类:
其他好文 时间:
2014-07-23 16:29:51
阅读次数:
297
贪心,排序,二分。。。#include #include #include #include #include using namespace std;const int maxn = 200010;struct node { int x,y; int price; int mak...
分类:
其他好文 时间:
2014-07-23 15:49:19
阅读次数:
216
Darwin Streaming Server 是一个开放源代码的streaming server,对于streaming server的编程和软件结构有着一定的参考价值,它是使用C++写的,其中的并发模式的核心就是Task类,下面写一下我的理解:多任务的程序常常采用线程+同步阻塞IO的模式, 每个...
1、要能够分析出贪心的理由
2、在lv里面进行lower_bound : 因为对于task的time本来就已经是从大到小排好序的,对于task里的每个time我们应该从最小的level开始放,
因为可能在task后面有比较大的lv;
3、lower_bound的用法
4、二分的写法
5、比较函数cmp
#include
#include
#include
#i...
分类:
其他好文 时间:
2014-07-23 13:29:36
阅读次数:
232