Please hep in the code

Hello @anmolaggarwal.432 what is the problem that you are facing?

@anmolaggarwal.432 check this:
https://ide.codingblocks.com/s/450132

What is the problem in using vector

The code is not getting submited on the site also please help

is it showing submission not judged??

it is showing run time eror

check now:

Why have we declared temp and arr size first and not using vector

see if you want to do this with vector:

as constraints are larger so it is always better to take declare them of size according to the constraints.