# Self-reflection in CP
You just completed a 5-hour contest, now what? I always make sure to reflect on how the contest went. What follows are the major points I make sure to think of. You probably already do a lot of this, some things more or less conciously than others. Hopefully you can learn at least something from this.
Always make sure to self-reflect; it's easy to fall into the trap of thinking "I just had a bad day" when things go bad, and "I am so good, all skill" when things go good. In reality, there are always things that you can improve.
There are two broad categories: in which ways could you have prepared better knowledge-wise, and in which ways could you have used your knowledge more effectively.
# What should I have known
Sometimes, you encounter problems that were simply out of reach. There are multiple ways in which this can happen.
## Lack of knowledge of some technique
This is probably the easiest case to remedy: there are some techniques, where if you need them, you need them. For example, if you need convex hull trick for the last 40 points, there is nothing you can really do during contest if you don't know how to code it. The conclusion should that you put learning said technique on your to-do list. Also note that if you lack knowledge about x, it's likely that you lack knowledge about things tangentially related to x, so try to become aware of what you don't know, and then determine whether it's worth it to learn them. As an example, common DP optimizations in the case of convex hull trick.
Note that if you are aiming for IOI/NWERC gold/ ICPC medal, you might need to invent some technique that could be considered standard during contest time. I would recommend that when learning new techniques, you try to envision a way in which you could've invented the technique yourself, given the problem you were trying to solve.
## Weak area
You might have a weak area. Examples could be combinatorics, geometry, floating point precision, or interactive problems. You should try to determine whether it's worth the the time to improve in said area. For example, if you just encountered BOI 2023 astronomer (a heavy geometry problem), you might consider learning geometry. Looking at BOI, it might not seem unreasonable: there have been 2 BOI problems with geometry the last 5 years. However, BOI has a much less defined syllabus than IOI; it had a linear algebra problem in 2024. Meanwhile, IOI has basically not had any geometry in the last 10+ years. If you actually enjoy computational geometry, it might not be a terrible idea, but if you dislike it, your time could probably be spent better.
On the other hand, if you are bad at math-y interactive problems, you should probably practice them, given that they have been extremely prevalent in the IOI in recent years.
In general, I would not recommend practicing by topic. But if you have a weak area, it is probably a good idea to solve a couple of hard problems in said area.
## Problem-solving ability
Always try to envision how you could have come to the right insight.
# What should I have done better given my current knowledge
## Mental
When it matters most, it can be easy to find yourself stressed, which hinders both your ability to make judgements on what to focus on, and to think. It can be difficult to properly practice performing under pressure, as you will only find yourself in the IOI a handful of times throughout your life. You might have heard of my creative way to create high stakes for IOI-style contests, but I would not recommend it. The best advice I can give is probably be to try to take note of your mental state when you perform well, and finding cues on how to enter said state and stay there. There is research showing that it's much more effective to focus on when things go good than bad (when considering mental state).
## Strategy
Throughout a contest, you will probably make at least 30 micro-decisions on how to spend your time (switching between problems, coding, debugging, thinking, etc.). Even in hindsight, it can be difficult to see how you should have used your available information to turn an ok decision into the optimal decision. However, when you make large mistakes, it is often easier (and more productive) to reflect on why.
It is also a good idea to reflect on whether you solved the correct subtasks. Always make sure to focus on how you should have acted differently at the time, given your current available information.
In general, make a point of not justifying your actions by their outcomes; outcomes are noisy, but decisions are not. Sometimes you act wrong but get lucky, or do everything right and get unlucky. Thinking in this way is much more productive for self-reflection.