Alex7's blog

By Alex7, 4 years ago, In English,

Participating in a big competition like IOI or ICPC can be intimidating, the worst thing that might happen to you is that you manage to get nervous enough to enter that adrenaline-fueled fight or flight state, you start feeling that you need to get out of the contest fast. An easy bruteforce solution that would take you 2 minutes to code in a normal environment suddenly requires 10 minutes, or at least that's what happened to me the last 3 major competitions I participated in (APIO 2014, IOI 2014 and APIO 2015), while it wasn't very noticeable in APIO 2014 -I quickly forgot about it because it was my first medal a bronze one- and I blamed that state on sickness in IOI 2014, after APIO 2015 it became clear to me that I'm making the mistakes over and over.

If you're really new to competitive programming, someone who doesn't really care much about the result, or someone who's trained since the age of 6 you probably won't relate to these issues, but after I've done some research I realized that this is more common than I expected. The same pattern happened to me every time: I had the right ideas, I got WA on my first submission, I panicked and then my brain basically stopped working (and of course all the known symptoms of the fight or flight state).

I remember talking to someone after day 2 in IOI 2014, he told me: "When I read the problems, my brain stopped working I didn't even understand them, after the contest I read them again and came up with 243 points worth solutions". And his solutions were very neat and differ to the tutorials that were given to us after the contest.

So the point that I'm trying to make is: If I and everybody who suffers from the same problem, could solve problems during a competition as big as IOI with the same level of problem solving skill we usually demonstrate in any other environment, our results would differ greatly.

Have you ever had those issues? Did you manage to fix them?

Also in case of IOI-like competitions, what is your general strategy?

UPD: I got a bronze medal in IOI, the advice bellow is really helpful

 
 
 
 
  • Vote: I like it
  • +344
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it +25 Vote: I do not like it

If you're nervous because of a competition, it just means you haven't done enough competitions. When it becomes a routine to you, you won't be nervous.

Of course, not being nervous doesn't relate to not failing. Sometimes, you just don't get the right ideas at the right time because you don't get them, even if you're calm.

Even better: go to extremes, you won't be bothered by anything normal after you've gone to proper extremes. Example: how many competitions have you seriously participated in at the same time? :D (for the record, I think I haven't gone beyond 3)

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +39 Vote: I do not like it

    It's very difficult to do enough competitions (like IOI for example), you only get one chance per year, and other competitions simply don't have the same pressure.

    As for doing several competitions simultaneously, I think it's a wonderful idea I'll give it a shot :D

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      You have internet competitions. There are plenty of them and... well, rating or medal, the actual value is the same.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it -40 Vote: I do not like it

      3tes 3ddo 8llak haya nafs al7aki

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it +19 Vote: I do not like it

        Virtual Contests have no rating... Virtual Contests are one of the best stress-free activities in life, not really relevant to my problem :P

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      as far as the pressure goes, just try to give each and every rated contest on various sites as a really significant one, where you just need to perform well. For. eg. try to give your rating as much importance as a medal in IOI or ACM. After a few such matches, i guess you will feel more comfortable.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I don't have problems on competition. I eat, drink , I watch the other cometitors...

I know that there is no chance for IOI , and I'm trying to play with interesting tasks :)

When you realize that you'll be great !

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +30 Vote: I do not like it

    I used to do that when I had no real chance, the pressure comes along when you know you can/must do it

»
4 years ago, # |
  Vote: I like it +92 Vote: I do not like it

Even after hundreds of competitions, I still tend to tremble and feel cold during the competition. To get over, I find it a good habit to think like "OK, I already gave up this match. Let's enjoy during the remaining time."

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    Interesting

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +8 Vote: I do not like it

    nice! staying "nothing to lose"

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +87 Vote: I do not like it

    Yes, the nervousness never goes away completely. I think it's a natural thing in unfamiliar environments, and there are very few people in the world who can say that IOI or ICPC WF is a familiar environment for them.

    I like to remind myself that the real "prize" in competitions is exposure to new problems. Then, even if I get stuck I can tell myself that I should be happy, because I have a hard problem to think about. It sounds crazy, but it really works. :P

    I also think that remaining calm in high-pressure situations is a transferrable skill. Personally, I used to get nervous in all kinds of places: competitions, talking to girls, public speaking, doing interviews. When I gained experience in any of them, I became less nervous in all of them. So, if you can think of other things that make you nervous, and make yourself face them, it can help you handle programming competitions better.

    • »
      »
      »
      4 years ago, # ^ |
      Rev. 3   Vote: I like it +84 Vote: I do not like it

      Completely agree with the "high-pressure situations is a transferrable skill" part. Since in relationship with my girlfriend, my rating has gone up noticeably.

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it +263 Vote: I do not like it

        Doesn't work in the reverse direction. Since my rating having gone up noticeably, I haven't managed to get a girlfriend.

        • »
          »
          »
          »
          »
          4 years ago, # ^ |
            Vote: I like it +82 Vote: I do not like it

          You just ruined my hopes, sir..

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it +53 Vote: I do not like it

        Screw you! You have high rating AND a girlfriend. I have neither :\

        • »
          »
          »
          »
          »
          4 years ago, # ^ |
          Rev. 2   Vote: I like it 0 Vote: I do not like it

          Well, green, blue & gray codes are jealous a bit I guess, they'd like to get on your level at least(well, I'd surely do my best to achieve such height, going to try coding as hard as possible in future months.) Having yellow colour of handle is not bad, imho. But you can do better, so as everybody(even tourist, I believe).

