Cpp_Writer's blog

By Cpp_Writer, 4 weeks ago, In English

You are given an integer $$$N$$$, and a string $$$S$$$ of length $$$N$$$ that only contains W and L. How many substrings $$$[l,r]$$$ in $$$S$$$ that satisfies:

  • $$$S_l=S_r=\texttt{W}$$$

  • The value of the count of W in $$$S_{[l,r]}$$$ minus the count of L in $$$S_{[l,r]}$$$ is greater than or equal to $$$K$$$ ($$$K$$$ is an integer and $$$K>0$$$).

Full text and comments »

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

By Cpp_Writer, 7 weeks ago, In English

Thanks for your voting!

Rank Word
1 Rule about third-party code is changing
2 Sorry for my bad English
3 Cheating
4 orz
5 XXX-forces
6 The transitions are then straightforward
7 As a tester, ...
8 DelayForces
9 Alts
10 Bugaboo

These are all about the past. See the great development on Codeforces in 2025!

Full text and comments »

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

By Cpp_Writer, 2 months ago, In English

I started competitive programming in July 2021. After two and half years, that's a long time, I just reached specialist. After every wins and losses, I always thought my coder life is like a road without any ends. I wanted to give up more than one time, but the charm of competitive programming always kept me going, on the long and lonely way.

In the first year of competitive programming, I just learned binary search, greedy and some other algorithms. But I couldn't use them proficiently. I even failed in the first round of CSP-Junior (An primary competition in China). Although China was strong in competitive programming, there were only three coders in my school, and two of them were retired in the 9th grade. I felt lonely at that time because no one could teach me to improve except my programming teacher (my friends did't know anything about programming at all) until I found Codeforces.

Under the guidance of Luogu users, I created my CF account in October 2022. And I took part in my first contest named "Hello 2023". Due to the lack of adaptation to the new community, I got Wrong Answer for 3 times. Finally, I solved 2 problems in my first contest and gained 441 rating. That's a good start for me. Then my performance was getting better. After my fifth contest, I reached Pupil. Unluckily, I stuck in Pupil for almost 1 year. I gained and lossed several times. I watched some people improve quickly, and I wanted to practice more for reaching specialist.

No pain, no gain. On Feb 6th 2024, I solved 5 problems in one hour in a div3 round. Finally, I ranked 974 among 28,000 people. I gained 99 rating and reached the goal for 1 year. Near the Lunar New Year, the sound of firecrackers continued all the midnight. It was like congratulating me for the achievement. This time, I finally realized what the charm of competitive programming is. The road of competitive programming won't always be smooth, but the belief in success will inspire you to keep going. Looking back, I don't have any regrets. My programming teachers and the community are always with me. I want to say this inspiring sentence — You'll never walk alone!

Full text and comments »

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

By Cpp_Writer, 2 months ago, In English

Recently, there were some blogs about cheating in contests. And many users had a discussion about why they cheated, how they cheated, and so on. We spent too much time catching just a few "found" cheaters (the number of cheaters is much more than we found).

The cheaters are shameful. They broke the contest rules, and made us spend a lot of time finding him to maintain the fairness of these competitions. But they just thought gaining rating is fun, though the ratings weren't achieved through their strength. They thought of competitive programming as interesting games because they didn't parcitipate any offline competitions. They don't need this skill.

I saw some blogs on Luogu about problems in a running Codeforces contest before. However, the academic climate of Luogu was good. The users didn't give solutions to them who asked and they reported about the blogs to the admins. The admins finally deleted the blogs.

I think the academic climate is the most important thing of competitive programming. Cheating groups were cheating themselves. To maintain the fairness, we can just automatically ban / or send warnings to cheaters but not discuss (like AtCoder). We need to solve the problem from the root. I believe Codeforces is an upward programming community. Start with yourself, don't give solutions to other people is the best way (and report the cheating actions). Because cheaters can't be all found. "It's a road that leads into a swamp. And we may not get out of it."

Full text and comments »

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

By Cpp_Writer, 3 months ago, In English

There is a problem that I came up with recently.

Statement

You are given a integer $$$N$$$ and a integer sequence $$$D=\lbrace D_1,D_2,\cdots,D_N\rbrace (-N+1\leq D_i\leq N-1)$$$. Do permutations $$$S$$$ and $$$T$$$ from $$$1$$$ to $$$N$$$ exist that for any $$$1\leq i\leq N$$$, $$$S_i+D_i=T_i$$$? If the answer is yes, give one possible permutation $$$S$$$.

Sample

input:
Case 1:
2
-1 1
Case 2:
3
-1 1 -1
Case 3:
4
-1 0 -1 2
Case 4:
5
-3 -4 2 3 2
Case 5:
5
2 -3 2 -3 2

output:
Case 1:
YES
2 1
Case 2:
NO
Case 3:
YES
3 4 2 1
Case 4:
NO
Case 5:
YES
2 5 1 4 3

Full text and comments »

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

By Cpp_Writer, 4 months ago, In English

We all know what happened with tourist these days. He fell behind the top 10 coders. But why do we only see his failures?

24 years ago, he started his coding journey. But now, he's still in the lead of comptitive programming.

How many times has he won first place in contests? And how many times has he been the first in the world? We can't count them.

Over the past few years, many people wanted to surpass him. But they can't. And how many people were working hard in comptitive programming with him as their goal? After him, the new legends will come.

Even though he's old, even though his rating is dropping, he's always in the lead, he's always the best.

Time is infinity, tourist is infinity!

Go for it!

P.S. There will be tourist's 30th birthday in 2024. I'm looking forward to it.

Full text and comments »

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

By Cpp_Writer, 11 months ago, In English

same as the title.

The last global round was held 7 months ago.

Please write it. I can't wait.

Full text and comments »

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