Codeforces Round

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

William Lin

William Lin

4 жыл бұрын

Explanations for Codeforces Round #634 (Div. 3)
If you have questions or anything else you can discuss with others here: / discord
If this was helpful, consider liking or subscribing!
Website: williamlin.io/
Instagram: / tmwilliamlin168
Twitter: / 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
@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 :):)
@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!
@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
@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?
@Amrable
@Amrable 4 жыл бұрын
Simple approaches, love this !
@Shun8881
@Shun8881 4 жыл бұрын
thank you so much for this!
@prateeksinghal630
@prateeksinghal630 4 жыл бұрын
Thanks for returning to the normal routine ♥️♥️
@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
@manjunathvasam4981
@manjunathvasam4981 4 жыл бұрын
That helped a lot, thanks!
@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!
@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!!!
@kabboghosh1853
@kabboghosh1853 4 жыл бұрын
i m just fan of u,editorial all we need
@NotFound-hy7qb
@NotFound-hy7qb 4 жыл бұрын
Great Work You just make solutions look so easy👍
@dhivagarm6497
@dhivagarm6497 4 жыл бұрын
Simple and clear explanation thanks :)
@rhac79
@rhac79 4 жыл бұрын
Thank you very much
@christianoronaldo1662
@christianoronaldo1662 4 жыл бұрын
i liked your effort
@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
@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
@rkhamim4574
@rkhamim4574 4 жыл бұрын
Nice editorial
@vladandenda9462
@vladandenda9462 4 жыл бұрын
William can you do video about your vim setup ?
@ehrazakhtar8336
@ehrazakhtar8336 4 жыл бұрын
The Explanations are quite great but really missing the face cam during the actual submission during contests.
@MenelaosKotsollaris34
@MenelaosKotsollaris34 4 жыл бұрын
Thank you for the video William! What hardware & sofware are you using for your drawings?
@samprasdsouza6993
@samprasdsouza6993 4 жыл бұрын
Approach for anti- suduko is legendary
@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.
@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
@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
@saifu07
@saifu07 4 жыл бұрын
Ohh man, Dth one is simplest but I failed to think this and got WA, I am dying now
@dutchboybmx
@dutchboybmx 4 жыл бұрын
Sick
@camper8650
@camper8650 4 жыл бұрын
hey , in problem E2 will the O(n*(max(array)) will work ? and what's your time complexity ?
@alexwexov4298
@alexwexov4298 3 жыл бұрын
Liked that you use vim.
@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
@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
@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.
@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
@kurtis5073
@kurtis5073 4 жыл бұрын
剛考完就有解釋可以看😂
@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!
@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
@yedigeashmet1875
@yedigeashmet1875 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
@Rotengon33
@Rotengon33 4 жыл бұрын
Can you do your environment setup?
@sandipanhaldar61
@sandipanhaldar61 4 жыл бұрын
why is it necessary to push n at the end of each occ vector in E?
@lucygaming9726
@lucygaming9726 4 жыл бұрын
Whats the name of the drawing board software?
@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.....👍
@deveshjha5141
@deveshjha5141 4 жыл бұрын
Which digital pen do you use in onenote
@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
@souravprasaddas5909
@souravprasaddas5909 4 жыл бұрын
Please make on codeforces rating system
@johnstonliu
@johnstonliu 4 жыл бұрын
What gvim theme are you using?
@hackerhaddi
@hackerhaddi 4 жыл бұрын
Please consider adding timestamps for problems.
@pqazx1
@pqazx1 4 жыл бұрын
Plz give soln of education round 85 as well of codeforces
@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🙏🏻😅😅
@apoorvamittal4112
@apoorvamittal4112 4 жыл бұрын
why did you reverse the edges?
@vaibhavsingh4108
@vaibhavsingh4108 4 жыл бұрын
which editor do you use..
@teji7723
@teji7723 4 жыл бұрын
What IDE do you use?
@adityamishra4458
@adityamishra4458 4 жыл бұрын
dude u did not doo codechef long challenge ..
@sickman577
@sickman577 4 жыл бұрын
please let me know the name of the font
@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.
@ritikagupta8847
@ritikagupta8847 4 жыл бұрын
Can you provide link to your code??
@93hothead
@93hothead 4 жыл бұрын
Is this in cpp?
@Satyam22jul
@Satyam22jul 4 жыл бұрын
Bro you have some problem in clarifying qs c
@xcg1234
@xcg1234 4 жыл бұрын
牛逼!
@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
@rkhamim4574
@rkhamim4574 4 жыл бұрын
Can i have this code
@mahinhossen6100
@mahinhossen6100 4 жыл бұрын
My 2hr is equal to ur 8min
@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 Codeforces Round #627 (Div. 3)
23:54
William Lin
Рет қаралды 16 М.
This is the best way to learn C++ for free
0:40
Mehul - Codedamn
Рет қаралды 365 М.
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 21 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 2,1 МЛН
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 448 М.
Starting Competitive Programming - Steps and Mistakes
9:55
William Lin
Рет қаралды 1,4 МЛН
Google Kickstart Round C 2020 Explanations
16:38
William Lin
Рет қаралды 98 М.
java 25 - 클래스 4
dev.mminsu
Рет қаралды
AUKAT MADERCH*D AUKAT 😈 | SCAM 2003 THE TELGI STORY | EDIT 4K
0:35
Winning Google Kickstart Round A 2020 + Facecam
17:10
William Lin
Рет қаралды 9 МЛН
touristream 018: Codeforces Round 769 (Div. 2)
1:57:28
Gennady Korotkevich
Рет қаралды 57 М.
Codeforces Round 634 - Problem B. Construct the String
6:49
Aryan Mittal
Рет қаралды 2,6 М.
Codeforces Good Bye 2022 live coding
3:02:48
Errichto Hard Algorithms
Рет қаралды 10 М.
What is Competitive Programming?
6:26
William Lin
Рет қаралды 2,4 МЛН
skibidi toilet zombie universe 33 ( New Virus)
2:59
MonsterUP
Рет қаралды 2,8 МЛН
ПАУ КЕК ҚАЙТАРМАҚШЫ
12:59
Armani -KazakhHL-
Рет қаралды 102 М.