Скоро Codeforces Round 1133 (Div. 1, Div. 2)! Регистрация здесь. ×

Блог пользователя __baozii__

Автор __baozii__, история, 10 месяцев назад, По-английски

Hello, Codeforces!

We are happy to invite you Baozii Cup 3, which will take place on Jan/25/2026 08:00 (Moscow time).

You will have $$$5$$$ hours to solve $$$13$$$ problems, including at least one interactive problem.

This is a team contest following ACM/ICPC rules, with teams of up to $$$3$$$ members. The penalty for an incorrect submission is $$$20$$$ minutes.

The standings will be frozen for the last $$$60$$$ minutes of the contest.

Most problems are created and prepared by me, with help from Bronya_H, zeemanz, and 0.1w33hw3.

We would like to thank:

Registration

If you are living in China or have a WeChat/QQ account, you may register by filling in this form. Otherwise, you may register by filling in this form. Please do not fill in both forms.

Notes

  • You may attempt past contests at Baozii Cup 1 and Baozii Cup 2.

  • If you have any queries regarding the contest, please send a private message on either Codeforces or WeChat.

Good luck and have fun!

UPD 1: Everyone who has registered should have received an invitation link in their private messages. Please message me if you are not invited.

UPD2: Here is the contest link: Baozii Cup 3. If you didn’t register for the contest, you may also view the scoreboard via the link above.

UPD3: Note that rules about third party code for Codeforces still apply in this contest. If you are found out using LLM-generated code, you will be sent to cry's basement. For any queries regarding problem statements, please ask in the clarifications section.

UPD4: The contest has ended. The problems have been uploaded to gym. Please leave any feedback in the comments section!

  • Проголосовать: нравится
  • +113
  • Проголосовать: не нравится

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
10 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +18 Проголосовать: не нравится

Will __baozii__ crossdress?

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hope to solve at least one problem:)

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I love the biggest ^(* ̄(oo) ̄)^ :)

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

As Baozii Cup's coordinator, I prepared the contest invitation letter. I intended to make serious things interesting in order to attract more people to participate, so I imitated the format of the invitation letter for ICPC EC final, and added various memes that CP contestants could understand. Hope you like it, and hope everyone would learn something more or less in Baozii Cup!

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

As a tester, I love the biggest ^(* ̄(oo) ̄)^

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

your god is coming!

»
10 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

As a participant, I can confirm Tobo is indeed the biggest ^(* ̄(oo) ̄)^ in history.

»
9 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
9 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
9 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
9 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
9 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hi can i join this?

»
9 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Is using multiple computers per team allowed?

»
9 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I just filled the registration form. I still couldn't access the contest. How do I join the contest now?

»
9 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
9 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

could someone explain how to do A

  • »
    »
    9 месяцев назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится +3 Проголосовать: не нравится

    For each node $$$u$$$, compute the deepest node outside its subtree, then efficiently sum how the tree depth changes when reattaching $$$u$$$ under all valid $$$v$$$, which are exactly the nodes outside the subtree of $$$u$$$, which is at most two ranges in Euler order, so problem ends up reducing to simply summing $$$\sum_{} \max({m_{u}, d[v] + k)}$$$ where $$$k$$$ = $$$h[u]$$$ $$$-$$$ $$$d[u]$$$ + 1.

    Submission for A (AC): Submission