»
4 years ago, # |
  Vote: I like it +35 Vote: I do not like it

I never had any problem with competitions. Perhaps it's because I'm still green! :P

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +20 Vote: I do not like it

    Or maybe because you're an xbox gamer :3

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      playing on xbox makes his SSSP codes much better :P ~~~~~ xbox.code("Dijkstra"); ~~~~~

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it +4 Vote: I do not like it

        Nah he just got to play GTA V a long time ago....

  • »
    »
    20 months ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    now you're purple xD

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I know man, I always make silly mistakes caused by pressure/stress. Last example: I took part in code jam 1C and I could have scored 55 points (and I could be advanced to round 2) but I made a very silly mistake in the big A so I got only 33 points (the small tests) :(

»
4 years ago, # |
Rev. 5   Vote: I like it +170 Vote: I do not like it

I had this issue when my team went to ACM WF in 2012. Scoreboard.

Our goal was high: we believed that if we do well enough, we could probably win medal (during training, we solved past ACM WF problems & did well enough).

When we entered contest, my brain stopped working, my hand froze (should have wear gloves :))). I misread problem statement of C twice, and my code quickly turned messy because of that, which caused many more WAs and TLEs. My teammates probably had the same issues, so after 3 hours we solved only 3 (B at 58', D at 122' and C at 194'), and we haven't even read problem statements for most of the problems.

I think it was at around mid-contest (before I debugged C, meaning I haven't contributed anything meaningful to the team), that I decided that ACM WF medal is no longer possible for us. I told myself to stop being stupid and try to solve at least 1 more to not let the team stay at the bottom of the standing.

As you can see from scoreboard, that helped. I debugged C around 30 mins after that. Then my teammate & I were able to solve L in 20 mins (10 mins for thinking + 10 mins for coding), which was quite amazing since not many teams managed to solve that problem. In the end my team solved 6, placed 17, which was very amazing considering how badly we started the contest.

Going through that, my failure was mostly due to the fact that the result mattered too much to me (it was ConanKudo 2nd WF, he taught me everything I knew, so I had to win that medal for him), while I was not confident enough in my own ability. (if you look at my CF ratings, it fluctuated a lot at the time, so deep down inside, I was paranoid that I will fail before I entered the contest).

But then there's this paradox: if I didn't care about the result, how could I train hard? But if I did care, I will likely fail again.

In the end, I believe that it's OK to care about the result, to try as hard as you could. Just don't be afraid of failing that goal.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    I think it's amazing that you managed to regain balance after such a hard situation, I should learn from you.

»
4 years ago, # |
  Vote: I like it +32 Vote: I do not like it

I think that it is normal and many competitors had those issues (for example mnbvmar who dominated camp preparing to Polish OI didn't qualified to IOI in previous year), sometimes I had those issues too, but sometimes contest like national OI or IOI is very motivating and I solve very hard problem which I can't solve or I solve it much slower without this motivation.

»
4 years ago, # |
  Vote: I like it +58 Vote: I do not like it

When I was at last grade in school and took part in IMO 2013 I used next technique for preparing: during three monthes before competition I've downloaded different olympiads (Chinese, Vietnam, Romanian, Zhautykov, etc) and was solving them for 4.5 hours and after each read solutions. So, when I was solving problems on IMO I was so calm and solved all problems which I could solve (differently to IMO 2012, where I solved all problems of second day after contest, but on contest I took only 9/21 points). So, in my opinion, if you think that your level is high enough then you don't need to learn new ideas and algorithms, you only need to practise your contest-skills.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    That's a great idea I'm gonna do it

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      I guess it's a bit harder for OIs because you mostly don't have graders available (meaning it's more difficult to check correctness and implementation)

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I have a secret weapon :D

        • »
          »
          »
          »
          »
          4 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Would you mind sharing? I could use some IOI-style problem practice myself.

          • »
            »
            »
            »
            »
            »
            4 years ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            I'm planning to use a local server with and install CMS on it :D

            • »
              »
              »
              »
              »
              »
              »
              4 years ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              Try installing Arch Linux instead

              When you're finished making a system you can work with, you won't view not having a ready judge as an obstacle :D

              • »
                »
                »
                »
                »
                »
                »
                »
                4 years ago, # ^ |
                  Vote: I like it 0 Vote: I do not like it

                Why Arch Linux exactly?

                I mean Ubuntu is fine right?

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  4 years ago, # ^ |
                    Vote: I like it 0 Vote: I do not like it

                  Try it, you'll find out :D

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  4 years ago, # ^ |
                    Vote: I like it 0 Vote: I do not like it

                  It's very easy for you to say, my internet is 1 mbit/s so downloading anything would take a long long time :/

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  4 years ago, # ^ |
                    Vote: I like it +28 Vote: I do not like it

                  Ubuntu is fine.

                  Arch is an evil joke (as you can guess from the image), because it'll require you configure a lot of things manually. Kind of Gentoo which does not require you to build everything from source.

»
4 years ago, # |
  Vote: I like it +41 Vote: I do not like it

I think i can relate to this , i also have this kind of symptoms every time i compete . My hands and feet get very cold even if there are over 25 degree in the room lol , even in some cf rounds i get nervous .

I can think of the problems but i have a very hard time coding them... 10 minutes to a brute-force? WOW MAN , you are fast!! My personal record was about 2 hours on some really easy and basic backtracking . That happend last year.

My guess is that this is some kind of genetic situation , we are prone to get over nervous. My mom is very similar to me.

Damnit sometimes its worse , i cannot sleep at all the night before (this happens very often actualy).

Same thing if i try to talk to a girl i like , lol , then its even worse , my voice tone changes (i'm not kidding lol it happend).

But i don't care ,I think is actually funny, and its just how I am .

My advice to think positive . nothing you can do about it Just hope for the best even if you know you will panic or brain-freeze. I also need to eat something when i code , i think it relieves stress , i don't know, maybe. eat a fruit , it may help you

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Lol, well when I enter that stressed state I somehow can't eat anything.

    I also have to go to the bathroom like every 10 minutes, which is well textbook adrenaline effects :D

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      i quite often go to washroom during the contests and sometimes come back with an idea .. lolz

  • »
    »
    4 years ago, # ^ |
    Rev. 3   Vote: I like it +17 Vote: I do not like it

    When you are thinking+coding, your brain was using energy too much, so your hands (and your face) lose temperature.

    In this case, you should warm up your hands (+ face) manually, by some gesture (massage your face by your hands for example).

    But the above solution is not my best solution. The most effective solution of mine is to learn the way to control the pressure. However, it is not convenient to say here.

    PS: I knew the way to control my pressure very well. So I am always full of energy during APIO 2015, and my result is very high.

    PS: I have no secret about my experience. Because it is personal experience, it is hard to use language to express the idea. It will take me a lot of time to "convert" my experience to words.

    I am going to have a detailed post talking about the way to control pressure during a contest. I have this plan some days ago. I need much time to prepare my post carefully, because it is hard to persuade people using words only.

    My idea about controlling pressure is built for a long time. I believe that it will be useful. Therefore I recommend you should read it some days later.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I think I can fly back to Vietnam sometimes, just to discuss about this with you. After you come back from IOI maybe? :)

»
4 years ago, # |
Rev. 6   Vote: I like it +14 Vote: I do not like it

The same thing is happening to me since i begin competitive programming, but now it began to vanish slowly, the strange about this is it's happening to me in codeforces only opposite to topcoder, in topcoder i'm in div 1 with max rating 1408, there i'm feeling cold during the contest, the rating doesn't matter i'm not afraid of being down-rated i'm giving a problem complete thinking.

In codeforces oneday my friend told me that's because you're afraid of failure, i believed him i began to enter contests and trying to convince my self that i can do it and when i'm down-rated i began to say that's not important i know what my ability, rating isn't important.

what i'm trying to say being nervous and equivilant feelings maybe about being afraid of failure, althought you can make great success with just a cool feeling during contests. In my case i was going to bathroom like every 2 minutes (i'm not kidding xD).

»
4 years ago, # |
  Vote: I like it +23 Vote: I do not like it

This is our story for last regional competition.

My team was really good, and we thought we would finish all problems and win the first place.

However, we got super nervous and it took 30 min to finish the first problem, which was easier than most Div 2. B. (I sometimes can finish both A and B in < 15 min. Imagine our frustration)

We were doing horrible in the first three hours. We weren't even the first place in our site.

(Partially because there was also a typo in one problem, which makes it incomprehensible, and we were freaking out 'cause we didn't even understand problem statement!)

Things changed when our rival school in different site finished all problems in less than 3 hours. (That was impressive)

We were like "We can no longer win the first place. Let's just chill out and finish the rest"

and we finished all 9 problems only with 2 WA and won the third place.

One thing good about ICPC is that we always have teammates. I can't go through the pressure by myself, but I can with my teammates :)

»
4 years ago, # |
  Vote: I like it +45 Vote: I do not like it

One thing I observed is that you should not think about the competition itself before it. Things like browsing participants list or predicting standings, because you can't help doing something connected to contest should be strictly forbidden. Being acquainted with competition's atmosphere is wrong. Skipping practice day could be a really good idea (of course if you do not predict any technical problems or if your teammates will take care of them). For me it was often case that I mastered first day and miserably failed second day, because I got excited after first day. To give some examples, I consider 2nd place in POI and 1st place in Poland's Collegiate Programming Championship (as a part of qualification to ACM) as my biggest successes. In first case, the day before first day of competition I met with a nice girl and next day I took 1st place with a significant margin (and did worse 2nd day, but not that bad). In second case, competition happened in my city and I had to skip practice day, so I didn't have to travel many hours to place of competiton and attend many opening ceremonies what made me less excited. Of course excitement after competiton is allowed :).

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +42 Vote: I do not like it

    Ah, if only I had a nice girl to meet with :( ... Some people have everything, great Codeforces rating and a social life.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +111 Vote: I do not like it

      Don't go too far with stating that I have a social life :P.

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it +32 Vote: I do not like it

        Did you meet that girl on the contest site :O ?

        • »
          »
          »
          »
          »
          4 years ago, # ^ |
          Rev. 2   Vote: I like it +58 Vote: I do not like it

          Yes, there are girls in contest sites, not just the guides, but also contestants. As an example, my girlfriend is IOI medalist.

          • »
            »
            »
            »
            »
            »
            4 years ago, # ^ |
              Vote: I like it +24 Vote: I do not like it

            Last year's IOI there was like 6 girls out of 300+ contestants

          • »
            »
            »
            »
            »
            »
            4 years ago, # ^ |
              Vote: I like it +11 Vote: I do not like it

            Just out of curiosty — are you a IOI medalist :D?

        • »
          »
          »
          »
          »
          4 years ago, # ^ |
            Vote: I like it +6 Vote: I do not like it

          Lol, why is everybody focusing just on that single statement xD? Final of POI was held in Sopot and that friend lived nearby, that "contest site" was not some deserted place or some heavily guarded building which we can't go outside whole week ; d.

          • »
            »
            »
            »
            »
            »
            4 years ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            Now that makes sense

»
4 years ago, # |
Rev. 5   Vote: I like it 0 Vote: I do not like it

After IZhO, Eurasian Olympiad and the National championship, I thought that my experience will be enough to APIO 2015. Certainly not. As soon as the contest began, I quietly read all of the tasks and started to code but after I maked mistakes in simple backtracking and began getting WA, RTE my brain shut down and I just started spasmodically coding. My total score was 0 + 36 + 8 = 44.

Later when Open APIO started I permanently removed my previous solutions from PC and coded my ideas (which I had after APIO started) clearly without stupid mistakes.

  • A. 1st submit — 46.
  • B. 1st submit for B — 36, ..., last submit — 57.
  • C. 1st submit for C — 22, ..., last submit — 31. Then I found idea for C (with help of na2a) that theoretically will get 63 points.

Score = 46 + 57 + 63 = 166. Damnit!

Now I have changed the method of preparation: all the day except evening I'm learning one subject (like dynamic programming, graph theory, combinatorics, etc.) — solving problems from easy to difficult (if couldn't solve, then I read the editorial). In the evening I'm doing a virtual contest and after reading the editorial.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You're not alone. In APIO 2015, I started with solving A subtask 1 and kept getting WA for 40 minutes. I was very frustrated, so I decided to skip that problem and moved on to B and C. In the end, I came back to solve A and realized my bug in backtracking in 2 minutes. Sometimes, your mind is not in a right state yet. It just needs to warm up a bit. Actually, it's not a bad idea to take a break, and go read other problems first.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yeah should've seen my APIO OPEN:

    I got 25 + 36 + 17 on the original contest

    in Apio open I only submitted my debugged solutions basically and got, 71 + 100 + 31 so :/ yeah sure

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    In APIO2015, when I read problem B I found the 57 solution instantly ,I coded it and got WA on subtask3 I tried to find the Bug but I couldn't, my brain stoped and I couldn't even write the bruteforce solutions , it was a very bad contest for me

»
4 years ago, # |
  Vote: I like it +37 Vote: I do not like it

This is my solution to solve psychology problems before contests:

1, Don't read and try to solve very hard (or even hard) problems in one week before contests. If you can solve them, you will really joyful, but if not, you will actually be in trouble. Of course, probability of the second case is higher.

Easy problems are used in the right time can be extremely valuable.

2, Don't do things or meet people that you don't like near contests. They could make you feel terrible, angry and worry.

3, Work hard as much as you can. About 1 week before contest, think about what you have learnt. If you study hard enough, then there is nothing to regret. Just close your eyes and have a nice dream before match begins.

I used them this year and up to now I feel they are still right, evidence is that I passed the national team selection for APIO 2015 and also did quite well in APIO 2015. Right now I haven't code with 10 fingers yet (even I must see the keyboard when coding, hehe :) ), and my knowledge is not much higher than others students in Vietnam. However, I nerver think about them before contests.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    what if you haven't study hard enough? And when you fail, you realized that you haven't worked and practice hard enough, you could done better, and the regrets won't stop coming. What will you do?

    • »
      »
      »
      4 years ago, # ^ |
      Rev. 2   Vote: I like it +8 Vote: I do not like it

      If you don't study hard, then that is your own mistake. Maybe, sometimes you can say to yourself that: "I am really intelligent and I have studied enough!" before contests. However, this is not a good solution, and you should not use it many times.

»
4 years ago, # |
  Vote: I like it -19 Vote: I do not like it

Why no contest and no pay attentions?

»
4 years ago, # |
  Vote: I like it +24 Vote: I do not like it

Ummm ... I think I've experienced mainly 2 types of stress/pressure during contest:

  • state of blank mind: usually happens at the beginning of contest. My mind can't even read.
  • Hurrying up and doing stupid mistakes.

And I think solutions to these types may differ. For state of blank mind, usually these work for me:

  • Remembrance. Before contest (and/or during it), try to remember states of yourself when your performance/mind was calm, focused, and awesome.
  • Pulling yourself out of contest, like going to bathroom (and walking slowly to there), is usually so much of help to me. Or to pull your mind out in any other way, like looking around.
    And probably if you put a plan to execute when you face this type of pressure, probably you're already also making a way to pull you out of contest mode just by executing it.

For the second type, I think the techniques could be similar to the techniques that reduce the stupid mistakes in general:

  • Separation. By separating coding phase, the phase where I usually get excited to code the problem AC from the other phases, I think I could calm down. So, force yourself to not start coding till you've 100% formulated the idea and code-sketched it and there're no missing parts.
  • Also, I try to read the code after I've written it BEFORE running it.

And of course, some of the things mentioned above like nothing-to-lose mentality, or thinking of the worst case and seeing that it's not really that bad nor end of the world.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    I don't know if I am referring to the same thing, but the 'blank mind' happens to me quite often. My mind tells me, "I need to solve this, or solve that, the time's running out" over and over, but thinking goes really slowly, and I have no 'willing' to solve problem — I just can't do anything to solve them, while teasing myself to solve any. I read statements over and over, but I don't understand any word. Suddenly I feel like a fool. It feels like when you're sleepy, but you aren't. You aren't nervous, rather relaxed enough. It reminds me of a mild skull fracture with celebral hemorrhage. I do that so many times, especially when the problems are too hard — or seems like — for me. It happens in my exams, math olympiad, IOI-training summer camp, etc. I haven't found quite a useful solution for it, but sometimes measures mentioned all above helps. A refresh — like going to bathroom, as mentioned above — really helps. I think it's because it accompanies slight walking. Some sweet might help, too. Relaxing is also important. Being desperate to solve something never helped me.

    P. S. I remember that a few years ago, in KOI(Korean one), they put a big box full of candies, chocolates, and chocolate bars in the center of the hall. One could freely pick them up while going to the bathroom. Now they hand out a big chocolate bar. I miss those old days :)

»
4 years ago, # |
  Vote: I like it +12 Vote: I do not like it

I think like this:

The thought that I am better than my results is very dangerous. Everyone gets nervous, everyone have bad days, everyone makes silly mistakes. Therefore those are a part of me and I shouldn't make excuses about them. If I couldn't solve a problem during a contest it is because I wasn't good enough to solve it. If I get beaten by others then it means that they are better than me. If everything became obvious after the contest it means that I needed too much time to get it. If I win sometimes and lose at other times it means that I got lucky when I won.

The solution to all of these problems is to train till I get results no matter what state I am in.

»
4 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Ehh, I've faced this problem a couple of times. I began doing competitive programming about 9 months ago, at VKOSHP (in Russia it is something like ACM-ICPC, but for school students), me, comunodi and Insectophob (the green team, lol) participated in such a big event for the very first time.

On the first day there was a warm-up round. The problems were relatively easy but we had solved only two of three. But that was not a result of panic or something like this — we were way too relaxed.

My feelings before the second day of the contest were completely different. Everything was falling from my hands, I couldn't talk even to my teammates(we're good friends IRL), my hands were sweating etc.

