Runtime error, but correct output

Revision en3, by peacock_18, 2020-02-25 07:25:35

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).

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English peacock_18 2020-02-25 07:25:35 0 (published)
en2 English peacock_18 2020-02-25 07:25:01 49
en1 English peacock_18 2020-02-25 07:23:57 591 Initial revision (saved to drafts)