Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

wusixuan's blog

By wusixuan, history, 48 minutes ago, In English

本文由 lzm2025 借用账号发表,下文均是 lzm2025 所写。

This article was published by lzm2025 using a borrowed account.Everything below was written by lzm2025.

This article was translated from Chinese into English using AI. The Chinese version follows the English version.

  • English: If you downvoted this post, could you please tell me why, so I can address your concerns in the post?

  • Chinese: 如果你 DownVote 了这个帖子,你能告诉我 DownVote 的原因吗,这样我可以补充到帖子中。

upd:中文版的 latex 数学公式似乎出现了一点问题,你可以看英文版来知道完整的 latex 数学公式。

upd:There seems to be an issue with the LaTeX math formulas in the Chinese version. You can refer to the English version to see the complete LaTeX math formulas.

中文版

对账号 lzm2025 的申诉

发生了什么

在 Codeforces Round 1137 (Div. 2) 中,我在一个小时内解决了 A 至 E 五题。

具体来说:

  • 在 A 题中,我尝试将 $$$x$$$ 分解为 $2^s t$(其中 $2 \nmid t$),并成功推出了 No 的充要条件是 $s = 1$,即 $x \equiv 2 \pmod 4$。

  • 在 B 题中,我注意到了 $$$b_i$$$ 只可能在 $$$a_i, a_{i + 1}, \dots, a_{n - k + i}$$$ 中取值,并且证明了如果这些值完全相等,$i$ 才是合法的。于是我就通过将 $$$a$$$ 序列划分为相同值的连续段并累加了所有连续段的贡献。

  • 在 C 题中,我枚举了最小值点

    Unable to parse markup [type=CF_MATHJAX]

    (l,r)

    Unable to parse markup [type=CF_MATHJAX]

    取到当且仅当 $$$L_i \lt l \le i \le r \lt R_i$$$,其中 $$$L_i = \max {\max_{j \lt i \land p_j \lt p_i} j, 0}$$$ 且 $$$R_i = \min {\min_{j \gt i \land p_j \lt p_i} j, n + 1}$$$。我又发现,如果 $$$L_i = i - 1$$$,则右端点 $$$r$$$ 可取 $$$[i, R_i)$$$,而 $$$R_i = i + 1$$$ 时同理,否则任何不为 $$$[i, i]$$$ 或者 $$$(L_i, R_i)$$$ 的区间都可以通过平移得到另一个最小值相同的区间,故贡献为 2。
  • 在 D 题中,设 $$$s_i = \sum_{j = 1}^i a_j$$$,我注意到操作等价于交换 $$$s_{i-1}$$$ 和 $$$s_i$$$,于是最小交换次数即为 $$$s$$$ 的逆序对数。特别地,若存在

    Unable to parse markup [type=CF_MATHJAX]

    -1$。
  • 在 E 题中,我想到需要维护可能获胜一场比赛的选手集合 $$$S_i$$$。类似样例解释中的图,建出比赛树后,不妨设其左右儿子分别为 $$$l_i, r_i$$$。则对于 $$$S_{l_i}$$$ 的元素 $$$x$$$,最好情况是遇到了 $$$S_{r_i}$$$ 中的最大元素 $$$mx_{r_i}$$$。如果 $$$x \ge mx_{r_i} + d$$$ 则说明 $$$x$$$ 一定无法获胜,于是无法晋级。对于 $$$S_{r_i}$$$ 是同理的。最后相当于是在两个集合中都删去一些最大元素,再合并。可以使用 set 维护这个过程,合并使用启发式合并,可以证明时间复杂度是 $$$O(n \log^2 n)$$$ 的。

  • 在我正在思考 F 的时候,我的账号被封禁了。

如何说明我没有作弊

  • 我没有事先想到我会被误封,所以我没有进行比赛录屏。我保留了我赛时的草稿纸,上面记录了某些题目的初步思路,可以作为我没有作弊的证据。如果你需要,我可以提供照片。
  • 由于我来自中国,一般的 Codeforces 比赛在晚上 22:35 举行,而我的父母不允许我熬夜打比赛。所以我只打过一场比赛,rating 很低。
  • 我的 AtCoder 账号 lzm2025 达到了 rating 2023,这可以说明我的水平。
  • 我在 CCF 举行的 CSP-S 2026 中获得了 315 / 400 的成绩(见 OIerDb),这也可以说明我的水平。
  • 我的代码风格并非 AI 生成。类似很多中国的算法竞赛选手,我使用了 bits/stdc++.h 和 using namespace std,且非必要情况使用的都是静态数组。且我对本次比赛所有的代码都进行了 clang-format 格式化,风格为 Google。

为什么我的代码风格会存在差别

有些人问过我,为什么我的代码有时候使用 clang-format 且风格不一,有时候没有。这主要是因为:

  • 大部分时候我需要在学校的机房进行编程,而学校的部分机房没有安装 clang-format。没有安装 clang-format 的时候我的代码风格可以参见 CSP-S 2026 GD-S04129 的代码(代码应当已经公开)。
  • 我最近在调整 clang-format 的参数,使其更加符合我的习惯。
  • 我正在优化我的代码风格。

你可以对照我的账号的所有提交,看看是否符合上述描述。

申诉的理由

  • 我需要证明我的清白——我没有作弊。如果我作弊了,我的同学会嘲笑我。
  • 我在这个账号提交了很多题目,其中很多题目都是我们教练精挑细选出的好题。我希望保留这些题目的提交记录以便我随时回顾。

