Bro thank you very much.!! Change your mic bro. You have a great potential !.
@mostafasazid11 күн бұрын
Code link not work
@soumyabhattacharjee105110 күн бұрын
Oh sorry, I did not know we can not directly share code link cses.fi/paste/0b9bc0acd257b34ba44d32/ Updated it now
@AswinnathTE-f8j15 күн бұрын
my Trie solution ``` class TrieNode: def __init__(self): self.child={} self.count=0 class Trie: def __init__(self): self.root=TrieNode() def insert(self,word): dmy=self.root ans=0 for i in word: if i not in dmy.child: dmy.child[i]=TrieNode() else: ans+=dmy.child[i].count dmy=dmy.child[i] dmy.count+=1 return ans n=int(input()) arr=[i for i in input().split()] ans=0 Tree=Trie() for i in arr: ans+=Tree.insert(i) print(ans) ```
@NayanPahuja22 күн бұрын
Hey Man, Great Explanations. you are bound to go popular soon!. Keep up the good work
@soumyabhattacharjee105120 күн бұрын
Hello, thanks for the comment. Please subscribe to the channel if you have not already
@studyplanet465623 күн бұрын
What would be the difficulty level of this question as compared to codeforces , any idea what would be its rating .
@soumyabhattacharjee105123 күн бұрын
I think it would be around 1700-1900(Div2 C/D). If you find this helpful, please like and subscribe
@studyplanet465624 күн бұрын
Great explanation , I like the observation 👍👍
@soumyabhattacharjee105124 күн бұрын
Thank you, please subscribe
@surendrapokala553328 күн бұрын
I watched many videos for this problem but it is the short and more intutive, Thanks bro
@soumyabhattacharjee105128 күн бұрын
Thanks for the comment, please subscribe to the channel
@tempbot7190Ай бұрын
Great Explanation! Please continue such explanation as main focus should be on intuition and approach rather than code
@sadharanInsaan122Ай бұрын
Excellent explanation.. Keep it up.. Make more editorials for upcoming contests
@soumyabhattacharjee1051Ай бұрын
Thanks, please subscribe
@ITACHIUCHIHA-dr8szАй бұрын
Your explanations are always crisp and sufficient, thanks a lot
@soumyabhattacharjee1051Ай бұрын
Thanks, it means a lot
@dhruvkumarkakadiya410Ай бұрын
not understand anything at all!
@Code_NoteАй бұрын
Thanks for this solution dada , during contest I got the idea of using mask but wasn't able to play with the mask correctly.
@kz_cbble9670Ай бұрын
Saw you competing today after a long time.. Solved A-D and F
@Naman-n4b2 ай бұрын
Detto code but gives the now , they added so.e extra test cases
@TarunSantani2 ай бұрын
Didn't understand the part of the pigeon hole principle. - how did you use it ? Can you explain it in somewhat easy way.
@soumyabhattacharjee10512 ай бұрын
Pigeon hole principle says that if there are N numbers and we are taking N+1 numbers then at least one number bound to get repeated. Similar concept here, let say if the N+M-1 cells are from the same row and same column of the current cell and we take N+M+1 max cells then we are going to find the max and second max excluding all the cells of the current cell's row and column If you find this helpful, please like and subscribe
@TarunSantani2 ай бұрын
@@soumyabhattacharjee1051 ok thank you I will rewatch the video
@mohammadehson15852 ай бұрын
Bhai kya bawasir he ye solution bhi shi nhi he
@soumyabhattacharjee10512 ай бұрын
Give a case where its failing
@arshlanali56652 ай бұрын
Great solution!
@mowafkmha45052 ай бұрын
nice approach of counting the number of segments which will have odd and even number of 1's . there is actually an easier approach which aryanc explained using the prefix xor but it might be a little hard to think about the prefix xor which will make the counting much more simpler
@therawringkitty2 ай бұрын
Can you explain solution of problem G?
@adi41783 ай бұрын
You explain well, I recomand you to give us all approach from brute force to optimal, If you do it your chanal will grow because no one do this.
@soumyabhattacharjee10513 ай бұрын
Sure, will keep that in mind
@prajjawalsingh49523 ай бұрын
nice explanation 👍
@ouvik95093 ай бұрын
very helpful dada ❤
@kashishchawla27543 ай бұрын
d problem?
@soumyabhattacharjee10513 ай бұрын
D is kind of a simple breadth-first search, so have not covered it, you can check my solution atcoder.jp/contests/abc361/submissions/55280719 and ask me if there is any doubt
@kashishchawla27543 ай бұрын
@@soumyabhattacharjee1051 understood the approach, how can we be sure about the tc, can u pls elborate
@soumyabhattacharjee10513 ай бұрын
@@kashishchawla2754 The total number of states are at max O(N2^N) N for choosing the i where i and i+1 are spaces and 2^N for combinations of other. Now for each space the rearrangement is O(N) so overall complexity should not be more than O(N^2*2^N) Please like and subscribe if it is helpful
@kashishchawla27543 ай бұрын
thanks
@PubgMerabeta3 ай бұрын
Bro can you explain C and D prb too?
@soumyabhattacharjee10513 ай бұрын
D is kind of a simple breadth-first search, so have not covered it, you can check my solution atcoder.jp/contests/abc361/submissions/55280719 and ask me if there is any doubt For C you can think about having a subsequence of N-K elements, so we can sort it and consider every subarray of size n-k. Here is my solution atcoder.jp/contests/abc361/submissions/55269760
@Jafar8013 ай бұрын
Your explanations are way better than @aryanc's. Thank you for making such good explanatory videos. Keep it up!
@darkknight98-v3 ай бұрын
thanks for such a simple and great explanation sir!
@furynick16203 ай бұрын
Thank you sir. I learnt a lot from you.
@avijitbiswas35444 ай бұрын
dp[i][1] = ( 1 + (n - 1) * (n - 1) ) * dp[i - 1] [1] can you explain why you are adding + 1 there. that part is already cover na?
@soumyabhattacharjee10514 ай бұрын
No (n-1)(n-1) is for choosing anything other than the current j, and 1 when getting (j,j) Please like, share and subscribe if it's helpful
@avijitbiswas35444 ай бұрын
@@soumyabhattacharjee1051 subscribed sir
@angryman55174 ай бұрын
Bro,can you help with B? I am trying to code it in python
@soumyabhattacharjee10514 ай бұрын
Try to contruct the string for every value of c and w Here is my python code for ref: atcoder.jp/contests/abc360/submissions/55056440 Please like and subscribe if it is hepful
@ITACHIUCHIHA-dr8sz4 ай бұрын
underrated channel, love these crisp explanations over those 40 to 60 minute long other video solutions
@soumyabhattacharjee10514 ай бұрын
Thank you so much for the appreciation, it means a lot. Hope you subscribed 😀
@amolmittal88954 ай бұрын
great solution😊
@kz_cbble96704 ай бұрын
why did u stop codeforces?
@soumyabhattacharjee10514 ай бұрын
Generally cf contests are on weekdays and I do not get time to attend those. If there is some on weekend I can check those. As I am not regular and codeforces contests need grinding, I avoid participating rated. If there is something unrated like div3 in weekends I will definitely try to do it
@kz_cbble96704 ай бұрын
@@soumyabhattacharjee1051 Understandable.. bro has a job to keep
@blazerchicken16194 ай бұрын
Thank you, finally understood what the problem was trying to say
@soumyabhattacharjee10514 ай бұрын
Thanks for the appreciation, please subscribe if you have not already 😃
@Dhruv-fn8yr4 ай бұрын
provide solution for probem G
@shubhamtanwar70394 ай бұрын
great explaination
@shivamshrivastava56364 ай бұрын
Sir in case one of the values contains an odd number of elements, we have to ignore one of the elements. My intuition was to two create two cases: In the first case we will ignore the smallest element of the set and in the second case we will ignore the largest element of the set, we will take the minimum of the two cases in our answer. However, my approach is failing on some of the test cases.
@soumyabhattacharjee10514 ай бұрын
Consider the case 1 3 9 15 17 Here we have to ignore 9 which is neither max or min Please subscribe if you find this helpful
@FactsPolice4 ай бұрын
Bro 23311's output is 19
@soumyabhattacharjee10514 ай бұрын
Sorry, did not get it. Can you elaborate?
@FactsPolice4 ай бұрын
@@soumyabhattacharjee1051 look at the first test case's 7th number input and output
@manmeet7044 ай бұрын
Could u recommend some dp on bits questions
@thequacker65044 ай бұрын
this contest was more difficult than past contests
@soumyabhattacharjee10514 ай бұрын
Yes this C broke the flow of the contest, maybe easier C would be better
@The-fc1fi4 ай бұрын
Biweekly 4th question
@amimultamim98934 ай бұрын
Thanks a lot!
@soumyabhattacharjee10514 ай бұрын
Please subscribe if you find this helpful!!
@sudhanshunain46904 ай бұрын
thank u!! I thought the same idea but wasnt able to implement it. Can you also discuss 2 more approaches given in editorial, 1) By SCC and topological sort 2) Something related to depth of directed tree etc.
@code41114 ай бұрын
Great explanation ❤️❤️
@Anonymous____________A7214 ай бұрын
Can we do rerooting instead of "in-out dp"
@helpingcoder19104 ай бұрын
👍
@kashishchawla27544 ай бұрын
g problem pls, thanks:)
@soumyabhattacharjee10514 ай бұрын
Its already there in the channel, please check. Thanks. Please subscribe
@darksidekiller53004 ай бұрын
amazing screencast Can you please explain the last question in detail? Thank you