No video

Codeforces Round

  Рет қаралды 57,854

William Lin

William Lin

4 жыл бұрын

The first Division 4 round on Codeforces! Ended up 4th, since it was a Divison 4 contest.
codeforces.com/contest/1352/s...
Second channel (William Lin ++): / @williamlinpp4187
Website: williamlin.io/
Instagram: / tmwilliamlin168
Twitter: / tmwilliamlin168
Discord: williamlin.io/discord

Пікірлер: 168
@othmanebentaleb
@othmanebentaleb 4 жыл бұрын
For the last problem, there is a permutation that is always valid: print odd numbers in a descendant order, then print the even numbers in ascendant order (swap 2 and 4 to match the diff condition)
@yesil1026
@yesil1026 4 жыл бұрын
Yes, that is the first thing I also considered. For odd n: 1, 3, 5, 7, ..., n, n - 3, n - 1, n - 5, n - 7, n - 9 ... is a valid sequence. For even n: 1, 3, 5, 7, ..., n-1, n - 4, n, n - 2, n - 6, n - 8, n - 10 .... is a valid sequence.
@bsethupathi1
@bsethupathi1 4 жыл бұрын
This is a Div 4 contest targeting the unrated coders. He is too OP for this round.
@huskydj1
@huskydj1 4 жыл бұрын
He was participating unofficially...
@ATGG
@ATGG 4 жыл бұрын
Literally, every time I see your videos, my mouth stays Wide Open
@1010ansh
@1010ansh 4 жыл бұрын
Thank you for providing such a good explanation and implementation for this problem.
@ultra_mega_tronic_source
@ultra_mega_tronic_source 4 жыл бұрын
I don't know what's happening...
@cartist3019
@cartist3019 3 жыл бұрын
You're ultra Pro in competitive programming William
@parthshah8057
@parthshah8057 4 жыл бұрын
Ended up 4th, since it was a Divison 4 contest. Will end up 3rd, since it will be a Divison 3 contest. Will end up 2nd, since it will be a Divison 2 contest. Will end up 1st, since it will be a Divison 1 contest.
@clipit4503
@clipit4503 4 жыл бұрын
😂😂😱
@User-ip9dg
@User-ip9dg 4 жыл бұрын
Being number 1 is tough when tourist is in a contest.
@abuhuraira071
@abuhuraira071 4 жыл бұрын
@@User-ip9dg MifafaOvo also
@shashanksabharwal8591
@shashanksabharwal8591 4 жыл бұрын
*hey* may be *you* guys are good coders ... Please help me guys .. I have only 1 year to learn programiing and build some good skills so i will get a good job... I am learning C language still please reply anyone.. What to do after C .. For getting place ld in companies like amazon, paytm
@sauravkarmakar3704
@sauravkarmakar3704 4 жыл бұрын
@@shashanksabharwal8591 language doesnt matter , the algorithms u learn and their implementations matter
@utsavsingh899
@utsavsingh899 4 жыл бұрын
As always the timing is awesome... just after contest (perfect time to upsolve)
@shashanksabharwal8591
@shashanksabharwal8591 4 жыл бұрын
Rohit Pal hey may be you guys are good coders ... Please help me guys .. I have only 1 year to learn programiing and build some good skills so i will get a good job... I am learning C language still please reply anyone.. What to do after C .. For getting place ld in companies like amazon, paytm
@dudemysterio
@dudemysterio 4 жыл бұрын
Great Vids but William could you make a video with your VIM setup it would be a great video for people. Keep up the good work.
@almaaune3596
@almaaune3596 4 жыл бұрын
Hi William! I really enjoy your videos! Could you perhaps do another post on how you improve your programming skills. I would like to get better with coding logic but I am hitting some walls, for example coding logic of hackerrank's easy to medium section. Is there reference material that you read to get better?
@justaguyonyt869
@justaguyonyt869 2 жыл бұрын
He’s Asian
@rohitpal7739
@rohitpal7739 4 жыл бұрын
I did 4 took me 2 hrs almost did 5 and was happy until... Lot to learn
@clipit4503
@clipit4503 4 жыл бұрын
You can do it! You will get there practice makes better!
@ritamr2690
@ritamr2690 4 жыл бұрын
i didn't get any... i started on c bc it looked so easy but i got tle and then just rage quit lol
@rohitpal7739
@rohitpal7739 4 жыл бұрын
@@ritamr2690 keep trying and be consistent that's what I am trying currently
@rohitpal7739
@rohitpal7739 4 жыл бұрын
@@clipit4503 Thanks
@shashanksabharwal8591
@shashanksabharwal8591 4 жыл бұрын
@@rohitpal7739 hey may be you guys are good coders ... Please help me guys .. I have only 1 year to learn programiing and build some good skills so i will get a good job... I am learning C language still please reply anyone.. What to do after C .. For getting place ld in companies like amazon, paytm
@sterlingmaloryarcher747
@sterlingmaloryarcher747 4 жыл бұрын
Lin: Makes video so that people learn about CP Me: What are your VIM settings?
@ianpan0102
@ianpan0102 4 жыл бұрын
syntax on set nu set ai ... Pretty much it
@user-lq9jz3hk5i
@user-lq9jz3hk5i 4 жыл бұрын
Can you please make a video on how to setup Vim. I watched your CP video and it has inspired me to code too. 😊🙏
@JayPatel-jn7cu
@JayPatel-jn7cu 4 жыл бұрын
3rd problem can be seen as - ans = ans/n + k , find the ans ans =floor(( n*k -1)/(n-1))
@tanmaymishra9203
@tanmaymishra9203 4 жыл бұрын
Lol..I found formula (k-1)//(n-1) + k.. dunno how it arrived
@jayantjha3128
@jayantjha3128 4 жыл бұрын
Thats wrong actually. Try n=7 and k=97. Answer shld be 113
@jayantjha3128
@jayantjha3128 4 жыл бұрын
I also thought of the same
@yesil1026
@yesil1026 4 жыл бұрын
K'th not divisible by n can be calculated analytically. Its k + floor((k - 1)/(n-1))
@EintsWaveX
@EintsWaveX 3 жыл бұрын
Omg dude, i never think such of this solution... Impressive
@boomboom-9451
@boomboom-9451 2 жыл бұрын
why k-1 part
@getsuha
@getsuha 4 жыл бұрын
Hi @William Lin Can you please share a video with your VIM settings....
@The_Wyverna2929
@The_Wyverna2929 4 жыл бұрын
What is this font in Vim?
@0xero7
@0xero7 4 жыл бұрын
I found another elegant(imo) solution for G, first it is obvious for n < 4 it's impossible for n = 4 you can have 3 1 4 2 now, for every increasing n, add odd numbers to the left and even numbers to the right. for example if n = 7, add 7 and 5 to the left of 3 1 4 2, and 6 to the right. 7 5 3 1 4 2 6 and so on :)
@srinivast84
@srinivast84 4 жыл бұрын
Cool
@anoubhav
@anoubhav 4 жыл бұрын
Really cool
@debadiptobiswas5611
@debadiptobiswas5611 4 жыл бұрын
i did the same
@youarecorrectiamwrongbecau1338
@youarecorrectiamwrongbecau1338 4 жыл бұрын
Oh it's amazing.
@thallium54
@thallium54 4 жыл бұрын
same solution
@tilakmadichettitheappdeveloper
@tilakmadichettitheappdeveloper 3 жыл бұрын
i can imagine 4 years from now div 1 in 20 minutes.
@yz767
@yz767 4 жыл бұрын
Good job and thanks for explanations :D
@aw12sdfx
@aw12sdfx 4 жыл бұрын
my new favourite asmr
@sriharshaananthoju8671
@sriharshaananthoju8671 4 жыл бұрын
Will rating changes be so minimal in this division because only greens and greys
@rajdave9862
@rajdave9862 4 жыл бұрын
Hey, I literally took 4 minutes to understand 2'nd problem (B) but you solved it in less than 3 minutes How how how? Please tell us How are you able to think this much faster, Do you have old experience of these problems or you came across these problems first time
@rajdave9862
@rajdave9862 4 жыл бұрын
@@sasmitvaidya3594 that's sounds great, thanks Sasmit Vaidya
@karanpatel7974
@karanpatel7974 4 жыл бұрын
Great video William, do you have any advice to learn c++ as a beginner, I know java (programming) but I am trying to learn c++, any advice would be really helpful.
@youarecorrectiamwrongbecau1338
@youarecorrectiamwrongbecau1338 4 жыл бұрын
I was really scared from c++. Just couldn't switch from python. Now I find cpp better in many situations. I would give you an honest advice. Mostly people will say read this read that. I'll say, just learn 3 - 4 important operations of all stl data structures by googling their name like map set vector etc. Almost everything in cp is done using those 90% of the time.
@gameplayvideos3113
@gameplayvideos3113 4 жыл бұрын
C++ is way easier than Java and python is the easiest
@rashidmazhar023
@rashidmazhar023 4 жыл бұрын
How do you have this themed chrome?
@Zildras
@Zildras 2 жыл бұрын
what keyboard uses in this video?
@entertainshala
@entertainshala 4 жыл бұрын
How did you learn all these
@kuljeetsinghvirk1299
@kuljeetsinghvirk1299 4 жыл бұрын
love your content man. keep it up..
@kuljeetsinghvirk1299
@kuljeetsinghvirk1299 4 жыл бұрын
I was also thinking to participate in this contest but I think I did right by not participating
@sauravkarmakar3704
@sauravkarmakar3704 4 жыл бұрын
@@kuljeetsinghvirk1299 why
@kuljeetsinghvirk1299
@kuljeetsinghvirk1299 4 жыл бұрын
@@sauravkarmakar3704 kidding bruh!!! I was just admiring his skills.
@JoaoVictor-lq5ew
@JoaoVictor-lq5ew 4 жыл бұрын
Awesome, I like so much your videos, thanks for all
@forhanshahriarfahim9493
@forhanshahriarfahim9493 4 жыл бұрын
@William Lin How you load all problem in one page ??
@mostafamohamed2
@mostafamohamed2 4 жыл бұрын
When you open normal problems page you can see "Complete Problemset" just click it.
@teddychow8487
@teddychow8487 4 жыл бұрын
When collab with tzuyu_chou?
@aliabbasattarwala9130
@aliabbasattarwala9130 4 жыл бұрын
Which editor u use ?
@srinivast84
@srinivast84 4 жыл бұрын
It's Vim (Visual IMproved).
@HarshSharma-je8rk
@HarshSharma-je8rk 4 жыл бұрын
Is there any discord server created by William lin... Pls send the link
@bensontoh92
@bensontoh92 4 жыл бұрын
check the description....
@shashanksabharwal8591
@shashanksabharwal8591 4 жыл бұрын
hey may be you guys are good coders ... Please help me guys .. I have only 1 year to learn programiing and build some good skills so i will get a good job... I am learning C language still please reply anyone.. What to do after C .. For getting place ld in companies like amazon, paytm
@aser2535
@aser2535 4 жыл бұрын
Did you do math competitions before competitive programming? Also, do you know discrete math? If so, would you say that discrete math has helped you, whether directly or indirectly in solving these questions?
@itsvaleska7814
@itsvaleska7814 4 жыл бұрын
Aser just incase he reply
@badeeesmandar2552
@badeeesmandar2552 4 жыл бұрын
1st problem took me an hour😂😂 I'm soo noob😭
@jethalalnhk2409
@jethalalnhk2409 4 жыл бұрын
I could not solve second
@AdityaSharma-ei4gq
@AdityaSharma-ei4gq 4 жыл бұрын
You guys are solving problem?
@Sam-nd6np
@Sam-nd6np 4 жыл бұрын
I still don’t understand how he did problem 1 so quickly, can anyone explain how? I did it in 16 minutes lol
@18PregnantAndProud
@18PregnantAndProud 4 жыл бұрын
Sam Penny maybe he did that same problem before
@rocknroll7967
@rocknroll7967 4 жыл бұрын
He is red bro, they can generally solve these type of questions without even picking pen and paper.
@mynewnameisbeautiful___4717
@mynewnameisbeautiful___4717 4 жыл бұрын
Its very easy if you are familiar with problems when you need to do somthing with the digits of a number, I solved it in the contest ~1.5 minute
@shashanksabharwal8591
@shashanksabharwal8591 4 жыл бұрын
Rohit Pal hey may be you guys are good coders ... Please help me guys .. I have only 1 year to learn programiing and build some good skills so i will get a good job... I am learning C language still please reply anyone.. What to do after C .. For getting place ld in companies like amazon, paytm
@sauravkarmakar3704
@sauravkarmakar3704 4 жыл бұрын
@@shashanksabharwal8591 some OOP language, then focus on algorithms and solve interview questions
@aryamitabh
@aryamitabh 4 жыл бұрын
For G, you can just go 2 4 6 8 ... then go back in reverse for the odds but by changing a couple of things. Like for n = 10, you can do 2 4 6 8 10 7 9 5 3 1. Just a change in the order of 7 and 9. Another method can be placing the elements in 4 groups based on their value mod 4. Then printing all 0 mod 4 in ascending order, then 1 mod 4 in descending order, then 2 mod 4 in ascending and 3 mod 4 in descending.
@tanujnamdeo
@tanujnamdeo 4 жыл бұрын
Why does he use comma with cin? Can anybody explain?
@ManishKumar-jj1nt
@ManishKumar-jj1nt 4 жыл бұрын
If your talking about cin.tie? If yes then it is used for fast I/O in c++. Just google about them to know more or ping me.
@happyhappyguy5034
@happyhappyguy5034 4 жыл бұрын
@@ManishKumar-jj1nt No
@happyhappyguy5034
@happyhappyguy5034 4 жыл бұрын
Comma is just for separating statements
@happyhappyguy5034
@happyhappyguy5034 4 жыл бұрын
And also with comma, you do not have to add the curly braces to contain two statements
@tanujnamdeo
@tanujnamdeo 4 жыл бұрын
@@happyhappyguy5034 Thanks
@goldy7243
@goldy7243 4 жыл бұрын
Superhuman speed
@mynewnameisbeautiful___4717
@mynewnameisbeautiful___4717 4 жыл бұрын
I think this round was has the worst problms for beginers
@sauravkarmakar3704
@sauravkarmakar3704 4 жыл бұрын
yes i completely demotivated me
@happyhappyguy5034
@happyhappyguy5034 4 жыл бұрын
why?
@tanmaymishra9203
@tanmaymishra9203 4 жыл бұрын
Do u mean the problems were more easy or more difficult?
@priyanksatasiya1366
@priyanksatasiya1366 4 жыл бұрын
best part is 28:25 is there anything else? okay ya nothing else😂
@almuhimen8023
@almuhimen8023 4 жыл бұрын
For problem C I was sure I will get a TLE. That's why ai tried figuring out a formula. So, my time complexity was O(1).
@andrewalbrekht9399
@andrewalbrekht9399 4 жыл бұрын
which formula you used? I also got a TLE , but i couldnt firuge out a formula
@ritamr2690
@ritamr2690 4 жыл бұрын
@@andrewalbrekht9399 me too i basically did brute force
@debadiptobiswas5611
@debadiptobiswas5611 4 жыл бұрын
For C: answer is ceil(n*k/(n-1)) - 1
@kaiovieira230
@kaiovieira230 4 жыл бұрын
Simpler than mine =D
@CharlesMacKay88
@CharlesMacKay88 4 жыл бұрын
ceil(n*k/(n-1)) - 1. good find.
@debadiptobiswas5611
@debadiptobiswas5611 4 жыл бұрын
@@CharlesMacKay88 Yeah there's a -1, thanks for pointing out
@karthiksk7246
@karthiksk7246 4 жыл бұрын
I did the same!!
@abhiraj9990
@abhiraj9990 4 жыл бұрын
4 or 5th Ps:i know ur alts 😂😂😂
@vamsikrishnavalluru611
@vamsikrishnavalluru611 4 жыл бұрын
Damn the screenshot is good but why do we need the head on the top corner :/
@kaiovieira230
@kaiovieira230 4 жыл бұрын
In C, here is my method, which I'm proud of: The answer is ((N - 1) / K)*K + (N - 1)*K ( - 1 if (N - 1) % K == 0) Don't ask me why. I hope that intuition method is hack-immune (correct)
@pguerin7095
@pguerin7095 4 жыл бұрын
I'll never understand how people just come out with formulas like that during contests lol
@snehasishsamanta1319
@snehasishsamanta1319 4 жыл бұрын
I also applied the same formula
@SamDaBest
@SamDaBest 4 жыл бұрын
I used the same formula, it won’t be incorrect because it is calculated with math
@daviddafitt
@daviddafitt 4 жыл бұрын
O(1) solutions ftw XD
@mashedpotato5694
@mashedpotato5694 4 жыл бұрын
I did n*k/(n-1) and -1 if k%n=0
@longlin18
@longlin18 4 жыл бұрын
I don't understand problem B! Why the output of 100 4 is YES 55 5 5 35 different his result YES 1 1 1 97 but he right?
@zarc5744
@zarc5744 4 жыл бұрын
Output For each test case print: YES and the required values ai, *if the answer exists (if there are several answers, print any of them)* For such type of questions its better to not look at the testcases, come up with your own approach that satisfies the question. The testcases are designed in a way to trick you, so you start spending time on how to get output like the test cases and eventually you don't solve the problem
@abdoulayebah215
@abdoulayebah215 4 жыл бұрын
Hello everyone! Can you tell me please which language is he using ?
@srinivast84
@srinivast84 4 жыл бұрын
It's c++.
@kairatopa9564
@kairatopa9564 4 жыл бұрын
Z++
@gameplayvideos3113
@gameplayvideos3113 4 жыл бұрын
10++
@roloskan9671
@roloskan9671 4 жыл бұрын
c:
@pavanvenkat9182
@pavanvenkat9182 4 жыл бұрын
Missed your videos
@vinaysinghjadon1959
@vinaysinghjadon1959 4 жыл бұрын
This guy is hacking !!!!!
@shashanksabharwal8591
@shashanksabharwal8591 4 жыл бұрын
hey may be you guys are good coders ... Please help me guys .. I have only 1 year to learn programiing and build some good skills so i will get a good job... I am learning C language still please reply anyone.. What to do after C .. For getting place ld in companies like amazon, paytm
@pk4780
@pk4780 4 жыл бұрын
you should stream on twitch
@khaledjubeh8818
@khaledjubeh8818 4 жыл бұрын
screencast for the next Div1 round.. its will be more interesting
@SamDaBest
@SamDaBest 4 жыл бұрын
I only did 4 problems :( I’m so bad
@ezalor9555
@ezalor9555 4 жыл бұрын
Well I did 0 so you're better than me, cheer up!
@andrewalbrekht9399
@andrewalbrekht9399 4 жыл бұрын
i did only 1 problem :(
@pluviophile762
@pluviophile762 4 жыл бұрын
I also did only one
@teji7723
@teji7723 4 жыл бұрын
No dislikes :D
@jewishfloppa6969
@jewishfloppa6969 4 жыл бұрын
He types too fast X_X
@HarshitSharma-cl6io
@HarshitSharma-cl6io 4 жыл бұрын
I am in love with your skills I want the same skills pursuing cse
@gameplayvideos3113
@gameplayvideos3113 4 жыл бұрын
Since you don't even know the spelling of pursuing/pursue I doubt you will make it that far
@gameplayvideos3113
@gameplayvideos3113 4 жыл бұрын
@Samuel Benson 😂😂😂
@HarshitSharma-cl6io
@HarshitSharma-cl6io 4 жыл бұрын
@@gameplayvideos3113 have u ever hear abt typos ....or rather say typing errors nevertheless u will say u don't even know the spelling ........lol ...i don't mind u corrected my mistake, in fact, I will prove u wrong by practising and grooming my skills ...have a great life ahead
@gameplayvideos3113
@gameplayvideos3113 4 жыл бұрын
@@HarshitSharma-cl6io if you need any help regarding coding/programming reach out to me. I am a developer at IBM
@aishikbhattacharya7823
@aishikbhattacharya7823 4 жыл бұрын
This is...
@nishansingh77
@nishansingh77 4 жыл бұрын
This guy is too too fast! He is the flash of CP!
@teddy911
@teddy911 4 жыл бұрын
你中文好不好啊,下回视频说说中文呀
@Deepakverma-ox8pd
@Deepakverma-ox8pd 4 жыл бұрын
This is wrong why u participated its for under rating 1400 ....this is why beginners cant get good rank.....😅😂😂😂😂 I did 3.....😅
@a.sana04
@a.sana04 4 жыл бұрын
I did 0! 😂
@cheissmart
@cheissmart 4 жыл бұрын
@@a.sana04 0! = 1 XD
@anmolvarshney5-yeariddindu442
@anmolvarshney5-yeariddindu442 4 жыл бұрын
he participated unofficially(doesn't affect rank)😂😂
@TahsinAhmed-yj9ns
@TahsinAhmed-yj9ns 4 жыл бұрын
Did A&C stuck on B Any help on B? When should we print no
@ankitthapa9062
@ankitthapa9062 4 жыл бұрын
@@TahsinAhmed-yj9ns read the ques carefully.
Winning Codeforces Round #663 (Div. 2)
46:18
William Lin
Рет қаралды 96 М.
Winning LeetCode Weekly Contest 201
12:07
William Lin
Рет қаралды 129 М.
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 36 МЛН
Я обещал подарить ему самокат!
01:00
Vlad Samokatchik
Рет қаралды 9 МЛН
Son ❤️ #shorts by Leisi Show
00:41
Leisi Show
Рет қаралды 9 МЛН
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 20 МЛН
Training for GOLD for US at International Olympiad in Informatics
3:45
Top Competitive Programmer vs. LeetCode's HARDEST Questions
1:06:25
Colin Galen
Рет қаралды 206 М.
Google Kickstart Round B 2020
1:37:36
William Lin
Рет қаралды 150 М.
Winning Codeforces Round #628 (Div. 2) + Facecam
1:08:33
William Lin
Рет қаралды 386 М.
Codeforces Round 959 by NEAR (Div. 1 + Div. 2) - Official Solution Discussion
30:23
Competitive Programming with Shayan
Рет қаралды 3,7 М.
touristream 012: Codeforces Round 672 (Div. 2)
2:02:08
Gennady Korotkevich
Рет қаралды 218 М.
LeetCode: The Worst Thing to Happen to Software Engineering
8:03
Coding with Dee
Рет қаралды 111 М.
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 36 МЛН