Regarding this program


sir I am getting a run error can you please check

Please check the constraints. The maximum size of the array can be 2*10^5. Just change line 28 to -

int a[n];