Vector of 1000*1000 ints

I want to know, can I work on a multidimensional vector of 1000 rows and 1000 columns inside main function?
I am neither passing this vector to any function nor declaring it globally.I am getting WA in a problem,what do you think,is this vector causing this?

If memory was an issue, you would have got a runtime error. Vector with {10}^{6} elements is fine.