Hey, I am new to this so pardon me if its a naive question. I am getting a runtime error — runtime error: index 3676163 out of bounds for type 'int [n]' when executing my program. However, the same isnt happening when i am running it on my pc. Here is my solution to the problem.
Also all the output values are coming correct both when trying it out on pc or on platform. I am unable to see cases where it is going out of bound (for all values of m and n and values contained in p).