I got tle i think i gave wrong constraint please tell me right constraints ,also if its due to some other wrong syntax please guide me
.thank you
TLE error is being showed in op
hello @rastogi.g1998
dont declare very big size array in ur program (it will give segmentation fault).
first read n and then declare ur array a as
cin>>n;
ll a[n];
also for ur temp array declare it as
ll temp[e+1];
Or should i use vectors??
vector will not create any difference