随笔分类 -  贪心+排序

贪心+排序
HDU2385Stock
摘要:1 /*既然前一天的可以省下来给过后一天卖,那么就倒着卖,那么最后一天的只能在最后一天卖,如果可以卖完,还有可卖的名额,那么就从 2 倒数第二天取,如果卖不完只能丢掉,而且必定是尽量留到价格最高的那一天卖*/ 3 /*HDU2385*/ 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 const int maxn=100000+10;10 struct N11 {12 int x,p,m;13 bool operator q;24 N a;25 while(t--)26 ... 阅读全文

posted @ 2013-08-04 17:53 ok_boy 阅读(315) 评论(0) 推荐(0)

导航