@@harshharsh1166 no it is max(m^2 log n, n log n), because the sorting part we are not doing on whole array, and also we are clearing it as soon as we get a 0
sir yeh bata ki jaise jo third wala tha to usme agar saare element ki frequency nikal kar , un elements ki bhi frequency nikalenge jo array nahi hai , then unme k consecutive ka max sum nikal le to sit test case 1 tak chal raha hai
@@whoamitotheworld4567 I said it's a general problem with n*K transitions I never said it's the total time complexity, K is a constant that you have to manage to make sure it fits the bounds, in this case it was log(n) and n was m So you had M * Log(N) transitions. DP + binary search is common, if you have practised fundamental problems it appears in longest increasing subsequence to better the complexity of transitions from O(N) to O(logN) similarly we used that technique here by finding upper bound. So if you have done that you would have never asked if it's a common pattern, if you haven't please do it.
Please fill the Feedback form for PCD: forms.gle/vFqPuXCuCMxizwok6
I'll fill it after watching
huge respect from Vietnam !
I was confused by codeforces editotial ,but here i got all clarity
Gifted explainer. super good
D was a great problem
Sound quality is very good
Greatly explained
i am new at codeforces and this was my first contest and i was able to do 1st question and +371 is it good
yes keep it up
thank you sir
The code used in video for problem D gives TLE on test case 10 in cf
crazy explanations
The time comp. Of (D) is larger than (n lg n + m^2 lg n).
m*n log n + m^2 log n
@@harshharsh1166 no it is max(m^2 log n, n log n), because the sorting part we are not doing on whole array, and also we are clearing it as soon as we get a 0
very nice explanation
sir yeh bata ki jaise jo third wala tha to usme agar saare element ki frequency nikal kar , un elements ki bhi frequency nikalenge jo array nahi hai , then unme k consecutive ka max sum nikal le to sit test case 1 tak chal raha hai
superb explaination .
Why not we can use 2 common prefix in two string? Problem A
is memoisation soln available for ques D?
sir, saying not to go in n^2 le me playing in n^3
sir i am also from iit dhanbad aapki tarah cp kab kar paunga
I used map in b but at it gave tle at 10th test
thanks :)
question A: is this test case will work :
abc
defabc
now time is 9sec or 7sec...?
9
9
bhai aggar pehla character hi same nahi to o/p dono string ki length output kar dena
@@DevilIitian absolutely right
7, but dont know why he told this way, i red the statement again and again, but don't know how the output and statment of the problem mismatches.
is problem D a common dp pattern?
I mean it's a very standard dp nothing special about it, it's just linear dp with >> O(n*K) transitions
@@SNX03 n*m would give you tle, my question was is it a common pattern to apply dp and use sorting and binary search in range.
@@whoamitotheworld4567 I said it's a general problem with n*K transitions I never said it's the total time complexity, K is a constant that you have to manage to make sure it fits the bounds, in this case it was log(n) and n was m
So you had M * Log(N) transitions. DP + binary search is common, if you have practised fundamental problems it appears in longest increasing subsequence to better the complexity of transitions from O(N) to O(logN) similarly we used that technique here by finding upper bound. So if you have done that you would have never asked if it's a common pattern, if you haven't please do it.
@@SNX03 Thanks
@@whoamitotheworld4567 your welcome bro