Codeforces Round

  Рет қаралды 22,695

William Lin (tmwilliamlin168)

William Lin (tmwilliamlin168)

Күн бұрын

Пікірлер: 103
@pangeranbottor
@pangeranbottor 4 жыл бұрын
this is the editorial we all need after every codeforces contest. salute!
@adityakrishna11
@adityakrishna11 4 жыл бұрын
I have been following you for like 2 weeks now and I'm also on your discord channel. Can't thank you guys enough for the effort y'all put in!
@utsavsingh899
@utsavsingh899 4 жыл бұрын
I love his speed.. as soon as the contest ends, explanations are out!! Thanks for the awesome content!!
@SlamMur
@SlamMur 4 жыл бұрын
Writing explanations during ongoing contest - next level ;)
@NotFound-hy7qb
@NotFound-hy7qb 4 жыл бұрын
That is just unbelievable
@markcagas1622
@markcagas1622 4 жыл бұрын
In problem B, repeating the first b letters of the alphabet until the length of the string is n works as well. 7 5 3 abcabca 11 7 4 abcdabcdabc
@rishijha9860
@rishijha9860 4 жыл бұрын
I applied same approach
@jashanbansal2613
@jashanbansal2613 4 жыл бұрын
Metoo
@surajpatel-bk1ip
@surajpatel-bk1ip 4 жыл бұрын
me three
@orthocresol4284
@orthocresol4284 4 жыл бұрын
yup no need to consider a
@adityakrishna11
@adityakrishna11 4 жыл бұрын
Yep same the value of a makes no difference here!
@mohamedelkaramany9863
@mohamedelkaramany9863 4 жыл бұрын
My first contest to solve 4 problems. You're a genius.
@adityakrishna11
@adityakrishna11 4 жыл бұрын
Yea I felt so elated! I know the questions were easy but baby steps am i right?
@tawseeftaher9109
@tawseeftaher9109 4 жыл бұрын
@elkaramany what's your cf id,brother?
@varunrajesh1715
@varunrajesh1715 4 жыл бұрын
The second i saw you came 26th I waited for this :)) Thanks for the quick posts!
@parvgour5284
@parvgour5284 4 жыл бұрын
who is the first...?
@varunrajesh1715
@varunrajesh1715 4 жыл бұрын
@@parvgour5284 tourist codeforces.com/contest/1335/standings
@jawprince7720
@jawprince7720 4 жыл бұрын
That problem D solution was the single biggest brain thing that I've ever seen, I'm quite literally shaking, both from awe and anger that my answer was so unnecessarily complicated
@dhananjaysonawane1996
@dhananjaysonawane1996 4 жыл бұрын
If such a video comes after each codeforces round, I am going to click on a bell icon! As usual, a great explanation!! Thanks buddy :):)
@mohamedelkaramany9863
@mohamedelkaramany9863 4 жыл бұрын
For D I considered the following (i,j) (0,0) (1,3) (2,6) (3,1) (4,4) (5,7) (6,2) (7,5) (8,8) then if (sudoko[i][j]==1)sudoko[i][j] = 2; else sudoko[i][j] = 1; and printed the sudoko array
@casimirronnlof7396
@casimirronnlof7396 4 жыл бұрын
Bruh my solution on D was so much more complex than yours, to think that I could have done it by only changing e.g. the 2's to 1 ARGH it hurts my brain that I didn't think of that. Luckily I still got it right. Awesome video anyways, keep making them!
@atanusaha143
@atanusaha143 4 жыл бұрын
For problem D: A single change in a row will satisfy all the 3 conditions. A single change means picking a value and changing it with between 1 to 9 except the picked value.
@shivaramprasadmeesa7189
@shivaramprasadmeesa7189 4 жыл бұрын
In Problem E as you are keeping nested for loop which has 40000 iterarions and t is till 10^4 so overall it is 4* 10^8 which should give TLE
@TheNayanava
@TheNayanava 4 жыл бұрын
Thank you so much brother for putting up this content! Please keep doing it!! You know me from Discord btw.. :P :P. Thanks a lot for this!!!
@shivaraj-bh
@shivaraj-bh 4 жыл бұрын
A little bit more advanced version of first problem can be framed as ,given n candies, distribute them among k students such that a1>a2>...>ak and n=a1+a2+a3... ak. This came through my mind because, initially I didn't see the fact that there are only 2 sisters. So I thought combinations with repetions can be used here, because you have n candies and you have some poles (sisters) that will separate those candies between sisters, number of ways to do that will (n+k-1) choose (k-1) where n is the candies and k is the number of students (here two sisters). Because of the fact it is 2, the equation becomes, (n) choose (1) which is n. But to handle the fact that a>b, we have to give the first half initially to a and distribute the rest. So a always gets n/2+1 candies and remaining is distributed. So after that I realized this can be extended to more interesting version, as stated above and could be B or C problem in div3
@prateeksinghal630
@prateeksinghal630 4 жыл бұрын
Thanks for returning to the normal routine ♥️♥️
@samprasdsouza6993
@samprasdsouza6993 4 жыл бұрын
Approach for anti- suduko is legendary
@HarmoniusE
@HarmoniusE 4 жыл бұрын
I mean I spend 1.5 hours to understand 2 and got an error, but u solved it in one sec XD
@parvgour5284
@parvgour5284 4 жыл бұрын
this is because we have the experience of only 10 months to 1 year and he has an experience of more than 5 years...
@93hothead
@93hothead 4 жыл бұрын
He probably didnt solve in 1 sec depending on the score he got in competition
@Amrable
@Amrable 4 жыл бұрын
Simple approaches, love this !
@kabboghosh1853
@kabboghosh1853 4 жыл бұрын
i m just fan of u,editorial all we need
@FPLogistic
@FPLogistic 4 жыл бұрын
Instead of doing (n-1)/2, I was doing (n/2)-1... It wasn't working for so long until I did some random stuff and made it work out somehow
@ehrazakhtar8336
@ehrazakhtar8336 4 жыл бұрын
The Explanations are quite great but really missing the face cam during the actual submission during contests.
@vladandenda9462
@vladandenda9462 4 жыл бұрын
William can you do video about your vim setup ?
@subhambanerjee6334
@subhambanerjee6334 4 жыл бұрын
I solved the frst 3 problem but not able to solve last 4 thanks it helped a lot be sure to make after all contests
@saifu07
@saifu07 4 жыл бұрын
Ohh man, Dth one is simplest but I failed to think this and got WA, I am dying now
@NotFound-hy7qb
@NotFound-hy7qb 4 жыл бұрын
Great Work You just make solutions look so easy👍
@surajpatel-bk1ip
@surajpatel-bk1ip 4 жыл бұрын
I just love your codeforces editorials. for problem c : can we directly do this : say x = max. freq of an element in array y = unique elements in array - 1 (remove this guy x ) if( x == y) result -> x if( y > x ) result -> x if( x > y) result is min(x - 1, y + 1) ??
@cripz4203
@cripz4203 4 жыл бұрын
I did the same thing
@jonty3551
@jonty3551 4 жыл бұрын
I was about to comment the same thing.....yea...i think its fine too as far as i can see
@jonty3551
@jonty3551 4 жыл бұрын
I think we can go like this too: If x == y, cout x -1 If y > x+1 cout x +1 Else cout min of x, y
@surajpatel-bk1ip
@surajpatel-bk1ip 4 жыл бұрын
yeah man, same thing, i guess its just my y is 1 less than yours so those three conditions simulates same as two of yours
@jonty3551
@jonty3551 4 жыл бұрын
@@surajpatel-bk1ip oo....i got accepted after submitting btw.....👍
@dhivagarm6497
@dhivagarm6497 4 жыл бұрын
Simple and clear explanation thanks :)
@manjunathvasam4981
@manjunathvasam4981 4 жыл бұрын
That helped a lot, thanks!
@MenelaosKotsollaris34
@MenelaosKotsollaris34 4 жыл бұрын
Thank you for the video William! What hardware & sofware are you using for your drawings?
@Shun8881
@Shun8881 4 жыл бұрын
thank you so much for this!
@christianoronaldo1662
@christianoronaldo1662 4 жыл бұрын
i liked your effort
@shuxianlai3637
@shuxianlai3637 4 жыл бұрын
Hi there thanks a lot for your wellmade vid. I am a newbie in cp and this div3 was my first comp and i dont have anyone to discuss my code about and i couldnt check what went wrong with my logic for the contests because they dont show the test cases output. I was thinking if you have any suggestions for my situation, like is there any forum out there for peer reviewing and casual discussion?
@shuxianlai3637
@shuxianlai3637 4 жыл бұрын
Lmao the seen
@alexwexov4298
@alexwexov4298 3 жыл бұрын
Liked that you use vim.
@camper8650
@camper8650 4 жыл бұрын
hey , in problem E2 will the O(n*(max(array)) will work ? and what's your time complexity ?
@eternalgreed6715
@eternalgreed6715 4 жыл бұрын
Can you make video how to set up compiler , gvim and etc for competitive programming, please? I think it will useful not only for me. Thanks!
@rkhamim4574
@rkhamim4574 4 жыл бұрын
Nice editorial
@yurashymon
@yurashymon 4 жыл бұрын
I want to see how you write cf and after explanations/ make next time "cf winning" it is very interesting to see how somebody write cf
@Satyam22jul
@Satyam22jul 4 жыл бұрын
Thanks brother please also upload the div 3 that will going to happen on 21th april😍😍😍😘😘😘
@Satyam22jul
@Satyam22jul 4 жыл бұрын
We only want explanation by you how you attempted that question🙏🏻😅😅
@hackerhaddi
@hackerhaddi 4 жыл бұрын
Please consider adding timestamps for problems.
@adarshtadwai5293
@adarshtadwai5293 4 жыл бұрын
I got TLE for E2, if I didn't write - if(occ[a].size() == 1) continue; So is this the efficient solution or are testcases week?? I am unable to write anything on your discord so I wrote here.
@rhac79
@rhac79 4 жыл бұрын
Thank you very much
@lucygaming9726
@lucygaming9726 4 жыл бұрын
Whats the name of the drawing board software?
@ritikagupta8847
@ritikagupta8847 4 жыл бұрын
If in dfs1 first two nodes are in the cycle then dfs1 will not set visited1 other nodes connected to this component and when they will be again in dfs1 it will be considered as a cycle which is wrong. Am I wrong somewhere? Please correct me if so
@pqazx1
@pqazx1 4 жыл бұрын
Plz give soln of education round 85 as well of codeforces
@felipealferez4461
@felipealferez4461 4 жыл бұрын
in problem D a valid answer could be to change only the main diagonal by '1' and if there is already a '1' in that position, then a '2' would be placed, right? Since we changed at least 9 numbers and changing the diagonal would make the entire sudoku change and be wrong. I tried to do it that way but I got WA in the first test. Why do I get a WA if I am already fulfilling the conditions?
@markcagas1622
@markcagas1622 4 жыл бұрын
You also have to check each 3x3 block
@varunrajesh1715
@varunrajesh1715 4 жыл бұрын
You need to change a number in each box too
@pradiptarakshit7751
@pradiptarakshit7751 4 жыл бұрын
Diagonals doesn't cover all 3×3 sub matrices
@kurtis5073
@kurtis5073 4 жыл бұрын
剛考完就有解釋可以看😂
@Rotengon33
@Rotengon33 4 жыл бұрын
Can you do your environment setup?
@showmickkar7793
@showmickkar7793 4 жыл бұрын
Hello. I am a very beginner. I could only solve 2 problems in contest time. And in almost every contest I can solve 1 or 2 problems. What approach should I take to improve from there?
@younlok1081
@younlok1081 4 жыл бұрын
practice makes perfect
@rishabhjain2084
@rishabhjain2084 4 жыл бұрын
if you can solve A&B practice D. If you can solve A, B, C practice E.
@souravprasaddas5909
@souravprasaddas5909 4 жыл бұрын
Please make on codeforces rating system
@sandipanhaldar61
@sandipanhaldar61 4 жыл бұрын
why is it necessary to push n at the end of each occ vector in E?
@johnstonliu
@johnstonliu 4 жыл бұрын
What gvim theme are you using?
@dutchboybmx
@dutchboybmx 4 жыл бұрын
Sick
@teji7723
@teji7723 4 жыл бұрын
What IDE do you use?
@deveshjha5141
@deveshjha5141 4 жыл бұрын
Which digital pen do you use in onenote
@vaibhavsingh4108
@vaibhavsingh4108 4 жыл бұрын
which editor do you use..
@ankitjoshi6066
@ankitjoshi6066 4 жыл бұрын
if(c[u[0]][u[1]]&1^1) ++a[d%cyc.size()]; how this worked in problem F c[u[0]][u[1]] this will give char value shouldn't it should be converted to int
@apoorvamittal4112
@apoorvamittal4112 4 жыл бұрын
why did you reverse the edges?
@adityamishra4458
@adityamishra4458 4 жыл бұрын
dude u did not doo codechef long challenge ..
@Satyam22jul
@Satyam22jul 4 жыл бұрын
Bro you have some problem in clarifying qs c
@ritikagupta8847
@ritikagupta8847 4 жыл бұрын
Can you provide link to your code??
@sickman577
@sickman577 4 жыл бұрын
please let me know the name of the font
@93hothead
@93hothead 4 жыл бұрын
Is this in cpp?
@rkhamim4574
@rkhamim4574 4 жыл бұрын
Can i have this code
@mahinhossen6100
@mahinhossen6100 4 жыл бұрын
My 2hr is equal to ur 8min
@xcg1234
@xcg1234 4 жыл бұрын
牛逼!
@armanyamaheshwari9967
@armanyamaheshwari9967 4 жыл бұрын
First
@II_xD_II
@II_xD_II 4 жыл бұрын
NO one cares -___-
@younlok1081
@younlok1081 4 жыл бұрын
@@II_xD_II +111111
@parvgour5284
@parvgour5284 4 жыл бұрын
who got the first rank...?
@II_xD_II
@II_xD_II 4 жыл бұрын
@@parvgour5284 wdum?
@parvgour5284
@parvgour5284 4 жыл бұрын
​@@II_xD_II i am only asking that who ranked one in the contest...
@vickySekaran
@vickySekaran 4 жыл бұрын
do you stick your mic inside your mouth whats that wierd sounds you make?
Winning AtCoder Beginner Contest 158 + Explanations
49:07
William Lin (tmwilliamlin168)
Рет қаралды 23 М.
Codeforces Round #640 (Div. 4) (4th)
28:34
William Lin (tmwilliamlin168)
Рет қаралды 60 М.
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 4,7 МЛН
快乐总是短暂的!😂 #搞笑夫妻 #爱美食爱生活 #搞笑达人
00:14
朱大帅and依美姐
Рет қаралды 13 МЛН
Winning LeetCode Weekly Contest 182 + Explanations
33:38
William Lin (tmwilliamlin168)
Рет қаралды 56 М.
Codeforces Good Bye 2022 live coding
3:02:48
Errichto Hard Algorithms
Рет қаралды 10 М.
Winning Codeforces Round #628 (Div. 2) + Facecam
1:08:33
William Lin (tmwilliamlin168)
Рет қаралды 395 М.
Codeforces Round #629 (Div. 3) (20th)
54:20
William Lin (tmwilliamlin168)
Рет қаралды 19 М.
Why is Python 150X slower than C?
10:45
Mehul - Codedamn
Рет қаралды 17 М.
The Art of Code - Dylan Beattie
1:00:49
NDC Conferences
Рет қаралды 4,7 МЛН
Solving Google Code Jam Qualification Round 2020 A-D
50:53
William Lin (tmwilliamlin168)
Рет қаралды 59 М.
Top 3 in Codeforces Round 860
1:14:01
Neal Wu
Рет қаралды 13 М.
Acing Google Coding Interview as an 18 year old High School Student
48:57
William Lin (tmwilliamlin168)
Рет қаралды 2,8 МЛН
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 4,7 МЛН