please can anybody tell me which case my code doesn’t pass.
http://www.codechef.com/viewsolution/2308889
Well i am getting acc. ans for subtask #2,but wrong ans for subtask #1,#3.
any corner cases to take care of.
I have taken care of The condition if productPrice-discount<0 => productPriceAfterDiscount=0.
I have also used long long
I was a little confused with this problem, it makes me slightly take some time, this appears to be the problem of finding the shortest path but eh
For people finding some difficulty in understanding , try solving this question
Assembly Line Scheduling | DP-34 - GeeksforGeeks.
The above question adheres to the same logic.
How does the above solution pass with the time limit of 1 sec? The worst case time complexity is O(NK) which is O(10^510^5) ? Also the space complexity would be O(10^10). It is not possible to store so many elements in memory.
For time complexity: from constraints: 1 ≤ T * N * M ≤ 1000000
For space complexity: you can dynamically allocate memory, using malloc.
the solution has been written in Pascal, which is quite popular.
i think pascal is not used by many programmers, from normal colleges, NOW A DAYS, so we can’t understand.And this is our request not a complaint…
I had AC on subtasks 2 and 3 and WA on subtask 1 because I used int insead of long long 
Just switch to long long int.
Yes, I also face the same problem and its due to long long int.
@nanditagiri92 : Give a link to your submitted code , only then I can help , otherwise I just have speculate.
@aravind159, Setter and/or tester are free to implement the code on the language of their choice… Gennady himself always coded in Pascal until a very short time ago where he switched to C++… the idea of the editorial was to abstract solution from any particular language 
dont use ULONG_MAX (~4*10^9)for limit, as value is long long (1e18).
I also faced d same problem. 
so what shud i use then??
u shud use 1e18. 
Or just take min=(LL)1e9*1e9
thanks a lot… it worked 
Can anyone please explain the input format? I am new to Codechef. Thank you.