- 210
- 63 014
Soumya Bhattacharjee
Registrace 23. 02. 2018
I am CM at CF, 6* at CC and Blue at Atcoder. I will try to explain some CP/Leetcode problems which are interesting to me and no other better explanations of those problems are available till my video.
F. Sakurako's Box (Codeforces Round 970(Div. 3) )
Please speed up to 1.5X
Code link: codeforces.com/contest/2008/submission/279205744
#leetcode #codeforces #codeforces #programming #cp
Code link: codeforces.com/contest/2008/submission/279205744
#leetcode #codeforces #codeforces #programming #cp
zhlédnutí: 89
Video
G. Sakurako's Task (Codeforces Round 970(Div. 3) )
zhlédnutí 74Před 12 hodinami
Please speed up to 1.5X Code link: codeforces.com/contest/2008/submission/279216892 #leetcode #codeforces #codeforces #programming #cp
Find the Power of K-Size Subarrays II (Leetcode BiWeekly 137)
zhlédnutí 57Před 14 dny
Watch in 1.5X Here I have provided the solution and explanation of the 3rd problem of Leetcode BiWeekly 137 Code: leetcode.com/contest/biweekly-contest-137/submissions/detail/1359000638/ #leetcode #Leetcode #Weekly #programming #cp #codechef #codeforces
Maximum Value Sum by Placing Three Rooks II (Leetcode BiWeekly 137)
zhlédnutí 585Před 14 dny
Watch in 1.5X Here I have provided the solution and explanation of the 4th problem of Leetcode BiWeekly 137 Code: leetcode.com/contest/biweekly-contest-137/submissions/detail/1359153697/ #leetcode #Leetcode #Weekly #programming #cp #codechef #codeforces
E - Xor Sigma Problem (AtCoder Beginner Contest 365)
zhlédnutí 194Před měsícem
Code: atcoder.jp/contests/abc365/submissions/56273948 #atcoder #codechef #codeforces #arc #cp #abc #Atcoder
Number of Subarrays With AND Value of K (Leetcode Biweekly 134)
zhlédnutí 240Před 2 měsíci
Watch in 1.5X Here I have provided the solution and explanation of the 4th problem of Leetcode Biweekly 134 Code: leetcode.com/contest/biweekly-contest-134/submissions/detail/1311758863/ #leetcode #Leetcode #Weekly #programming #cp #codechef #codeforces
F - x = a^b (AtCoder Beginner Contest 361)
zhlédnutí 94Před 2 měsíci
Code: atcoder.jp/contests/abc361/submissions/55303548 #atcoder #codechef #codeforces #arc #cp #abc #Atcoder
E - Tree and Hamilton Path 2 (AtCoder Beginner Contest 361)
zhlédnutí 57Před 2 měsíci
Code: atcoder.jp/contests/abc361/submissions/55290666 #atcoder #codechef #codeforces #arc #cp #abc #Atcoder
E - Random Swaps of Balls (AtCoder Beginner Contest 360)
zhlédnutí 143Před 2 měsíci
Code: atcoder.jp/contests/abc360/submissions/55083953 #atcoder #codechef #codeforces #arc #cp #abc #Atcoder
G - Suitable Edit for LIS (AtCoder Beginner Contest 360)
zhlédnutí 92Před 2 měsíci
Code: atcoder.jp/contests/abc360/submissions/55099958 #atcoder #codechef #codeforces #arc #cp #abc #Atcoder
Leetcode Weekly 404 Screencast (All problems)
zhlédnutí 103Před 2 měsíci
Use earphones for a better experience #leetcodecontest #leetcode #weekly #programming #cp #codechef #codeforces
Find Minimum Diameter After Merging Two Trees (Leetcode Weekly 404)
zhlédnutí 84Před 2 měsíci
Watch in 1.5X Here I have provided the solution and explanation of the 4th problem of Leetcode Weekly 404 Code: leetcode.com/contest/weekly-contest-404/submissions/detail/1304395179/ #leetcode #Leetcode #Weekly #programming #cp #codechef #codeforces
F. Non-academic Problem (Codeforces Round 954 (Div. 3) )
zhlédnutí 432Před 2 měsíci
Please speed up to 1.5X Code link: codeforces.com/contest/1986/submission/267035954 #leetcode #codeforces #codeforces #programming #cp
E. Beautiful Array (Codeforces Round 954 (Div. 3) )
zhlédnutí 363Před 2 měsíci
Please speed up to 1.5X Code link: codeforces.com/contest/1986/submission/267026438 #leetcode #codeforces #codeforces #programming #cp
D. Mathematical Problem (Codeforces Round 954 (Div. 3) )
zhlédnutí 364Před 2 měsíci
Please speed up to 1.5X Code link: codeforces.com/contest/1986/submission/267080889 #leetcode #codeforces #codeforces #programming #cp
Find the Minimum Area to Cover All Ones II (Leetcode Weekly 403)
zhlédnutí 216Před 2 měsíci
Find the Minimum Area to Cover All Ones II (Leetcode Weekly 403)
Leetcode Weekly 403 Screencast (All problems)
zhlédnutí 83Před 2 měsíci
Leetcode Weekly 403 Screencast (All problems)
E - Water Tank (AtCoder Beginner Contest 359)
zhlédnutí 105Před 2 měsíci
E - Water Tank (AtCoder Beginner Contest 359)
D - Avoid K Palindrome (AtCoder Beginner Contest 359)
zhlédnutí 301Před 2 měsíci
D - Avoid K Palindrome (AtCoder Beginner Contest 359)
C - Tile Distance 2 (AtCoder Beginner Contest 359)
zhlédnutí 159Před 2 měsíci
C - Tile Distance 2 (AtCoder Beginner Contest 359)
Leetcode Weekly 402 Screencast + Explanation(All problems)
zhlédnutí 195Před 2 měsíci
Leetcode Weekly 402 Screencast Explanation(All problems)
G - AtCoder Tour (AtCoder Beginner Contest 358)
zhlédnutí 114Před 2 měsíci
G - AtCoder Tour (AtCoder Beginner Contest 358)
E - Alphabet Tiles (AtCoder Beginner Contest 358)
zhlédnutí 219Před 2 měsíci
E - Alphabet Tiles (AtCoder Beginner Contest 358)
Leetcode Biweekly 132 Screencast(All problems)
zhlédnutí 294Před 2 měsíci
Leetcode Biweekly 132 Screencast(All problems)
E - Reachability in Functional Graph (AtCoder Beginner Contest 357)
zhlédnutí 173Před 2 měsíci
E - Reachability in Functional Graph (AtCoder Beginner Contest 357)
D - 88888888 (AtCoder Beginner Contest 357)
zhlédnutí 153Před 2 měsíci
D - 88888888 (AtCoder Beginner Contest 357)
Lexicographically Minimum String After Removing Stars (Leetcode Weekly 400)
zhlédnutí 42Před 3 měsíci
Lexicographically Minimum String After Removing Stars (Leetcode Weekly 400)
Find Subarray With Bitwise AND Closest to K (Leetcode Weekly 400)
zhlédnutí 101Před 3 měsíci
Find Subarray With Bitwise AND Closest to K (Leetcode Weekly 400)
Count Days Without Meetings (Leetcode Weekly 400)
zhlédnutí 99Před 3 měsíci
Count Days Without Meetings (Leetcode Weekly 400)
Block Placement Queries (Leetcode Biweekly 131)
zhlédnutí 382Před 3 měsíci
Block Placement Queries (Leetcode Biweekly 131)
Saw you competing today after a long time.. Solved A-D and F
Detto code but gives the now , they added so.e extra test cases
Didn't understand the part of the pigeon hole principle. - how did you use it ? Can you explain it in somewhat easy way.
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
@@soumyabhattacharjee1051 ok thank you I will rewatch the video
Bhai kya bawasir he ye solution bhi shi nhi he
Give a case where its failing
Great solution!
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
Can you explain solution of problem G?
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.
Sure, will keep that in mind
nice explanation 👍
very helpful dada ❤
d problem?
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
@@soumyabhattacharjee1051 understood the approach, how can we be sure about the tc, can u pls elborate
@@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
thanks
Bro can you explain C and D prb too?
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
Your explanations are way better than @aryanc's. Thank you for making such good explanatory videos. Keep it up!
thanks for such a simple and great explanation sir!
Thank you sir. I learnt a lot from you.
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?
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
@@soumyabhattacharjee1051 subscribed sir
Bro,can you help with B? I am trying to code it in python
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
underrated channel, love these crisp explanations over those 40 to 60 minute long other video solutions
Thank you so much for the appreciation, it means a lot. Hope you subscribed 😀
great solution😊
why did u stop codeforces?
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
@@soumyabhattacharjee1051 Understandable.. bro has a job to keep
Thank you, finally understood what the problem was trying to say
Thanks for the appreciation, please subscribe if you have not already 😃
provide solution for probem G
great explaination
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.
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
Bro 23311's output is 19
Sorry, did not get it. Can you elaborate?
@@soumyabhattacharjee1051 look at the first test case's 7th number input and output
Could u recommend some dp on bits questions
this contest was more difficult than past contests
Yes this C broke the flow of the contest, maybe easier C would be better
Biweekly 4th question
Thanks a lot!
Please subscribe if you find this helpful!!
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.
Great explanation ❤️❤️
Can we do rerooting instead of "in-out dp"
👍
g problem pls, thanks:)
Its already there in the channel, please check. Thanks. Please subscribe
amazing screencast Can you please explain the last question in detail? Thank you
Bhaiya is there any way to connect with you?
Except linkedin
I wanna ask about cp
Hey, lets connect on linkedin
Cfbr
Excellent subscribed But can we do this with heap/sliding window
the code you have provided has used (n*s) while calculating the power which will overflow in cpp but gets accepted in python but in cpp to do binary exponentiation of (10,n*s) we will have to use euler totient function of mod
Not necessarily, 2 tricks you can use for the given constraints. Unsigned long long instead of long long to store r=10^s, and then you can use (r^n-1)/(r-1). You can check my code atcoder.jp/contests/abc357/submissions/54462244. Please like and subscribe if it is helpful
@@soumyabhattacharjee1051 got it thanks! Subscribed!
there is one more condition. that when you do (a/b) % m. b should not be integral multiple of m. How do you prove that here (10 ^ k - 1) is not multiple of mod= 998244353 ??
You can check out the article link I have provided in the description for further details, generally if the modulo is prime I use this formula but have not checked the proof yet. Please like and subscribe if you find this helpful
👍
solved it by myself..thanks
not understandable at all
Amazing approach! Thanks for sharing. How did u come up with this one?
You can check my screencast for this contest czcams.com/video/-S_n2mNpwqU/video.html (Please use earphones)
bro mic thik kr lo apna awaz hi nhi aa rhi hai , itna dhree bol rhe ho
Yes some issue with the voice today, please use earphones for now. Will improve it surely
Great explanation!
Thanks
Sir can you explain the transitions again? i mean why you used AND if turn==0 and OR otherwise
ans means who is winning. Its initialized to the opposite of the current player. So let say if its 0's turn then ans=1. Now if any one of the possible (i,j) leads us to the 0 then the current player will win. So we are taking bitwise and. Because only one 0 will make the answer 0. Similar for 1, we are taking OR because only one 1 will make the ans 1. If you find this helpful please like, share and subscribe, thanks
@@soumyabhattacharjee1051 oh got it! thanks a lot again! also sir, can you refer some problems of bitmask dp(cf or atcoder) to practice because I just got introduced to it through this video.
why we are using & in 67th line and | in 68th line this portion is not clear
ans means who is winning. Its initialized to the opposite of the current player. So let say if its 0's turn then ans=1. Now if any one of the possible (i,j) leads us to the 0 then the current player will win. So we are taking bitwise and. Because only one 0 will make the answer 0. Similar for 1, we are taking OR because only one 1 will make the ans 1. If you find this helpful please like, share and subscribe, thanks