When I saw the problems(for the big part of codeforces community it's easy, but not for the team of green youngsters), I got frightened. But when I re-read the first problem I was able to come up with a solution. We coded it and then... The process has stopped. Only Insectophob was trying to code, I felt lost.

But then, in the end of the second hour of the contest an idea came to my mind: this is just a list of interesting problems. You won't get any harm if you do not solve them, right? And then things became brighter. We solved two more problems and had many ideas on the other but couldn't implement it, the problems were beyond our algorithmical knowledge, lol.

We finished 6th, and only 5 teams got to the finals, our time rating was worse than 5th team, we were really angry.

But it was a great lesson for us, I believe. About 9 months had passed already and I've participated in a good amount of online contests. Of course for the first contests I was really afraid, but then it got better and better. I started to feel myself more convenient during contests, my hands are not sweating anymore.

But sometimes the idea of not being afraid, that it is just a list of problems you CAN solve just gets out of my mind. And if that happens — the terror takes me under control again. Just try to keep that in mind, it works for me :)

Also, if you want to feel yourself in IOI-atmosphere you could try to imagine that IOI has moved to your place during online contests, that everybody has a locked room with a computer and a list of problems to be solved. If you can control youself in the situation — you won't be afraid of big onsites, I suppose. But that's only theorycrafting, I cannot prove my hypothesis, everything is personal, you know.