English Version

note: The translation is assisted by AI, and there may be minor inaccuracies in technical terms or expressions. You can refer to the original Chinese text for verification if needed.

Appeal for Account lzm2025

What Happened

In Codeforces Round 1137 (Div. 2), I solved problems A through E within one hour.

Specifically:

  • For Problem A, I attempted to decompose $$$x$$$ into $$$2^s t$$$ (where $$$2 \nmid t$$$) and successfully deduced that the necessary and sufficient condition for the answer to be No is $$$s = 1$$$, i.e., $$$x \equiv 2 \pmod 4$$$.

  • For Problem B, I noticed that $$$b_i$$$ can only take values from $$$a_i, a_{i + 1}, \dots, a_{n - k + i}$$$. I proved that index $$$i$$$ is valid if and only if these values are all equal. Consequently, I divided the sequence $$$a$$$ into contiguous segments of identical values and summed up the contributions of all such segments.

  • For Problem C, I enumerated the minimum point $$$i$$$. I observed that the minimum value of the interval $$$(l, r)$$$ occurs at $$$i$$$ if and only if $$$L_i \lt l \le i \le r \lt R_i$$$, where $$$L_i = \max {\max_{j \lt i \land p_j \lt p_i} j, 0}$$$ and $$$R_i = \min {\min_{j \gt i \land p_j \lt p_i} j, n + 1}$$$. I further discovered that if $$$L_i = i - 1$$$, the right endpoint $$$r$$$ can range over $$$[i, R_i)$$$, and similarly when $$$R_i = i + 1$$$. Otherwise, any interval other than $$$[i, i]$$$ or $$$(L_i, R_i)$$$ can be translated to another interval with the same minimum value, resulting in a contribution of 2.

  • For Problem D, let $$$s_i = \sum_{j = 1}^i a_j$$$. I noticed that the operation is equivalent to swapping $$$s_{i - 1}$$$ and $$$s_i$$$. Thus, the minimum number of swaps equals the number of inversions in the sequence $$$s$$$. Specifically, if there exists an $$$s_i \lt 0 = s_0$$$, the configuration is invalid, and the answer is $$$-1$$$.

  • For Problem E, I realized the need to maintain the set $$$S_i$$$ of players who could potentially win a match. Similar to the graph in the sample explanation, after constructing the tournament tree, let the left and right children be $$$l_i$$$ and $$$r_i$$$, respectively. For an element $$$x$$$ in $$$S_{l_i}$$$, the best-case scenario is encountering the maximum element $$$mx_{r_i}$$$ in $$$S_{r_i}$$$. If $$$x \ge mx_{r_i} + d$$$, then $$$x$$$ cannot win and thus cannot advance. The same logic applies to $$$S_{r_i}$$$. Ultimately, this involves removing certain maximum elements from both sets and then merging them. This process can be maintained using a set, employing heuristic merging for the union operation. It can be proven that the time complexity is $$$O(n \log^2 n)$$$.

  • While I was thinking about Problem F, my account was banned.

How to Prove I Did Not Cheat

  • I did not anticipate being falsely banned, so I did not record a screen capture of the contest. However, I have preserved my scratch paper from the contest, which records my preliminary thoughts on certain problems, serving as evidence of my independent work. If you need, I can provide the photos.
  • As I am from China, typical Codeforces rounds start at 22:35 local time. My parents do not allow me to stay up late for competitions. Therefore, I have only participated in one contest, resulting in a low rating.
  • My AtCoder account lzm2025 has reached a rating of 2023, which demonstrates my skill level.
  • I achieved a score of 315 / 400 in the CSP-S 2026 held by CCF (see OIerDb), which further validates my proficiency.
  • My coding style is not AI-generated. Like many competitive programmers in China, I use bits/stdc++.h and using namespace std, and I primarily use static arrays unless necessary. Furthermore, I formatted all my code for this contest using clang-format with the Google style guide.

Why My Code Style Varies

Some have asked why my code sometimes uses clang-format with inconsistent styles, and other times does not. This is mainly because:

  • Most of the time, I program in my school's computer lab, where clang-format is not installed on some machines. When clang-format is unavailable, my code style resembles that of my submission for CSP-S 2026 GD-S04129 (the code should be publicly available).
  • I have recently been adjusting the parameters of clang-format to better suit my personal preferences.
  • I am continuously optimizing my code style.

You can review all submissions on my account to verify if they align with the description above.

Reasons for the Appeal

  • I need to prove my innocence—I did not cheat. If I had cheated, my classmates would mock me.
  • I have submitted solutions to many problems on this account, many of which were carefully selected by my coach as high-quality problems. I wish to retain these submission records so that I can review them at any time.
  • Vote: I like it
  • +7
  • Vote: I do not like it

»
43 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by wusixuan (previous revision, new revision, compare).

»
39 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

/bx lzm, lzm is a legend

»
38 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

\lzm/\lzm/\lzm/

»
16 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Vladosiya,I would be very grateful if you could take the time out of your busy schedule to read this article. If you have any questions, please tell me.

»
10 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How on earth can this user's AtCoder rating increase so rapidly? I want to know the method.

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

    ta tql

  • »
    »
    a moment ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Reply by lzm2025:

    Before participating in abc423, I was still very inexperienced. After over two months of OI training, my skill level improved significantly, which is why I performed much better in the contest.

    To be honest, when I look back at the abc contests I did before, I can't even figure out why I couldn't solve such easy problems back then.