摘要:
题目大意和思路同上题类似, 本题特殊点为其需要将多组满足要求的结果按递增全部输出。解题代码: View Code #include<stdio.h>#include<string.h>#include<stdlib.h>using namespace std;#define MAX(a,b) (a)>(b)?(a):(b)#define MIN(a,b) (a)<(b)?(a):(b)const int N = 50010;int M[N], n;int head[N], idx;struct node{ int max, sum;}D[N];s 阅读全文