Hope that this is going to help :)

»
4 years ago, # |
  Vote: I like it +11 Vote: I do not like it

I had the same feelings during IOI. Just keep yourself far from any reason to worry about. 1) Prepare well. If you know that you could be more prepared it is the reason to worry about. 2) Try to not think about would will be if you succeed or fail. Just do it! 3) Have a guidelines about what to do during contest. 4) THE MOST IMPORTANT ONE I THINK. During the contest always give a report yourself what have you done already and what you are going to do. It will keep you away from wasting the precious time. 5) You have to be awesome in implementing your solutions. IOI problems are not easy to implement. If you waste too much time on implementation and debugging I guarantee you'll panic. Make your own code writing style and follow it. As an example I write longer code sometimes to make it clearer and easy to remember. I have my own standard for implementing segment trees or Dijkstra.

IOI is most emotionally difficult competition I have ever had. It is totally normal to get nervous during the contest. Always remember that it is normal and it will not help you.

This guides helped me to win silver at IOI 2014, still it was very stressful.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    The guides were awesome I'll tell you that :D

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Try to stand up from the chair, walk around it, watch in the window for 3-5 minutes. It helped me sometimes. It's even better, than sitting and getting stuck at the same problem for 1 hour.

»
4 years ago, # |
  Vote: I like it +14 Vote: I do not like it

