Winning Codeforces Round

  Рет қаралды 17,248

William Lin

William Lin

Күн бұрын

1st after the end of the contest :) Hopefully I won't be hacked! Explanations video is here: • Codeforces Round #627 ...
If this was helpful, consider liking or subscribing!
Website: williamlin.io/
Instagram: / tmwilliamlin168
Twitter: / tmwilliamlin168

Пікірлер: 74
@ritiksingla9946
@ritiksingla9946 4 жыл бұрын
Not only winning competition but winning our hearts by putting your time in making these live and editorial videos. Thank you so much.
@mridulbhatt620
@mridulbhatt620 4 жыл бұрын
I was frantically sear hing for order statistics for multiset when I realised that ai-bi might repeat. That took a hell lot of time and finally had to resort to another interpretation(was mentioned in the tutorial). Certainly learned something valueable today!!!
@Errichto
@Errichto 4 жыл бұрын
orz
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
orz
@mostafamarwanmostafa9975
@mostafamarwanmostafa9975 Ай бұрын
I swear you are like an inspiration to me
@rafayeathossain8731
@rafayeathossain8731 4 жыл бұрын
thanks for uploading i was able to solve Upto E but missed F , now i have got hint . Thanks
@saikat93ify
@saikat93ify 4 жыл бұрын
Good Job, William. I was waiting for this video. Till what rating do you feel confident of solving a problem in a contest ? For example, I am confident of solving problems rated 1600 or 1700 in a contest. I'd like to discuss F with you. I understood that DFS1 computes the maximum subtree rooted at v for every vertex v. But, I did not understand what dfs2() does. Can you please help me ?
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
dp[u] is the subgraph for the subtree of u, but we don't want to limit ourselves to the subtree of u. We also need to consider the subgraph coming from the parent of u (which is DP as well) and the weight of that subgraph is pd. This is a pretty common trick for DP on trees, when we need to calculate something for each node.
@saikat93ify
@saikat93ify 4 жыл бұрын
@@tmwilliamlin168 Thanks William. Next time, please use a more descriptive name than 'pd'. I was able to solve the problem :)
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
@@saikat93ify I mean, it's a habit, just like a lot of ppl use "dp" for all values related to dp.
@saikat93ify
@saikat93ify 4 жыл бұрын
@@tmwilliamlin168 I see. It's a suggestion. William, I have another doubt. In A, I understand that it is not possible if all the integers do not have the same parity in the beginning. But, how do we prove that it is always possible if all the integers have the same parity ?
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
@@saikat93ify we just look at the highest column and fill all other columns to that height.
@shashanktiwari4442
@shashanktiwari4442 4 жыл бұрын
I did C by just counting max continuous L's + 1.. does it fail at some case?? 😛
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
For contests like these, speed matters a lot, so I implement the first thing which comes to my mind. This causes me to miss simple solutions like these :P
@sahilkalamkar5332
@sahilkalamkar5332 4 жыл бұрын
Nope, it won;t fail.
@kishanpatel3354
@kishanpatel3354 4 жыл бұрын
First video with 0 dislike, sometimes life just surprises me!
@laxityadav9414
@laxityadav9414 4 жыл бұрын
Please make a video on how you started competitive programming.
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
I started with HackerRank problems.
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
@Spakk 9 last year of high school
@dashsights4258
@dashsights4258 Жыл бұрын
​@@tmwilliamlin168 and what does that mean?
@jiakai7254
@jiakai7254 Жыл бұрын
now i will use while(n- -) rather than a for loop xD
@JackSparr0w2023
@JackSparr0w2023 4 жыл бұрын
Thanks for the video .
@shahriarrafsun7078
@shahriarrafsun7078 20 күн бұрын
can anyone tell me the font name?
@elizabeth00653
@elizabeth00653 4 ай бұрын
William we want more coding tutorials please!
@fuasteriskk
@fuasteriskk 3 ай бұрын
so... you dont wait for your solution to get accepted?
@dajamesthompson
@dajamesthompson 4 жыл бұрын
what keyboard do you use?
@shreyanshsingh2627
@shreyanshsingh2627 4 жыл бұрын
If it doesn't hamper your performance, please consider naming variables in a more understandable way. Your code is cool, I can follow along upto like C or D (the topics I know), but it would've been much simpler with descriptive variable names.
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
It actually does, a lot of CPers use one letter variable names
@shreyanshsingh2627
@shreyanshsingh2627 4 жыл бұрын
well your code is still very understandable. thanks for posting
@abylay_gaming
@abylay_gaming 4 жыл бұрын
how did you get idea in E?
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
By doing a lot of DP practice.
@sharathnair1702
@sharathnair1702 4 жыл бұрын
whats the "%y+" thing you do after every code?
@barun511arvindr
@barun511arvindr 4 жыл бұрын
Its a vim function that copies the code into his clipboard
@souravsharma5332
@souravsharma5332 4 жыл бұрын
Can you suggest me a good resource to learn data structure and algorithm.. I am pretty bad at competitive programming i am barely able to solve first 2-3 question codechef long challenge..
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
HackerRank was good for me as a beginner.
@ravikothari3220
@ravikothari3220 4 жыл бұрын
Do a QnA
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
Good idea, maybe I will make a form for it soon!
@JackSparr0w2023
@JackSparr0w2023 4 жыл бұрын
What is the best source for learn data structure & algorithm?
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
There is no best source, you have to find multiple different sources for different topics.
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
@PGTECH STR3AM Google
@brayaon
@brayaon 4 жыл бұрын
I think you should include your GitHub account in video's description.
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
You can just search up tmwilliamlin168 GitHub
@JackSparr0w2023
@JackSparr0w2023 4 жыл бұрын
How much time do you invest on programming every day ?
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
4-10 hours depending on the day.
@simpleman9889
@simpleman9889 4 жыл бұрын
.gvimrc can you share it??
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
pastebin.com/qMvFYGqb
@dngiang2003
@dngiang2003 4 жыл бұрын
tôi vẫn còn vật lộn với pascal 🤭
@rajdeepsahaofficial
@rajdeepsahaofficial 4 жыл бұрын
Are you human?😅
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
Yea I sometimes doubt that. I'm too stupid in life to be human.
@rajdeepsahaofficial
@rajdeepsahaofficial 4 жыл бұрын
@@tmwilliamlin168 🤣
@prarinamderia309
@prarinamderia309 4 жыл бұрын
Can you gave me a idea of a tree related qns??
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
What do you mean?
@prarinamderia309
@prarinamderia309 4 жыл бұрын
@@tmwilliamlin168 don't misunderstood me sir ,i mean can you explain dp on trees and solve example with more clarity....
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
@@prarinamderia309 it's hard given the time that I have. I think that there are good resources for DP on tree out there already.
@prarinamderia309
@prarinamderia309 4 жыл бұрын
@@tmwilliamlin168 actually in tube there no good available resources so I told you ..... Ok ,don't mind sir.
@prarinamderia309
@prarinamderia309 4 жыл бұрын
Sir , you have your instragram account ?? Bcoz i have one tree related question ,can you solve this question piz...., Send me your instragram account link
@huabiao7521
@huabiao7521 4 жыл бұрын
What is your age?
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
17
@kartikbhanderi9210
@kartikbhanderi9210 4 жыл бұрын
@@tmwilliamlin168 are you kidding me!
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
@Spakk 9 I have done a lot to reach this level. 9 years of programming, 4 years of math contests, and endless practice have gotten me to my level today.
@harshitsinghvi6158
@harshitsinghvi6158 4 жыл бұрын
@@tmwilliamlin168 this reply has come straight from the heart ...flashing through all the days of hardwork !!! keep it up mate...!!!
@harshitsinghvi6158
@harshitsinghvi6158 4 жыл бұрын
Btw. what keyboard do u use.... i am planning to buy one ...any suggestions
@prarinamderia309
@prarinamderia309 4 жыл бұрын
So I send you this qns
@mridulbhatt620
@mridulbhatt620 4 жыл бұрын
I was frantically sear hing for order statistics for multiset when I realised that ai-bi might repeat. That took a hell lot of time and finally had to resort to another interpretation(was mentioned in the tutorial). Certainly learned something valueable today!!!
@rupanshuyadav4483
@rupanshuyadav4483 4 жыл бұрын
what keyboard do you use?
@tmwilliamlin168
@tmwilliamlin168 4 жыл бұрын
I don't know, I just bought a mechanical keyboard randomly.
@rupanshuyadav4483
@rupanshuyadav4483 4 жыл бұрын
@@tmwilliamlin168 It sounds good
Starting Competitive Programming - Steps and Mistakes
9:55
William Lin
Рет қаралды 1,4 МЛН
Winning Google Kickstart Round A 2020 + Facecam
17:10
William Lin
Рет қаралды 9 МЛН
Nurse's Mission: Bringing Joy to Young Lives #shorts
00:17
Fabiosa Stories
Рет қаралды 17 МЛН
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 205 МЛН
Can I Run Youtube Entirely From My Terminal? (No Browser)
15:31
We built the Biggest iPhone in the World.
23:30
Mrwhosetheboss
Рет қаралды 3,4 МЛН
Winning Codeforces Round #628 (Div. 2) + Facecam
1:08:33
William Lin
Рет қаралды 390 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1,1 МЛН
The Most Legendary Programmers Of All Time
11:49
Aaron Jack
Рет қаралды 557 М.
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 493 М.
Almost Failed MIT Class: My First Semester at MIT
8:26
William Lin
Рет қаралды 407 М.
The Evolution of Web Apps 1992-2024
14:01
Dylan Beattie
Рет қаралды 32 М.