摘要: 用动态规划超时了,悲剧,没想到可以用贪心O(n)就搞定了。#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;struct node{ int x,y;}vert[100010];int res[100010];int cmp(node a,node b){ return a.x < b.x;}int work(int n,int m){ int i,k=0,max=0,count=0,pre=0; if(n==0 阅读全文
posted @ 2012-05-07 11:11 书山有路,学海无涯 阅读(165) 评论(0) 推荐(0) 编辑