摘要:
简单贪心,贪心原则是将每一个单调序列尽可能的大。#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... 阅读全文