https://ide.codingblocks.com/s/38828 2
queston ishttps://hack.codingblocks.com/contests/c/512/1714
what s a mistake.please correct
N king---------------------------------
Hey Chinmay, your output for each test case should be printed in a new line and your output will be variable c instead of 2*c. So, correct your code’s line: 72 as cout<<c<<endl; it will help to pass half of the test cases but to pass all the cases successfully you have to use DP approach for this question. So, think a lil bit how you can apply DP in this problem. If still you will not be able to think the correct DP approach, do post your doubt we will help you further.
Hope this helps you 