Introduction:
- CP is not about topics (it just so happens that some genius people solved famous problems), it is about thinking and figuring out the solution.
- How the sessions are going to be held:
- Problem-based. Problem to read and think about, may be you can invent the algorithm on your own.
- How to solve it using the topic/algorithm/famous trick that we are going to introduce.
- Today is introduction, then codeforces, then STL (we may have no time for STL aslan)
The next things may seem to be general, but it is really important to take notes.
Mindset and Motivation:
- Emphasis on how fun Competitive Programming is.
- It is fun; it is not boring. It is not hard, but it is not going to be so systematic and easy. I hope to try to make it as simple as I can; however, it does need some effort from your side.
- There is no such thing as stupid and smart. Never judge yourself as someone who is not born for this. Everything about yourself is controllable. It is the one thing you have control over the most.
- Thinking is a byproduct of all thinking techniques you have randomly discovered.
- Personal Anecdote from high school.
- How I spend my time when learning a solution, I don’t just learn the way the problem is solved as much as I ponder on the way the author thought about it or the technique of arriving at the solution. Many solutions may have a similar structure in the way of thinking that can be around approaching a problem. I have been collecting thinking techniques whenever I see a solution
- My list of thinking techniques that I collected from the past. (Always work hard to make the problem easier for you to think about)
- One of which is my blog.
- Battat el problem, each time rephrase the subproblem you are facing
- Removing distractions
- Fixing a point
- Solve a simpler version of the problem
- Contribution to the sum
- Change of representation
- Be confident. Think of yourself subconsciously as a smart person. Whenever something is wrong, doubt the approach, and not yourself.
- Stages of practicing:
- Reading the problem
- Thinking about the problem
- How to think about the problem:
- Explicity is important (codeforces contest 769)
- Always keep a pen and a piece of paper beside you.
- Have a sense or an intuition about why a solution is true (or better, a proof). Sometimes a problem can have a simple solution that you don’t even believe is the solution. (However, we don’t always prove solutions in contests)
- Never feel like you are missing something. Go to the problem with the mindset that you ARE going to solve it. Don’t give up before you even started trying.
- Don’t think the problem is always going to be some topic that you don’t know or haven’t studied. Always keep in mind that you CAN solve it and just do your best. That’s how practice does.
- Things to do when stuck:
- Solve a simpler version of the problem (remove a constraint for example)
- Don’t get stuck on one approach. Try reading the problem again with a fresh brain without anything from previous approaches. If you can’t do that, then go read another problem and come back to it.
- As long as you’re achieving some sort of progress, keep thinking about the problem. When it all halts, try to struggle to unlock the halt for about 15 minutes. If failed, take a hint or take a look at the solution.
- Try small numbers and examples
- Reflecting on the process
- If you did not solve the problem:
- Sloooooow down, don’t judge yourself. Our minds are so poisonous.
- Look at what you did wrong. Doubt your approach, not yourself.
- Is there something about the way you think that can be changed? Try changing it!
- Was it a topic that you did not practice? Go study and practice it!
- Look at the editorial and try to feel how the author thought about it. If you couldn’t do it, ask somebody and let him/her explain his/her thought process about the problem.
- What to do when you don’t understand the editorial: (three possible reasons):
- You don’t know a specific topic
- You don’t have enough practice
- You haven’t spent enough time to think about the problem.
- How to practice random problems:
- Strategy 1. Register for codeforces/atcoder contests
- Strategy 2. Open problemset and choose random problems
- Strategy 3. Errichto Server, gitgud
- How to stay motivated
- The many things that you can do:
- How to go about contests: (this particularly helps in interviews)
- Practicing methods (Solve until u stop, then upsolve until you halt)
- How to relieve stress
- Always think about problems, and how beautiful they are, not performance.
- Have fun. Not care about rating. You can do something rash to relieve that care about rating like solving starting from E.
- Be calm, be serene. Think very very carefully on paper before you jump into code.
Random points:
- Top 3 things that contributed to me becoming CM
- Calmness and Serenity and Having fun during Contests
- Think very well on paper before you code anything
- No mental block from any problem (contest where I solved DABC)
- How to maintain level after the training
- Learn to type fast
- Be committed to training. Have strong reasons to train. State these reasons, and write them down. Be determined. 6-8 hours is almost enough. Sessions amount to nothing if you don’t practice on your own during them.
Codeforces: Facebook of competitive programming
- A sea of contests
- Div. 1, 2, 3, 4
- Rating system