1 test case going wrong


the code works well for custom test case vut 1 test case is wrong upon final submission

hello @tanjuljain19,
a) value of n can be upto 1000 000 000 ,and we cannot declare that big size array inside ur program because it requires too much memory.

use top down dp and map to rectify ur issue.

https://ide.codingblocks.com/s/231331 how to resolve this error

@tanjuljain19
pls refer this->

use map.

https://ide.codingblocks.com/s/231355 shows tle

u have declared m as a global variable so no need to pass insider function

resolved thanks a lot