#include using namespace std; #include using namespace atcoder; using mint=atcoder::modint998244353; #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #define int long long using ld=long double; signed main(){ int N;cin>>N; vector A(N);for(auto&&e:A)cin>>e; int cnt=N*(N+1)/2; int ans=1; for(int avg=1;avg<=30;avg++){ vector B(N); for(int i=0;i sm={0}; for(auto&&e:B)sm.push_back(sm.back()+e); map> v; for(int i=0;i ls; for(int i=0;i