Can someone help me find the mistake in my code

link to ques: https://www.hackerrank.com/challenges/dynamic-array/problem

https://ide.codingblocks.com/#/s/18090

Heyy Shagun !!! you are not supposed to declare the array of size greater than 10^8 , use other ds because you made a 2d array of size greater than 10^8.
You can use an array of vector because vector will always take less then 4Q memory so , no run error
Here i have written the code for ur problem , you can take a look
https://ide.codingblocks.com/#/s/18111

1 Like