Nathan4's blog

By Nathan4, history, 7 weeks ago, In English

Meme

Bonus!

"never stop grinding" Codeforces version

Full text and comments »

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

By Nathan4, history, 7 weeks ago, In English

The story: Five days since the last round and waiting for the next one makes me want to do something, and seeing posts a few days ago on "no upcoming contests", I somehow wanted to see if we really are having fewer contests. Below are the findings❗

The data counts for all contests with a div. [#] included in their names and all global rounds.

In specific, I counted their divisions, date, and participant number, and then visualized the data into two types of graphs:

  1. Frequency count of rated contests by divisions, based on their month and year.

  2. Average number of participants for a division in each month of year.

Overall distribution

Image

There seems to be no clear trends of frequencies within a year (e.g., I was expecting there will be more during summer holidays), however, there is a faint decline in contests over the past two years 💔:

Division 2 Distribution

Here are the distribution and average # of participants for div. 2.

Image

Image

A clear pattern is that there are more participants during the beginning & end of the year and the summer holiday, as shown by W-shaped curve for each year. On a greater scale, the average number of participants is also increasing steadily over year, with a huge boost in 2020 (curious why it happened, COVID perhaps?)❗

However, despite the stable amount of division 2 contests from 2020-2023, we have fewer in 2024. There has not being a single month with less than 6 div. 2 rounds from 2021 to 2023, but this year we already have four!

Division 1 Distribution

Here're also the distribution and average # of participants for div. 1.

Image

Image

I haven't participated in any div. 1 contests yet, and therefore can't make clear explanations for the weird trend of participants # which took a boost in 2015 and 2020 but then declined for a while (would love to hear about some possible explanations).

Again, however, the number of div. 1 contests is going down this year. Only 1 rated contest per month for five months this year is too hard to bear. This worries us potential div. 1 participants as well!


Are we having fewer rated contests?

From these graphs, the answer is sadly yes. However, the purpose of this post is not to blame anyone for the trend. I find it enjoyable to explore all the trends and patterns (there are definitely more) and also feel motivated seeing an increasing number of participants (as I'm one of them). However, with these steady increases in the # of participants, I think that we should have more contests, definitely to an extent that is no less than the previous years.

Do you want more rated contests?

  • Yes

  • Now is fine

  • No

Which one would you want to have more the most?

  • Div. 1

  • Div. 2

  • Div. 3

  • Div. 4

Would love to see comments on this or cool patterns in the graphics

Full text and comments »

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

By Nathan4, history, 7 weeks ago, In English
Why am I writing this

Here's two pretty useful command lines which run your code on local .txt files and write the results as .txt files (This is the input and output format required by the upcoming Hacker Cup!):

After you have your solution ready, first run the following in your terminal (I'm using vscode), be sure that you are in the same directory as your code:

g++ -o [output executable file name] [code file]

For example, when I am solving problem A, I will run:

g++ -o a a.cpp

After this, your terminal should return nothing and work fine. This first line compiles the code for you. Next, you can directly run the Executable with Input/Output redirection:

./[name of your executable file name] < [name of input txt file] > [name of output txt file]

So for the previous example, I will then run:

./a < ain.txt > aout.txt

Be sure that the input txt file's directory is also correct, and you should see aout.txt appearing in the same folder as your code file, and the results lie inside.

Hope that no one will be stuck in this step again for the first round, and wish all of u good luck (I didn't notice any written tutorial about this, but feel free to link other good ones :D)

Full text and comments »

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

By Nathan4, history, 2 months ago, In English

There are 11 last month, but right now we have only five, and the contest page is empty (for rated ones)..

Spoiler

Full text and comments »

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

By Nathan4, history, 2 months ago, In English

It's been 7 hours, why are they still there?

UPD: 10 hours already and seems like nothing's changed

Full text and comments »

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

By Nathan4, history, 2 months ago, In English

This is a feature on Luogu's homepage. You can search about a problem there and navigate to the problem, but you can also navigate to a random one if you click the blue button.

Luogu homepage

I think it would be cool if we can have a similar function as the random navigation one on the Problemset page. It can be random navigation to any single problem, but it can also be navigation to problems that are within 200 ratings to your current one (your rating +- 200).

I'm not sure if this will be considered as just "copying features", but if not, this feature will definitely be interesting to use and practice.

Full text and comments »

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

By Nathan4, history, 3 months ago, In English

Hey Codeforces,

I wanted to share my experiences experimenting with different warm-up routines that can help improve focus during contests. I believe this topic is particularly relevant for those whose time zones make contests fall during early mornings or late nights. Getting into the right psychological state before a contest can significantly boost your performance!

Personally, I usually participate in contests from 10:35 pm to 12:35 am due to my time zone, which makes it challenging to stay focused, especially in the second half since I’ve typically been awake since 7 am on school days.

To address this, I decided to try out various warm-up strategies suggested by experienced members of the community. My goal was to find out which ones work best for me (though, of course, this is subjective!).

This blog is divided into the following sections:

  • Tips on warming up from experienced participants.
  • My experiences and reflections on trying different warm-up combinations in recent contests.

If you’re short on time, I recommend checking out the first section, as it contains more general, widely applicable advice.

Warm-up Tips

There have been a few past posts on this topic (e.g., here and here) that offer high-quality tips. I’ve summarized the most useful and reproducible ones, ranking them by how frequently they were mentioned:

  • Sleep
  • Energetic music
  • Caffeine
  • Relaxation (meditation, breathing exercises, or reading)
  • Simple math exercises or solving some Div. 2 A and B problems
  • Use the bathroom before the contest starts
  • Avoid too much coding
  • Set up your workspace: open the contest window, documentation, create a directory, and have scratch paper ready
  • Push-ups

Another useful tip I’ve noticed from watching top coders is to stand up and walk around when stuck, rather than staying seated and writing directionless code. This has been particularly helpful for me.

At first glance, these tips might seem pretty standard and nothing groundbreaking. That’s what I thought when I first skimmed through the comments. However, I realized I hadn’t actually tried some of them before, even though I expected they would be helpful (the hardest part of #implementation problems is actually writing the codes...). So, I decided to try most of these strategies (excluding caffeine, as my contests are late at night) in recent contests.

My Experimentation

I noticed a pattern among the tips: most of them fall into two categories—**relaxation** and exercise. Although these aren’t mutually exclusive, I decided to try each approach separately and then combine them.

Relaxation Routine

For Round 967, I focused on a relaxation routine:

  • Took a one-hour nap in the afternoon.
  • Meditated for ten minutes about twenty minutes before the contest.
  • Didn’t attempt to solve any programming or math problems before the contest.
  • Set up my workspace (e.g., opened the complete problem set link) two minutes before the contest.
  • Watched the countdown during the last minute before the contest.
  • Wore earbuds during the contest but didn’t play any music.

Reflection: I was able to concentrate fully throughout the entire contest. This was a significant improvement since I usually find myself refreshing the problem page and getting stressed by seeing how many people have solved the problem I’m working on. By focusing solely on my progress, I avoided unnecessary stress. While the problems themselves obviously play a role in how well I concentrate, I do think the warm-ups—especially the nap and meditation—helped a lot.

I believe the nap gave me the energy needed for the later stages of the contest, and the meditation helped me maximize my focus. Specifically, I sat on the floor in a slightly warm environment and listened to waves.

Excitement Routine

For Round 968, I tried a more energizing warm-up routine:

  • Scanned a few Div. 2 A and B problems and mentally came up with solutions.
  • Did 30 push-ups ten minutes before the contest.
  • Practiced typing on Monkeytype five minutes before the contest.
  • Listened to some energetic music.

Reflection: I felt totally hyped up at the start of the contest. However, what really got my adrenaline going wasn’t the warm-ups but CLOUDFLARE. Imagine opening the problem set only to be greeted by the spinning Cloudflare wheel and a message saying, "Wait, your browser is being checked..." That’s what truly got my heart racing!

The main difference between this approach and the relaxing one was that I immediately started writing on scratch papers as soon as I understood a problem. With the relaxing approach, I spent more time dissecting the problems mentally before writing anything down.

A Mix of Both

For Round 969, I combined both approaches—meditation followed by push-ups—to see how each contributed to my performance. This turned out to be the most effective strategy! I was able to maintain focus throughout the entire contest (well, maybe not at the very end, as everyone was watching tourist push for 4k, myself included :)).

Reflection: In the end, I think the most effective warm-up strategy involves a balance of both approaches: staying mentally focused while being energetic enough to write down your thoughts.

My personal most 'useful' ones: CLOUDFLARE, sleep, meditation, push-ups...

Also, I encourage you to experiment and find what works best for you! One final practical tip I’d recommend is to experiment with your own warm-up routine before practice sessions too. I found that applying these routines to virtual contests or practice rounds was helpful for building consistency. Over time, you’ll start to recognize which combinations of relaxation and energy-building techniques work best for you. Just like your coding skills, your ability to mentally prepare is something you can refine.

One more thing many top coders emphasize, which I haven’t fully mastered yet, is getting used to the stress of competition. I still, for a lot of times, feel tempted to see my current ranking during the middle of a contest, even though I knew that this is probably going to affect me negatively. And every time when I get stuck on a problem and see more and more people solving it, I become more stressed.

Ultimately, I’m sharing these strategies from the perspective of a 1600-1800 rated coder. I’m curious, what useful warm-ups do you do before contests?

Thank you for your feedback!

Full text and comments »

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

By Nathan4, history, 3 months ago, In English

I read about this from somewhere else, but can't agree more...

Zuckerberg sold your information so he’s a free man.

Pavel Durov didn’t, so he’s in jail.

It’s this simple.

FREEDUROV

Full text and comments »

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