I don't comment much but .. Man ur sense of finding hidden patterns in the question is so great...... I have been following u for a while now ....u have the unique and the best way to approach problems ....U inspire me to find patterns in problems which allows me to solve a lot of them sometimes even when i see no clue....Thanks for such a massive contribution in this community and you... as well as ur explanations are highly underrated..
No need to use map as it will cost log(N), i have solved it in O(1), we can store n/15 in ans and n%15 in remainder and then using if else conditions check remainder is 0 or 1 or 2 ... or 14. Then we can output ans+(whatever we get after no. of coins have been minimized). But we must be careful when remainder is 5 or 8, then output will depend on n also.
for second question first i make the array of coins and tried with all permutation of the coins array and return minimum answer of them but it not passed the last two input 98 and the bigger one.
@@AbhinavAwasthi no not any specific reason but for clarification that what questions to solve like on cf i am solving 1100 rated because I feel I am comfortable with 1000 so for the clarity purpose only
Join Telegram: telegram.me/cpabhinav
I don't comment much but ..
Man ur sense of finding hidden patterns in the question is so great...... I have been following u for a while now ....u have the unique and the best way to approach problems ....U inspire me to find patterns in problems which allows me to solve a lot of them sometimes even when i see no clue....Thanks for such a massive contribution in this community and you... as well as ur explanations are highly underrated..
Thanks a lot
yeah i too agree the 2nd question approach was lit i couldn't crack it in 2 hours man
Very nice explanation sir, Thank you!
Welcome
Explanation was lit🔥. And yes can you please post how to solve interactive problems.
Thanks sure
Thanks sure
No need to use map as it will cost log(N), i have solved it in O(1), we can store n/15 in ans and n%15 in remainder and then using if else conditions check remainder is 0 or 1 or 2 ... or 14. Then we can output ans+(whatever we get after no. of coins have been minimized). But we must be careful when remainder is 5 or 8, then output will depend on n also.
Yes, but for 15 values there is no effect
we need more this type of interactive problems
Sure
For B my solution was simple and not think too much. I run dp for n
is that bottom up aproch
@@mkshuvo5141 int recur(int a[],int sum,vector &dp){
int res=INT_MAX;
if(sum==0){
return 0;
}
if(dp[sum]!=-1){return dp[sum];}
for(int i=0;i
Nice
Explanation is Fire
for second question first i make the array of coins and tried with all permutation of the coins array and return minimum answer of them but it not passed the last two input 98 and the bigger one.
i am prioritizing codeforces only so is it fine no? not solving on CodeChef and doing practice on cf only so is it fine?
Any specific reason?
@@AbhinavAwasthi no not any specific reason but for clarification that what questions to solve like on cf i am solving 1100 rated because I feel I am comfortable with 1000 so for the clarity purpose only
It's fine, but you can participate in codechef contests
Nice explanation!👏👏
Thanks
very nice contest and very helpful solutions....
Thanks
Sir ab mujhe lag rha hai drr kyoki last 2 contest B bikul nhi hua ..
koi baat nhi, dar ke aage jeet hai, try krte raho
same mujhko bhi yahi hua pehle b ho jata tha
@@nishcurselast contests se thoda tough bhi aa rha hai
nice thinking❤
Thanks
helpful
Thanks
Thank you sir
Welcome
good it was good
Thanks
sir please share the cp specialist sheet
Please check my Instagram
but how can we prove that the answer for problem B is optimal
Because it's accepted 😂
Actually we are trying to maximise use of 15 rupee coins and then for other cases also we have taken optimised values in map
@@AbhinavAwasthi 🤣 but maybe it will be hacked, because maybe there are other cases other than 5
It's not maybe, I have checked multiple cases
You can try hacking maybe 😂
🤣
Helpful! 🙌
thanks
HOW WILL U DO B WITH DP LIKE MINIMISING COIN OF CSES PLS SHARE CODE
Can't do Bec of high constraints