#include using namespace std; #pragma GCC optimize("Ofast") #pragma GCC optimize ("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define int long long #define F first #define S second #define pb push_back int n,a[1000005],ans[1000005]; vector v[1000005]; int mn,cnt[2000005]; signed main() { cin.tie(0); ios_base::sync_with_stdio(0); //cin>>n; n=300000; int sum=0; for(int i=0;i>a[i]; a[i]=i+1; sum+=a[i]; } mn=a[0]; for(int i=0;i>1; if(a[mid]>=now) r=mid; else l=mid+1; } v[l].pb(i); now+=a[i]; } } //return 0; for(int i=0;i