Hope everyone's doing well! This community has taught me so much over the years, so I'd love to give back by answering your questions. I've got a few free days ahead, so I'll try to answer as much as I can. Just a bit about me: I did IOI and some math competitions during school, and I recently graduated from MIT. I'll leave the rest to you — you can ask personal questions but please be respectful!
The reason behind your struggle in contests between july 2016-2017?
I started around 2016, so I was just a beginner back then. Everyone starts somewhere, and it took me a while to get better at problem solving :)
My will is to go IOI as well and this is my last year, however, in Vietnam, the pressure is quite high hehe. A bit hilarious but do you have faith in me achieving that and should I change routine a bit from a night owl to a early bird + some good resources ?
I see a steady and constant growth in your rating graph, so you should be proud of yourself and keep it up. I honestly think everyone with enough practice can reach quite high ratings and make it to national/international competitions. Some people learn faster than others, and some people just have more time to practice, which most of the time sets the line between "winners and losers." But I will tell you a secret. By doing competitive programming, at least during school, you are only winning. I have seen much greater benefits of it for non-competition related things.
Regarding your sleep schedule, I am not an expert in the topic because my sleep schedule changes a lot, but make sure to get enough sleep (7 to 8 hours is usually pretty good). I think you should look into other posts for practice resources, I personally have found solving problems from OI contests and AtCoder work quite well for IOI prep.
Thank you so much, I actually have been doing ABC and ARC for a while and reached about 1k7 . I also have given some efforts on APIO/IOI problems displayed on oj.uz but I guess it takes more time to get used to.
What do you think is the most important trait a person can have to become extremely good at problem solving?
I would say, in the long run, it's probably consistency. Of course, there are some really talented people out there who can get very good without spending as much time, but I think in the general sense solving problems consistently will get you the best at it.
Ik you didn't ask me but the answer is high IQ.
Why did you choose that username? Do you think that undergraduate students who already have APIO/IOI medals should train and participate in ICPC, or should they spend their time to learn something else instead? Same question for students who have no prior medals. I feel like although algorithmic training is important for critical thinking and technical job interviews, it just feels like ICPC do not contribute that much to the future of one developer's career, because it is actually very difficult to gain an ICPC medal.
I was stuck in newbie for a while when I chose this username. Ironic — as soon as I switched to this username, my rating started to increase lol.
I joined university-level and regional ICPC at MIT just to get together with friends and have some nostalgic times. Given MIT's strong team, we had no intention to make it to the WF. However, if you have time to practice and enjoy doing competitive programming, I'd say an ICPC participation or a medal would be nice. Yes, you don't really use IOI/ICPC-level skills during a development job, but I have seen a lot of respect from experienced people (e.g., interviewers for companies) people due to my background in competitive programming. People know that it's a pretty hard field. It can also open up new connections, work opportunities at sponsors, etc. But again, only if have time and like doing it. I personally had no time to do more competitive programming.
by looking at my profile can you tell me how can I improve my cf rating. most probab I will get green today
I see a nice growth, congrats! For newbie/pupil level, the next step is to be consistently able to solve A and B problems in Div 2 (and sometimes C). These problems tend to be implementation heavy and not require knowledge of more advanced algorithms/data-structures. Sometimes they just want you to make a small observation, which improves by better intuition, which in its place requires practice. Thus, my personal suggestion is:
There's also a few other useful guides I'd invite you to check out:
During one's CP journey there are times when your learning curve becomes quite stagnant, taking myself as an example, I've been solving B in Div2 but still struggle to solve C regularly and almost never able to solve D, and this has continued for a while now. Did you face such issues? if yes, then how did you deal with it and progress from that situation??
Of course, I was also stuck at different levels during different times of my learning. Luckily enough, we can see the reason of being stuck due to how Codeforces problems are structured. There's a large difference from problems A/B to C in Div 2. They usually require a stronger observation or use of basic-to-intermediate algorithms and data structures (e.g., graphs, trees, binary search, etc.).
Honestly, I don't remember how I dealt with this back in time, but now I'd try to stick to a structured training to get past this level. First, I'd create a list of topics that appear in problem C and choose a balanced set of problems for each (ad-hoc included). Start with around 5-10 problems per topic, and you'll notice that you are more comfortable in some than others while solving them, which means you should keep adding problems to the harder lists. Collections like A2OJ ladders can help to choose problems. To find their topic, look at their tags -- I think it's useful for levels below expert to know the topic of the problem since it's the intuition-development stage. I'd also check out blogs I mentioned in my other comment.
Did you choose to be a quant or a software engineer?
I was lucky enough to experience both tech and finance industry through internships. My immediate next step, for now, is doing software engineering work in the financial industry. I liked the faster paced work and being trusted with important projects.
I have also gotten into master's program, which might come up in the future.
Do you prove your solutions always? How to get good at proving solutions? Sometimes the proof given in the editorial is too hard to understand!
When I did competitive programming, I rarely proved my solutions. Most of the time, it was simply because I could just code it up and know if it works. In real world, this is not considered great practice since the tests can never be fully thorough.
During college, my algorithms classes focused on proving solutions rather than coding up, so I have done a lot of proofs since then, which I think improved my understanding a lot. I am probably not as speedy as I was in 2020, but I definitely approach problems in more structured ways and try to do little proofs if needed.
If you find proofs hard to understand, you might want to take a "Math for CS" class from one of the universities online. MIT has its class up for free: https://openlearninglibrary.mit.edu/courses/course-v1:OCW+6.042J+2T2019/about. After taking mathematically heavy proof classes, I found myself much better at proving statements/solutions.
Advice for me by seeing my profile
It looks like you are can steadily stay in specialist level (congrats!), so the next step would be to train to master the expert rank. I think this is around the point Codeforces alone becomes insufficient to train, so I'd highly suggest also joining/solving AtCoder competitions. This website has a nice table to keep your AtCoder progress. I also suggest applying the same strategy I described in my comment above.
In addition, you should start getting comfortable with slightly more advanced topics, so combining the strategy with USACO Guide would work quite well (Silver, Gold).
can you explain why does codeforces alone becomes insufficient to train ? What is missing here ?
At least when I competed more, I feel like the types of problems in Codeforces were not generally diverse enough to improve problem-solving abilities. Sometimes they are a bit too speed/implementation/data structures focused. Thus, it's a good idea to look into OI/AtCoder style problems as well.
Thanks Sir
is being a grandmaster that hard ?
I know a lot of Codeforces grandmasters and they are all extremely brilliant people, and all of them are very hard working. Some of them are very fast learners, and some others took their time to reach to the rank. I am not to speak too much since I couldn't reach that high, but talking to them, I would say it requires a lot of effort and consistency. More importantly, what this means is, you'd have to make some sacrifices -- not only the notion of "free time" disappears, but also you'll spend less time on other activities (gaming, watching movies, family time) for some period.
I personally prioritized other parts of my life and stopped doing competitive programming during college, but I am very happy that I spent a lot of time on it during high school -- probably one of the few things that got me to where I am.
recommend some math textbooks that may help in CP
where do you work ? what's your market track
why u solved only 600 problems. what other judges u use
how can i be Golovanov399
For math practice, I highly suggest MIT's 6.042 class: https://openlearninglibrary.mit.edu/courses/course-v1:OCW+6.042J+2T2019/about. It's pretty good and goes over pretty much everything you'll need to know before reaching grandmaster. CP-Algorithms and USACO guide also has pretty good tutorials on topics you need.
I still think about longer-term plans, but for the time being, I'll be doing software engineering in the financial industry. But I also have gotten into a master's program, which will probably happen at some point.
I was a pretty bad competitor in terms of consistency, so I'd mostly never upsolve, which can explain why I am not a grandmaster. But I used to use AtCoder, oj.uz, Codechef, Hackerrank.
There's perhaps a lot to learn from Alexander, but I think you should stay being yourself.
How to beat Div2C in codeforces
See my two comments above: one and two. Happy to answer a follow-up, though.
What is the optimal practice strategy? Most of the people say it's "just practice". But how to? Should I filter problems in the problemset and solve the problems on top? Should I join a virtual contest anytime I can? Should I spend time on topic problems or greedy/constructive ones? How much math do I need and how can I reach that level? My questions might (they apparently do) look chaotic, sorry for that. But I would love to know the way you were practicing. Thanks in advance.
Please check out my other comments from above (it's getting harder to link), but I think the main step is figuring out what keeps you from doing better in contests. You will naturally be better at solving some types of problems than others for the time being, but if you realize that and practice correctly, you'll see big differences. For examples, I was great at math problems but really bad at graph. In fact, I'd avoid graph problems, which kept me from doing better. I saw a very noticeable progress as soon as I started doing a bit of graph practice. Thus, I suggest making a list of topics that you should be good at and starting out with 5-10 problems for each (of balanced difficulties). Mark your progress and efforts on each to see what's working better and worse, and then focus on your weak spots. Some topics, as you mentioned, like greedy/ad hoc/constructive are not very easy to practice, but your intuition for them will develop over time as you solve problems (not just problems in those categories but pretty much all).
Realistically, the math section from USACO Guide — Gold covers topic-wise what you need. And it will probably be enough math until you reach to IM/GM ranks. However, math also requires a lot of intuition, and looking into some topics from MIT's 6.042 might help with that.
Honestly, not great, but it was fun times! I spent a lot of my time working with friends and teaching underclassmen during school. In theory, I could probably spend more time trying to get better ranks, but everyone has different goals and I'm happy I could make a lot of great friends by forming a tight competitive programming community in my country.
Thanks for enlightenment. I will try my best. Cheers.
Maybe the real GM rank was the friends we made along the way.
How do I get into MIT? What’s the probability I get into MIT if I apply next year?
Other than the logistical requirements (SAT, English scores, etc.) I think they care much more about what kind of person you are and who you want to become further. Here's an official blog on what the admissions office is looking for: https://mitadmissions.org/apply/process/what-we-look-for/
Having an IOI medal helps, but it's not a requirement — I did not have one when I got into MIT. Having a very high SAT score helps too, but it's also not too strict — I believe I had 1440, but my friend had only 1320 (out of 1600). There's also bunch of small essays you'll have to write. These are probably the most important part of your application, since it's the only way (other than a potential interview, which comes later) the admission officers get to know you personally. mitadmissions blog has examples of great ones, but let me know if you need me to link some. Well-written letter of recommendations from your teachers also helps. In addition, it's important that your whole life does not revolve around doing competitive programming — you have to show them that you are also willing to take on real-world tasks, help others, be interested in other topics, etc. Again, the blog is very great to have a sense of what you should need. One common mistake is to make all of your essays about olympiads, so while do definitely mention them in your essays, don't give the impression that you didn't do anything else.
Ultimately, as amazing place MIT is, I think there's more important things than education (let alone where you study) such as your values and attempts to become a better individual while sticking to those. But if you do get in, you should be very happy, because a big, fun journey is waiting for you.
It's always hard to say! I applied to 20 universities in the US, and I got rejected from 19 of them. There's definitely a lot of luck involved, but I see that you are a grandmaster, which tells me you are ready to take on academic challenges and probably even have national/international achievements, so also make sure to start building up your personal non-academic profile.
How did you get into MIT?
I downvote everyone who's name is Amir_Parsa
Keep downvoting, my contribution is 105.
It's hard to say exactly, but here's my best guess.
However, note that everyone who gets in have their own unique reasons. I suggest reading the MIT Admissions blog to get some more diverse sense.
Thanks a lot sir, does problemsetting in CF and other CP platforms help someone to enter MIT easier?
Sure, that can help. However, given you are already doing well, as I mentioned in comment above, I'd also try to build up a non-academic profile (e.g., sports/music, volunteering, helping with social problems, etc -- see if you can get a certificate as well).
what level of math knowledge you need to reach Master? did your math background help you a lot?
My math background definitely helped me a lot. I think for master rank, you only need to know the math section from USACO Guide Gold, but knowing a bit more about proofs/induction can also help to formulate better ideas. See comment above: https://mirror.codeforces.com/blog/entry/130195?#comment-1156444
Can u suggest some of the best online courses of Maths and algorithms which one should do to be better problem solver.
Here's a great overall resource for CS classes of any type: https://github.com/ossu/computer-science
For math, I'd suggest MIT's 6.042 and for algorithms, I'd suggest 6.006 and 6.046 from MIT. Stanford and CMU also has pretty good courses. Find links in the github repo.
What are your thoughts on how to practice for ad hoc problems? I'm curious to know if a mathematical background helps build a framework for approaching these.
Also, what do you do when you get stuck on a problem and can't think of any new approaches/ideas for a while?
Math background definitely helps, especially if you did bunch of combinatorics. Here's a nice combinatorics book to read when you have time: https://archive.org/details/olympiad-combinatorics.
In general though, ad hoc problems are mostly about having a good intuition, which comes from recognizing similar ideas and making dots connect -- which you get better with more exposure to problems and solutions. I don't do competitions anymore, but sometimes I still read a problem, think about it for 3-5 minutes, and then read the solution immediately. My goal is not to be able to solve it but give myself more exposure on problems and solutions.
During the competitions, it's harder done than said, but refreshing your mind on the problem, or even switching problems a bit helps. I remember in IZHO 2020, I was very stuck on a problem and went to the bathroom, washed my face with some cold water and thought a bit about non-competition stuff for 2-3 minutes. When I went back, I thought of new ideas and was able to do quite well. Also, it's a good idea to have a little checklist of general topics. Some really great problems have very interesting twists. E.g., IOI 2012 Ideal City problem comes down to a much simpler idea you usually don't think about, so it's good to keep a list of areas (e.g., greedy, dp, graph, tree, binary/ternary search etc.) and see if you can transform the problem in one of those.
it's a tree problem
It's been more than a year since I was stuck in the specialist. I want to reach CM before my graduation which is in June 2025. Most of the barriers for me are that I sometimes leave contests thinking that I can't solve the next problem without reading it. Like yesterday's div2 D was too easy but I thought that it was D how can I solve it? Sometimes problems become hard to read or a few WA make me leave the contest without giving a proper try. Always fear losing the rating. Any guidance to be better?
Do you think people who start cp late with no problem solving ability from past can reach somewhere around gm, given they follow proper practice guidelines for at least 10 years?
I know it's question with no right answer I just wanted opinion from someone with your background.
Thanks
Advice for me by seeing my profile, I registered to cf 3 years ago and I took it seriously 1 year ago and now I stuck what you suggest?
As you can see on my profile, it also took me more than a year to reach pupil rank but then I quickly started getting better. I'd like to make an analogy to the temperature of water vs time graph:
I think practice is like that too -- when you begin, you start immediately learning a lot of things and being able to solve very simple problems, but then you feel stuck there. The key is to keep practicing and learning. Please see my comments above for some tips on practicing for Div 2. A/B level problems, in addition to some other blogs by others I linked. Make sure to learn the language well (e.g., for C++, STL is super important) and do a lot of practice. I strongly suggest starting solving AtCoder ABC problems as well.
Can you please check my profile and give me some advice?
I think the same advice as in the comment above also applies, but happy to answer more questions! https://mirror.codeforces.com/blog/entry/130195?#comment-1157213
Can i get Some advice too ? If I am not late Currently I am solving Rosen discrete maths and Doing 3 Problems a day in rating range 1600-1700 and Atcoder A , B , C with timer
Hey. I just wanted to point something out:
Why are your templates changing with each submission? [link-1, link-2, link-3]
To be honest, copy-pasting 1600-1700 rated problems will not help you. Be truthful to yourself, and try to solve Div2-B (Also, if you are able to solve 1600 in practice, you should definitely by able to solve Div2-B in contest). Increasing number of solved problems by copy-pasting is just pathetic. Don't do it.
hey larush thanks for pointing it out but I am seeing other people submission only after thinking about problem for 30-40 minutes , Most of the time I am able to think the logic behind question but always fail to implement them
Then how can you hope for rating?
In contest, you need to implement on your own (right?).
Yeah implementation is the big trouble for me , its not like that i cant implement i just make a lot of blunder then spend 15-20 minutes debugging it , I don't struggle in Div 2 that much because i only solve 2-3 problems last contest was the first time i solved DIV 2 c because it was not that implementation heavy , Most of time while solving hard problem i make complex logic and argument then spent a lot of time in it for no reason
like this — https://mirror.codeforces.com/contest/1743/submission/264579041
i was able to deduce that 1st subtring will be the whole subtring then what i came up to solution that first we will skip the trailing 0 or 1 then 2nd substring length will be equal to that substring then i will just use sliding window the check every subtring of that size and then use stoi to calculate the xor (yeah i forgot we have to print binary )
i solved half hour implementing that and then get frustated and saw the solution from submission (cuz i was not able to grasp the editorial ) then spent 3- 4 hours tying to understand this solution which i submitted and later i realized that it is also a sliding window just a little bit different from my implementation
did same with this too — https://mirror.codeforces.com/contest/1741/submission/264587350 was trying to solve it using 3 different kind of for loops because I came up with a crappy logic ( my first thought was dp too but i was like nah it will be n^2) and solution was a little bit mixture of dp and dfs
How solve div2 problem C in 6 min? cheater
I did not solved c in 6 minutes, I just skipped Problem B and started Solving C My first approach to solve B was to Find an index where x (which is smaller element )is equal to y then use a while loop to increase count of ans while increasing index where x is equal to y and i = 1 together then after printing out array for test case where x and y is 4 and 12 i just realized its all about binary , then i quickly edited my code B and submitted it before c and honestly it was just a guess
https://mirror.codeforces.com/contest/1979/submission/264463788
why vector name like haha. feels like someone trying to copy code quickly.
hey man i know it sucks i dont have any way to proof i did not cheated , all I can say I practice regularly I have account on atcoder , alcumus , and codechef from same name if you doubt me you can check on them too give me 2 months I reply to this comment again after becoming candidate master or you can message me on discord i can give global round in front of you
you don't need to reply to trolls
Congrats on reaching pupil! It's good to hear that you are also practicing math. It sounds like you are having difficulty with implementation-heavy problems. Unfortunately, the only way to attack this weakness is by doing implementation problems. Problems of rating range 1600-1700 might be a bit too high -- for now, I'd focus on being able to quickly implement 1200-1500 range problems and actually coding them after figuring out the solution. It helps to write out some logic on paper -- a plan of what you'd be coding, and then actually doing the coding. Once you can consistently solve Div 2. A and B quickly and sometimes solve C, I think you should be reaching to a higher rank. Then USACO Guide can also help to master some more advanced topics.
Please also check other comments for suggestions -- I'd like to keep repetition to minimal.
thank you For taking your time to answer this , Honestly I think the root cause of this problem is me copying other people solution , i solved A20J ladder like this i just think solution then check solution that my logic is correct or not and copy the solution and move on, Now due to this my problem solving skill is decent but i suck at implementation
What code editor/IDE do you use in CF contest?
I started off using CodeBlocks on Windows. To be honest, it was pretty good -- you don't need much for a coding competition, just a text editor and a run button. Later on, I switched to Ubuntu and started using Atom as my editor and used custom scripts to compile and run (side note: Atom stopped development).
Right now, I am on Arch with GNOME (Wayland) and I use VSCodium as my editor for pretty much everything, but I rarely do contests anymore. I do a lot of C/C++, Rust, and web development though.
Any advice for me, after looking at my profile? Btw thanks for giving back to the community :)
I see lots of contests and a nice grow from newbie to specialist -- good job! I think it's about time for you to start practicing to be able to solve Div 2. C problems (or easy Div2. D). You'll have to find your weaknesses to get better. I'd suggest a strategy similar to this comment: https://mirror.codeforces.com/blog/entry/130195?#comment-1156435
Find which topics you need more practice in by experimenting and grind them, and you should be feeling much more comfortable with them shortly. Don't only think about why the solution is the way it is, but also how one could start thinking about the solution -- the thought process starts to matter a lot more in this level. Happy to answer more questions!
Hi! Thank you for your post.
Great experience. My question is — what are the most valuable things you found/experienced at MIT and does it have alternatives elsewhere?
GL further!
You did hit me with the hardest question here! Firstly, I will start by saying that you can make whichever university you go to very special for you -- in some of them, this will be easier and I think MIT is one of them. For me, MIT was a place of many different journeys and I grew in ways I didn't expect there.
I enjoyed two things the most: the people and the teaching opportunities. You could put the name "nerd" on everyone at MIT, but you'd be surprised about the diversity of people and their interests. Even if it's something extremely niche, you'll see someone doing it. Keep meeting different people and you'll find yourself doing things you have never even thought of before in your life. I met so many people and had so many different experiences with them (late-night discussions, long coding sessions, hacking [1], dumb stuff around campus, partying, etc.) and I'm very grateful for these, and I sure hope that these connections and friendships last forever.
I also got myself into helping to teach some classes by first becoming a lab assistant for a programming class. Basically, a lot of students come for help and you do 1-to-1 sessions with them to help them understand the material better or debug their code. First, my plan was to keep doing this so I can become a TA (teaching assistant) so I can get free funding for master's, but in no time I realized that I actually love teaching a lot, so I spent around 3 years at MIT helping to teach 4-5 different classes. Teaching is quite hard because the main point is to not give away the answer but help the student find the answer themselves, but the satisfaction I got from getting them there and seeing them being so happy was far more than any "Accepted." Being a TA, you also get to develop material for classes, and even though one might say "these are MIT students they can figure out," we tried quite hard to make it easy and even were very careful about wording of the content. I also enjoyed educational content creation a lot.
[1] https://handbook.mit.edu/hacking
I think it sure does. Honestly, some advanced classes might be taught better in other universities since MIT has great researchers but sometimes they prefer to put less effort on teaching. I remember referring to Stanford, CMU, and some European university courses for additional resources. I think great people exists everywhere, and it will take a bit of effort to find compatible people with you, but remember that college is a temporary place, so make it fun wherever it is.
Thanks, man! I know that reflective questions can be tough sometimes :)
How do you feel about bitset problems?
Eh, I prefer vectorizing manually by aligning the memory and using AVX intrinsics (
_mm256
vectors). /swhy you didn't try game development ?
Should we be scared of AI and its upcoming abilities for CP and market jobs?
by looking at my profile can you tell me what should i have to do for reaching expert? Thank you
what difficulties did you faced while shifting to US from azerbaijan
What should I do to become a master? Do you think I can become a master?
Hi, hope you're doing well. I'm about to enter college and recently got into CP, but I am unsure of how to go about learning. I have heard that lot of people tend to jump into problems and learn as they go from reading editorials, but this seems a bit undirected and incomplete. On the other hand, I am thinking of reading an algorithms book (Skiena) and then doing problems but I am afraid this will cause me to lose out on the subtle tricks or techniques I may learn from problem solving. How did you go from beginner to highly ranked?
I am not able to move past specialist for past couple of months. I am targeting to increase my rating to 1700+ in next 30 days. Any advice/tips for me, after looking at my profile? Nowadays I am just practicing by giving virtual contests. Is it good and what other things should I do to improve?
Would you please advice me something from my profile?
Sir , Please review my profile. I am not able to solve C's in Div2 contests.
Pls review my profile. So how can I get to master? And how canI perform more stable?(I always perform randomly)
Advice for me by seeing my profile. Please?
Could u review my profile plz,, 70% times I am unable to solve Div2C though I know basic of BS,dp,dfs,bfs , segtree etc