This is a misleading question . Considering n gave me wrong answer and not considering it got ac.
Did anyone find out where the error is occuring?
Check
int arr[n+1];
Ohh right,it should be arr[k+1], BTW i moved from runtime error to wrong answer. Price cannot be zero! right Plz help in finding out that too which test case is causing wrong answer.
There should probably be a constant value. (I don’t know if dynamic tables are used that way - square or round brackets)
The problem of ABA12C is not clear to me.
WRONG QUESTION STATEMENT! DON’T CONSIDER n