Another important point that must be made is preconceptions: During my last APIO when I was thinking about problem A, when I came up with a solution it was simple and straight forward so I was thinking it's APIO the problem CAN'T be that easy and that's why I dismissed the solution. So don't do that :3

»
4 years ago, # |
  Vote: I like it +35 Vote: I do not like it

Well, I don't have much experience in big coding competitions, so I can't give you any coding advice. But I do have experienced stress and I can give you some general tips. Hope they'll help you! : )

One of the most important things for reducing stress is a good night sleep! Specially the night befor your competition. I know that lots of people, mostly coders, do not sleep well. I suggest that you make a routin out of it. For example about a month befor competition, every night at 10 PM go brush your teeth, drink some milk (milk is a good drink and it makes you sleepy), and go to bed. Taking a hot bath will also help you sleep better. If you do that for a while then your body is gonna use to go to sleep with this routin at a certain time. So the night befor competition you'll sleep instead of freaking out! :D

The other important thing is DO NOT STUDY the day befor competition. You had enough time for studying and you did as well. Studying the day befor will only increase your stress, especially if you can't solve a problem. I also suggest that find out the solutions of every unsolved problem you had in your mind. Cause they might come and stuck in your mind during the contest and interrupt your thinking! :D Try to have fun and relax the day befor competition. Do whatever that makes you feel better, not anything dangerous though! :D

