摘要:
Bad Hair Day开个标记数组记录,记录右边第一个比它大的位置。#include #include #define N 80001long long p[N],left[N],sum;int main(){ int n,i,j; scanf("%d",&n); for(i = 1; i = 1; i--) { j = i+1; while(j #include using namespace std;const int N = 80005;int stack[N];int top, n;int main(){ int num; ... 阅读全文