摘要: 对task和machine的yi由小到大进行排序,然后对machine来跟task配对。当machine[].yi >= task[].yi时,就更新线段树,在1-1440上做线段树,线段树存的是task[].xi,同时用用优先队列保存task[].yi;当machine[].yi 2 #incl... 阅读全文
posted @ 2014-07-23 15:09 L__J 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 基本思想是贪心。对于价值c=500*xi+2*yi,yi最大影响100*2 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 10 using namespace std;11 12 #def... 阅读全文
posted @ 2014-07-23 14:05 L__J 阅读(241) 评论(0) 推荐(0) 编辑
摘要: A - Rewards 1 #include 2 #include 3 using namespace std; 4 int main(){ 5 int a[3], b[3], sum1 = 0, sum2 = 0; 6 int n; 7 for( int i = 0; i ... 阅读全文
posted @ 2014-07-23 11:55 L__J 阅读(169) 评论(0) 推荐(0) 编辑