Sometimes after a contest, you think of somethings that you could have done to do a better contest. It can be a general tip like "do not do that" or even an algorithm that you had no idea you could use for a problem. Try writing them down and read them the day befor competition. No one knows what's best for you better than you! ;)

During the contest when you feel like you can't think, stop trying. Take a deep breath, drink some water, eat a piece of dark chocolate (but not so dark :)) something like 60% is enough :D chocolate generally makes you feel better and the caffein in dark chocolate gives your brain a tiny shock and wakes it up :D). Try thinking about somethings that you love and makes you feel good. It can be a nice memory, a funny story, a person, or even God. Anything that works for you. :D After you felt calm then start fresh. I mean literally fresh, grab a new piece of paper, re-read the problem, and start to think about it differently. :D

MAN, I talked a lot! :)) Hope they'll be useful! : )

Good Luck! : )

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    "If you do that for a while then your body is gonna use to go to sleep with this routin at a certain time."

    And then, a few days before the contest you sit into a plane at 6 PM, fly for 12 hours and when you land, it's 3 PM in the destination. And you are happy if you can keep awake during day and sleep at night. Needless to say that your routine is completely broken.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      Well actually for me it works like this, I can sleep any time I want and be awake exactly 6 hours later. :D So yeah you're right maybe you won't be able to sleep at that exact time that you're used to but you still will sleep better :D

