摘要: 简单贪心,贪心原则是将每一个单调序列尽可能的大。#include<iostream>#include<cstdio>#include<cstring>using namespace std;int data[100001];int work(int m,int n){ int head=m+1,count=0; if(n-m<=1) return 1; while(head<=n) { count++; while(data[head]==data[head-1]) head++; if(data[head]>data[head... 阅读全文
posted @ 2012-05-08 13:11 书山有路,学海无涯 阅读(186) 评论(0) 推荐(0) 编辑