hey guys this is Shayan and in this video I want to talk about how to get to experts on Codeforces. In case you don't know me yet I'm Shayan, an IGM in Codeforces and also an ICPC world finalist. And why am I someone to tell you about this? well if you take a look at my account in Codeforces, Shayan, you will see that in a short period of time from March of 2015 to June of 2015 I had a great Improvement and I went from newbie to expert, and today I want to share it with
you that what did I do exactly and how can you do it as well this is something that I always tell to my students to so grab a pen and paper write these points down because these are going to help you significantly let's start First, solve problems around your own rating well you know that if you solve very easy problems they're not going to help you much to improve and also if you solve very hard problems it's going to take a lot of time from you and you cannot solve a lot of problems I believe
that in order to get to experts you need to solve a lot of problems I myself was solving like 10 problems a day if you look at my account you can see that in that period of time I was solving like 10 problems a day and by definition they were not so hard even the thinking and loss on problems are going to be very helpful in future but since you just beginning and you want to reach experts I believe that in this period of time the best strategy for you is to solve problems around your
own rating so that you can be able to solve like 10 problems per day I believe that these problems should have the difficulty such that you spend like half an hour on them in average at that time CF didn't have difficulty for problems yeah right so I sort Problems by number of people who accepted these problems and I solve first five pages of and problem set sorted by number of accepteds that is really the best approach I always tell the beginners my students to do this first I always tell them to go first solve 400
problems from the easiest problems and then we will talk don't start learning complicated data structures Etc just go and solve problems implementation problems uh root Force problems yeah maass exactly that is the best approach so for for instance if your current rating is 1200 I believe the best difficulty for you to solve problems from is around 1200 as I said the reasoning behind this is that you need to solve a lot of problems if you solve very hard problems you have to think a lot about them by spending a lot of time on very hard
problems you will spend a lot of time thinking but very few time coding and that's why after a while you see that you're good at thinking you're good at solving problems but you're not good that implementing them and you cannot accept those problems that's why I believe that you should spend your time on problems around your own difficulty at this stage don't go for very easy problems and don't go for problems harder than your current level some people might say that but if I spend a lot of time solving problems on my own rating will
my rating increase well yes but when your rating is at some point it doesn't mean that you can just solve and Implement all of the problems on that rating maybe in some of tags you're better in some tags you're worse and the point is that when you solve problems around that those rating you will find your weaknesses as well you will see that from your own rating what Texs are not really as good as that rating and you will be able to solve those problems too two don't distract yourself with irrelevant materials if you have
watched my two other videos on how to get out of newb you will see that I said that you should not learn very complex data structure like segment Tre centroid Etc when you're in new well that's always true but the only difference is that now that you want to reach experts you have to do more topics but still there are topics that you don't need to work on a lot for example I still believe that complex data structures are not needed instead you have to focus on something else that I will tell you on the
next point so the point is that irrelevant material is not only the materials that are not useful and they will never come competitive programming contests but also the material which are harder than what you need are also relevant sometime I see that people who want to get to expert spend their time to learn persistent segmentary well that's stupid you should never do that so focus on problem solving around your own rating do not spend time to learn algorithms which are extremely hard three DP DP and DP well one of the most important topics in competive
programming is dynamic programming you have to spend a lot of time on that especially when you want to get to expert that's the time that you have to spend a lot of time on dynamic programming so try to work a lot on dynamic programming the different ways of dynamic programming Etc if you have watched my topic streams and learn deeply from me you know that dynamic programming has four different phases that you have to be careful about and I told you how to approach dynamic programming problem so make sure that you are completely okay with
it and you have comprehended it and try to solve a lot of problems from dynamic programming as well and those problems that I was telling to you that you have to solve like 10 problems a day include dynamic programming problems as well so other than solving just tag free problems around your own rating which are extremely helpful try to also solve problems with tag dynamic programming too four watch the topic streams I have prepared a lot of free topic streams for you in which I have told you how to approach different topics like dynamic programming
graph Theory number Theory Etc they are completely free and they are designed for people like yourself so I strongly recommend to you to watch them to completely understand and learn these topics I will put their Link in the descriptions below so you can watch them and start learning from them after watching the videos that I have learned the topic for example let's say dynamic programming watch the video that I solve problems in it as well so make sure that you will use these materials especially if you don't have a teacher right now or you're not
very s satisfied with your current teachers five think as much as needed so a very important question is how much you have to think about a problem I have also asked about it to many great competitive programmers as well that you can see in my interviews like I have asked omnik and Rina and many other people we all agreed on the same thing you have to spend time as much as you're not stuck if you still feel that you have ideas to solve the problems you have to keep thinking on it don't spoil the problem
right away but I and the people that I interviewed with believe that especially in this stage when you feel that you're stuck it's okay if you look at the editorial for example read the first line and see that what does it say get a hint from it and continue thinking and even if it's not enough for you you can continue reading to see that what the solution is there's always problems that you haven't solved and I don't think you should just go look at the solution over you should look at the solution so how how
do you think we should approach problems I mean uh how much you should think before going to start seeing the solution I think if it looks like you need to know something that you don't uh right maybe like start reading like line by line at thinking uh but as a general rule of them you you want to uh just like see end to end of the problem like read it like little by little at the editorial and think again six learn as yourself so as I said you don't need to learn a lot of algorithms
to get to expert you have to solve a lot of problems to get to expert that's the main point solving problem is the important thing not memorizing what the algorithms are so the approach that I highly recommend and that's what I did as well is to learn as you solve problems well I used to do this I was not reading editorials well to be honest at the beginning I didn't know that editorials exist I was just new to code forces and I didn't see that tutorial button so I was reading people's codes and I learned
a lot from Reading other people's codes I learned how to code better and I also learned some new ways of thinking as well the wave that I was using was to opening a code and trying to understand what is it doing and it helped me thinking as well after a while sometimes I were realizing that that's actually an algorithm so the point is I never tried to learn an algorithm I was trying to solve the problems and as I was solving them when I was seeing that there's a problem that needs something I was learning
that while facing that problem so I was not learning an algorithm before actually facing a problem that needs that algorithm so that's what I recommend to you as well try to learn algorithms as you solve problems don't start First Learning and then solving problems just start solving the problems and you will learn and the most important topics that to get to expert as I said is like dynamic programming greedy algorithms number Theory graph algorithms and still the topics that I told you in newb videos implementation boot Force math Etc initially you were a specialist when
you started uh cont starting uh writing contest in CF after around 2 years you became a red color so and you said that everyone can become gym so what was your practice method in that time so that people can also do that and maybe they can also reach Grand Master um I I solved a lot of problems you know that's it how how long how long you were uh solving problems per day or per week I I don't remember but but well basically um all my free time all your free time seven don't be afraid
of contest okay for now I'm not participating in contests because I'm not good enough but I'm going to train and work hard and then after a while I'll start participating in contests well that's not a good approach as you see I participated in all the contests as well back then also see this part from alir aavan the Iranian ALG so there's also another question from cot forces and it's saying that what difference you did compared to others such that you believe that it had significant effect on your improvements I always trying to never miss a
contest in cold for never miss a contest I didn't miss any single contest in years 2018 and 2019 wow why how and because I really enjoy it do you miss A Date With Your Love No No so at the beginning it's very important to participate in all the CF contest it also boosts your motivation as well seeing that rating goes up and down it helps a lot so try to participate in all the contests that are going on don't be scared like oh my God I'm going to lose ra it's okay lose ra you will
go up back again try to participate in all the contests and if in a contest there's a problem that you really believe that you had to solve but you didn't after the contest spend more time on it we call it absolving and try to upsolve that problem UPS solving helps you a lot to improve and not only participating in the contests but also try to have virtual contests as well Cod forces has this feature of virtual participation that you can choose on any code forces contest you can choose it and then you can install starts
having a virtual contest so it's going to be exactly like a normal CF contest you are going to solve the problems you don't have access to the solutions or anything it's like you are really participating in the CF contest but in a virtual way the contest has been passed but you are going to participate in it in that limited time and you have to solve the problems participating in Virtual contests and of solving the problems that you haven't solved during the contest helped myself a lot so I believe it's going to help you a lot
too okay how to see the tutorials or read other people codes well for example on this problem you can find the editorials here also when I prepare video editorials for code forces contest you can find the video editorials by me as well that I have explained each of the problems you can also see others people codes by clicking on this link and then click on this number and then you have access to everyone's codes and the very good point about it is that these codes are so supported by their sizes so the first code that
you will see here is the smallest code so you can learn a lot on how to write shorter codes and how to implement better because some people might have a lot of work to do the same thing that could be done with a shorter code okay guys that's all with the seven points on how to get to experts these are the things that I did myself as well well definitely accept watching my own tutorials and in both cases says when I did it and when I tell my students to do this it always works well
and people have massive growth in their rating I show it again you can see that only in 3 months I could get to here having rank four in a contest of code forces while I'm an expert from being a newbie so when it works for me it definitely works for you as well now I have a task for you in the comments below write your current state what is your rating right now and in how many months you want to get to experts and when that time was passed for example you said that in 5
months I'm going to be an expert when 5 months pass just reply that comment and say that how did you do this strategy and how did it work for you I believe that if you really do this strategy you will get to your goal that's all I hope this video helps you if you learn something from this video please like it and also you're more than welcome to join our communities by joining our telegram Channel and telegram group you can find the links in the descriptions below see you next time Shayan [Music] [Applause]