»
4 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Just before important contest drink a lot of coffee / energy drink / preworkout.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Sorry but I should strongly disagree! Energy drinks are for people who actually need lots of physical energy! It's for people like atheletes who do lots of physical activities not for coders who just need to think. It's really dangerous for your health. If you drink them for a long time, you're gonna lose your kidney. And if you drink a lot of energy drink in a day you may even die! This is a link that might help So I strongly recommend you that DO NOT drink lots of energy drinks befor contest. Also drinking lots of coffee for people who are not use to caffein can be harmful. They even might have heart attack! :D

    So in general, I think using these things might not be a really good idea... ! :D

»
4 years ago, # |
  Vote: I like it +16 Vote: I do not like it

Something not mentioned yet, but related to stress (I guess). I quickly figured that I could solve 301-A (div 1) with some form of DP, so I started coding the for-loops. Then, I had an initial idea of what things I had to sum for each new value in the DP table. The problem was that I hadn't really thought it out that well, so I spend about 10-15 minutes trying to fix my code until the output on the samples was right. After this, I figured that my state (something with #errors=n) was wrong, and should have been #errors<=n. Then, I decided to stop coding for a moment and actually think about the problem. After that, it was maybe one more minute to implement this and get AC.

This pretty much happens to me all the time: start coding a partial solution, because you are eager to solve the problem and because you want to increase your ranking. (Maybe it was a virtual participation, but I am always very motivated/stressed to end high.) Then, you figure (maybe after a WA/TL) that you missed something silly, and have to rethink your solution.

