One test case is failing

while taking the input array can be of max size 10^5 but in this question, array constraint is 10^6 how to tackle this , because of this I am getting or something please check
code id https://ide.codingblocks.com/s/206469

@rsaini9416624750,
You can declare a array of size 10^6, just make sure you declare it globally.