Code is giving rum error

https://ide.codingblocks.com/s/184935
this is the code

hey @yashsingh9289 since the size of array could be as large as 2 * 10^5 make size of arr and temp 200005