Conclusion: First completely solve a problem in theory, apart from maybe some things that you are really confident you can solve on the fly, and only then start coding it.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I had the same problem, and i really don´t think it´s about not to have enough experience. In fact, I think that the problem are the negative ideas that we have in the middle of the competition. When you're pessimist and you´re always thinking that you´re gonna fail, you'll be nervous and the most probably is that you will fail as you thought. It happened to me, but now I say to myself that i´m good enough and that´s all, just do the best that you can and if it´s not enough, just train..

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The Psychology will be completely different, if you've like solved all the previous problemsets and know that you can do it again, it's not the problem of thinking that you're going to fail rather than FEARING failure

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks for the info

»
14 months ago, # |
Rev. 2   Vote: I like it +97 Vote: I do not like it

A few years later:

Turns out much of my struggles were due to severe ADHD. Usually, working memory (your ram) correlates well with other mental faculties. However, ADHD can cause relative deficiencies.

Before, I ranked way above average on everything other than working memory. A few months ago during testing, I discovered that I couldn't hold more than 2-3 in my head at a time and that I had an "impaired level of verbal memory" (aka did as well as someone who would barely be able to write his name down).

With treatment all of these problems, and the problems I mentioned in this blog were totally solved. If I wanted to do competitive programming now the only thing that would matter is the number of hours I put into training, and it's waaaaaaay easier to put as many hours as I want to

If you related to any of the problems, seek professional help (or first do your best to move to a country where that help is available) beyond just psychological tricks. A few weeks of proper training and/or medication can shift your memory from bottom 5% to top 99.5% and can make working for 10 hours instead of 1 hour day just a matter of a little bit of willpower and not totally impossible.

  • »
    »
    14 months ago, # ^ |
      Vote: I like it +47 Vote: I do not like it

    It's fascinating how you could get a bronze medal with untreated ADHD. I'm happy you are now aware of the issue and getting treatment. I think everyone has those problems to an extent, but probably in your case, they were so much more highlighted.

  • »
    »
    14 months ago, # ^ |
      Vote: I like it +89 Vote: I do not like it

    "(...) from bottom 5% to top 99.5%" — well ... I think that bottom 5% and top 99,5% are not even disjoint :D

  • »
    »
    14 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    so, you basically mean, a few weeks of training 'can' make our brains lose 90 % of their original power :3 ? (Top of bottom 5 % to bottom of top 99.5%)

  • »
    »
    14 months ago, # ^ |
      Vote: I like it +14 Vote: I do not like it

    Apologies mein fuhrer, from being in the bottom 5% to being in the top 0.05%. Wouldn't want you to think that we don't believe in order and The Chicago Manual of Style sir.

  • »
    »
    14 months ago, # ^ |
    Rev. 2   Vote: I like it +10 Vote: I do not like it

    Dude, you have no idea how weird my mind is. I can't focus on one thing for a long time either, or very strongly... but I don't see it as a problem, but as something to adapt to and use.

    I'm running on ingrained habits and indescribably intuition most of the time. I can relate experiences (not necessarily my own) to other experiences. Enough grinding and talking to people about it got me to this point.

    I discovered that I couldn't hold more than 2-3 in my head at a time

    What does it mean to hold something in your head? I don't know such things. Thoughts just exist, by themselves, and I can try to look for them or try to follow a line of thoughts.

    Oftentimes, I realise during a contest I'm thinking about something completely different and that I've forgotten what I tried to think about. Oh well. I'll just try starting from the beginning, maybe it will work this time... Other tricks I have is "well, if I can't think about one thing, I'll just think about more at the same time", letting my mind wander in several directions, one (or more) of which is the contest.

    UPD: What was the improvement in your CP skills afterwards?

    • »
      »
      »
      14 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      When I am near a hot girl with nice curves, I cannot focus on any tasks at all; it's even worse than ADHD and no amount of Adderall can help me. This is so sad, Alexa play Love Story by Taylor Swift.

      • »
        »
        »
        »
        14 months ago, # ^ |
          Vote: I like it +4 Vote: I do not like it

        That isn't solved with Adderall, but with alcohol.

      • »
        »
        »
        »
        13 months ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        Great choice of song man, I already like you

    • »
      »
      »
      14 months ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      What does it mean to hold something in your head?

      You are told a list of words and asked to immediately repeat them back.

      • »
        »
        »
        »
        14 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        That doesn't have to be done by keeping them in your head, just bounce back the sound.

        Anyway, it was a rhetorical question meant to show how I don't really "remember" things. If there's some delay, I'm horrible at this kind of repeating words thing, too (maybe 2-3 is normal for me), and I can't comprehend how someone could remember a lot of them.