Codeforces Round

  Рет қаралды 56,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
@ultra_mega_tronic_source
@ultra_mega_tronic_source 4 жыл бұрын
I don't know what's happening...
@1010ansh
@1010ansh 4 жыл бұрын
Thank you for providing such a good explanation and implementation for this problem.
@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
@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
@cartist3019
@cartist3019 3 жыл бұрын
You're ultra Pro in competitive programming William
@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
@yz767
@yz767 4 жыл бұрын
Good job and thanks for explanations :D
@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
@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 3 жыл бұрын
Thats wrong actually. Try n=7 and k=97. Answer shld be 113
@jayantjha3128
@jayantjha3128 3 жыл бұрын
I also thought of the same
@JoaoVictor-lq5ew
@JoaoVictor-lq5ew 4 жыл бұрын
Awesome, I like so much your videos, thanks for all
@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. 😊🙏
@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
@getsuha
@getsuha 4 жыл бұрын
Hi @William Lin Can you please share a video with your VIM settings....
@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
@aw12sdfx
@aw12sdfx 4 жыл бұрын
my new favourite asmr
@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.
@vortmen
@vortmen 4 жыл бұрын
What is this font in Vim?
@sriharshaananthoju8671
@sriharshaananthoju8671 4 жыл бұрын
Will rating changes be so minimal in this division because only greens and greys
@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 Жыл бұрын
why k-1 part
@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
@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.
@tilakmadichettitheappdeveloper
@tilakmadichettitheappdeveloper 3 жыл бұрын
i can imagine 4 years from now div 1 in 20 minutes.
@rashidmazhar023
@rashidmazhar023 4 жыл бұрын
How do you have this themed chrome?
@Zildras
@Zildras 2 жыл бұрын
what keyboard uses in this video?
@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
@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.
@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
@entertainshala
@entertainshala 4 жыл бұрын
How did you learn all these
@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
@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
@goldy7243
@goldy7243 4 жыл бұрын
Superhuman speed
@teddychow8487
@teddychow8487 4 жыл бұрын
When collab with tzuyu_chou?
@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.
@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
@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
@aliabbasattarwala9130
@aliabbasattarwala9130 4 жыл бұрын
Which editor u use ?
@srinivast84
@srinivast84 4 жыл бұрын
It's Vim (Visual IMproved).
@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
@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?
@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!!
@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
@vamsikrishnavalluru611
@vamsikrishnavalluru611 4 жыл бұрын
Damn the screenshot is good but why do we need the head on the top corner :/
@abhiraj9990
@abhiraj9990 4 жыл бұрын
4 or 5th Ps:i know ur alts 😂😂😂
@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😂
@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
@roloskan9671
@roloskan9671 4 жыл бұрын
c:
@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++
@pavanvenkat9182
@pavanvenkat9182 4 жыл бұрын
Missed your videos
@khaledjubeh8818
@khaledjubeh8818 4 жыл бұрын
screencast for the next Div1 round.. its will be more interesting
@pk4780
@pk4780 4 жыл бұрын
you should stream on twitch
@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
@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
@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
@teji7723
@teji7723 4 жыл бұрын
No dislikes :D
@nishansingh77
@nishansingh77 4 жыл бұрын
This guy is too too fast! He is the flash of CP!
@jewishfloppa6969
@jewishfloppa6969 4 жыл бұрын
He types too fast X_X
@aishikbhattacharya7823
@aishikbhattacharya7823 4 жыл бұрын
This is...
@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 LeetCode Weekly Contest 201
12:07
William Lin
Рет қаралды 127 М.
Training for GOLD for US at International Olympiad in Informatics
3:45
Did you believe it was real? #tiktok
00:25
Анастасия Тарасова
Рет қаралды 17 МЛН
Haha😂 Power💪 #trending #funny #viral #shorts
00:18
Reaction Station TV
Рет қаралды 15 МЛН
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 112 МЛН
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 188 МЛН
Jonathan Blow on computer science curriculum
8:36
Anton Swifton
Рет қаралды 81 М.
Top 5 finish in Codeforces Round 886 (Div. 4)
33:24
Neal Wu
Рет қаралды 12 М.
touristream 018: Codeforces Round 769 (Div. 2)
1:57:28
Gennady Korotkevich
Рет қаралды 57 М.
Starting Competitive Programming - Steps and Mistakes
9:55
William Lin
Рет қаралды 1,4 МЛН
5 Simple Steps for Solving Any Recursive Problem
21:03
Reducible
Рет қаралды 1,2 МЛН
Winning Google Kickstart Round A 2020 + Facecam
17:10
William Lin
Рет қаралды 9 МЛН
Erdős-Woods Numbers - Numberphile
14:12
Numberphile
Рет қаралды 109 М.
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 287 М.
Winning Codeforces Round 687 (Div. 1)
2:14:03
ecnerwala
Рет қаралды 47 М.
Winning Codeforces Round #663 (Div. 2)
46:18
William Lin
Рет қаралды 95 М.
Я прожил 100 Дней ЗА ГЛАДИАТОРА в Майнкрафт…
37:07
TumkaGames / Тумка :3
Рет қаралды 799 М.
MEGA BOXES ARE BACK!!!
8:53
Brawl Stars
Рет қаралды 34 МЛН
😨 Это реально Самый Высокий миф в Майнкрафт
37:29