haochenkang's blog

By haochenkang, history, 14 months ago, In English

Hi everyone,

I thought of a graph problem, It seems easy but I can't figure it out. Can someone help me with it?

Basically, there are N people that wants to join a party. However, you are given M pairs of people that cannot be with each other. Your task is to find out the maximum number of people that can be invited to the party.

Thanks!

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By haochenkang, history, 16 months ago, In English

Recently, the chat bot ChatGPT is released to the public: https://chat.openai.com/chat.

Try typing in "generate the KMP algorithm in c++", or "diameter of tree in c++ using adjacency list". Or even "multisource bfs implementation". It immediately gives you the code for it. Crazy right?

test

This brings on the question: how will this affect competitive programming in the future? I know there have been many programming AI bots before like Github Copilot, but ChatGPT takes it to a completely different level.

Interested in hearing your thoughts about this.

Full text and comments »

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

By haochenkang, history, 2 years ago, In English

Hello everyone,

I am writing this blog to suggest you to be careful when registering for a contest that is not rated for you.

This is what happened to my friend: my friend registered for two contests, both before they started. One is Div 2, which is rated for him. Another one is Div 3, which is not rated for him. The Div 2. round came before the Div 3. round.

What happened was that he took the Div 2 contest but his rating fell below 1400, which means the upcoming Div 3 will be rated for him. However, when he first registered for the Div 3 contest, it showed that it is unrated for him. Now, suddenly with his rating drop, the Div 3 contest became rated for him without him realizing.

My suggestion is that you should only register for one contest strictly after rating changes roll out for your previous round. This ensures that you know if a contest is truly rated or unrated for you.

I simply want to write this blog since we have Codeforces Round 786 (Div. 3) coming up right after Codeforces Round 785 (Div. 2) . Just want to make sure you don't have to go through what my friend went through.

Full text and comments »

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

By haochenkang, history, 2 years ago, In English

Hello Codeforces,

Recently, I've been scouting around profiles and looking at the number of questions specialists and experts solved. I realized that most specialists and experts have solved under 300 questions. This is really discouraging and demotivating because I have personally solved over 600 problems but I have just reached specialists.

I would like to know whether experts and specialists are practicing coding using a different platform, or do they have a more effective of training than just solving as many problems as possible. Also, please provide me with effective training techniques that helped you improve in competitive programming.

Much thanks!

Edit: Thank you to everyone who replied and provided me with useful tips. I will definitely use all of your tips!

Full text and comments »

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

By haochenkang, history, 2 years ago, In English

Hello Codeforces community!

I have a question regarding question B in the recent CodeTon round.

My solution passed all pretests, but TLE on test 22 in the main tests. My code is: 150736681

I used an unordered_set to keep tracking of the seen elements. However, when I changed it to set, the solution passed main tests too. I have always thought that unordered_set is faster than set. Can someone please explain to me what's happening here?

Thanks for any help!

Full text and comments »

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