分组——洛谷
P4447 [AHOI2018初中组]分组 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn)
一开始看到这题,十分想当然的以为只要排个序,然后找到连续的最短的数组就行,然而事实证明我想简单了。。。
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 10;
ll a[N], s[N];
stack<int>st[N];
int main.
原创
2022-03-14 00:01:49 ·
136 阅读 ·
0 评论