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

Автор dapingguo8, 8 дней назад, По-английски

Note the unusual time of the round.

Hello, Codeforces!

Tsinghua University’s Student Association of Algorithmic Competitions (THUSAAC) is pleased to invite you to participate in Codeforces Round 1092 (Unrated, Div. 1, Based on THUPC 2026 — Finals) and Codeforces Round 1092 (Unrated, Div. 2, Based on THUPC 2026 — Finals) on Apr/12/2026 08:35 (Moscow time). This round will be UNRATED for everyone. You will be given 3 hours to solve 7 problems for Division 1 and 6 problems for Division 2.

Please note that this contest contains at least one run-twice (communication) interactive problem. Please read the guides for run-twice problems before the contest if you are unfamiliar with them.

What’s more, it’s the first time that we will provide a local testing tool to help the contestants test their solutions on interactive problems. To get familiar with the testing tool, you may download the sample testing tool for an earlier interactive problem and an earlier run-twice problem. You can download them from the materials of the above problems.

Usage of the testing tools

Our team of amazing problem setters include: Warriors_Cat, E.Space, Ecrade_, SpiritualKhorosho, dapingguo8, xiaoziyao, Kratrissa, crazy_sea, zhouhuanyi, Doqe. Some of the problems prepared were not used in the final contest but we would still like to thank them nonetheless.

We would also like to express our gratitude to the following individuals:

  • KAN for helping to host the round;

  • Error_Yuan for coordination and helping with the problem preparation;

  • Alexdat2000 for translating the problems into Russian;

  • The team of problem setters for crosschecking the problems and also donghanwen, Iam1789, Zesty_Fox, sszcdjr, YuukiS, A_G, nifeshe, Caylex, a_little_cute, simplelife, Serval, wmrqwq for testing the contest and providing us very useful feedback;

  • Tsinghua University’s administration, especially our advisor Wentao Han for helping us in all means possible to ensure the smooth organisation of the whole THUPC event;

  • MikeMirzayanov for the amazing Codeforces and Polygon platform!

THUPC is an annual event hosted by Tsinghua University’s Student Association of Algorithmic Competitions (THUSAAC). It is the largest student-run competitive programming contest in China with the top 100 Competitive Programming teams from all over China coming onsite to vie for the crown of BEST CP Team in China after qualifying from a pool of 1000+ teams.

Moreover, this year is the 10-th anniversary of THUPC. Years of a decade have distilled countless brilliant and sparkling moments, and our gathering today is no less memorable. Our sincere gratitude goes to all staff and volunteers of THUSAAC. None of these glory would have been possible to be realized without your efforts!

By experiencing a series of collisions between intellect and joy, we hope you will enjoy and have fun in the contest. Good luck!

The scoring distribution:

Div. 2: $$$500 -1000-1750-2250-2750-4000$$$

Div. 1: $$$750-1250-1750-2750-3000-4000-5000$$$

UPD: Due to technical reasons, this round will be UNRATED. We are really sorry for any inconvenience caused by this :(

UPD2: Reasons of being unrated: The official contest started 3.5 hours earlier than the codeforces round. The problem statements unexpectedly leaked from the public scoreboard shortly after the official contest begins, and it spread a bit widely before the codeforces round begins, so the round can't be made rated now... We apologize for our mistakes :(

UPD3: Editorial

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

»
7 дней назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

As a coordinator, THUPC is a good contest!

»
7 дней назад, скрыть # |
 
Проголосовать: нравится +74 Проголосовать: не нравится

Although I broke my arm before the first round of thupc thus losing the chance to participate the final contest onsite, I'll still participate it on codeforces. Good luck everyone.

»
7 дней назад, скрыть # |
 
Проголосовать: нравится -92 Проголосовать: не нравится

qp

»
7 дней назад, скрыть # |
 
Проголосовать: нравится -16 Проголосовать: не нравится

orz

»
7 дней назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

Finally a communication problem for a Codeforces contest. And wait, is it a communication AND interactive problem?

»
7 дней назад, скрыть # |
 
Проголосовать: нравится -38 Проголосовать: не нравится

hope this will be easy for me

»
7 дней назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

I hope it goes well!

»
7 дней назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Hope theres no guessing problems

»
7 дней назад, скрыть # |
 
Проголосовать: нравится +24 Проголосовать: не нравится

Though there're many tough days,I believe I can make it(to get higher rating and reach master!).

PS: I wish one day I can contribute my problem for the following THUPCs in the future!

»
7 дней назад, скрыть # |
 
Проголосовать: нравится -17 Проголосовать: не нравится

Why does it have to be on Easter?

»
7 дней назад, скрыть # |
 
Проголосовать: нравится +26 Проголосовать: не нравится

Hope not to solve 0 problems again.
I just want to have my usual behavior.

»
7 дней назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Contest at lunch for me :D

»
7 дней назад, скрыть # |
 
Проголосовать: нравится -28 Проголосовать: не нравится

looking forward to contest, hopefully i can get till E without being goombah stomped though given my skills i doubt it

»
7 дней назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

As a participant, I can feel that the contest is gonna be interesting.

»
6 дней назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

I am familiar with interactive problems. But not with run-twice problems.:(

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

Lets see how it goes ! GL!

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

I hope that this contest is my Comeback contest.**I believe myself**.

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

I hope it'll go well.

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

All the best.

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

THUPC competitions are always of exceptionally high quality, featuring problems that require deep thinking and successfully blend tradition with innovation. I look forward to this year’s event maintaining its consistently excellent standards!

I believe a well-designed problem set not only fosters greater growth among participants but also provides a more accurate reflection of their true skill levels. Lately, we’ve often seen contestants achieving high scores through the use of AI, and the reason is often that the problems lack depth, relying solely on excessive code volume to create difficulty. I believe a well-crafted problem set can also provide greater fairness for those of us who compete honestly!

On a side note: My teacher once said he would treat anyone at our school with a Codeforces rating over 2100 to a meal. I can’t wait to earn that treat! I hope THUPC will be the stage for this milestone achievement of mine!

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

The code provided for the local testing tool in the Link is a single line of text which Python isn't able to interpret. I got it reformatted from ChatGPT but that doesn't feel like the intended way.

  • »
    »
    6 дней назад, скрыть # ^ |
     
    Проголосовать: нравится +3 Проголосовать: не нравится

    The download link seems to be broken. Here are the source codes:

    guessthenumber_testing_tool.py
»
6 дней назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

For me,it's a friendly time!I don't need to stay up late!Brilliant!

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

6:35am guess im cooked :sob:

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

Good timing!

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

Finally I can participate a round in the afternoon! also I wish I could win Gaokao and enter THU... but I lost badly...

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

Hope everyone enjoy the contest!

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

morning round, finally

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

4 hours left. Where’s the score distribution?

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

This is the first competition I have participated in

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

My first contest since feburary!

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +33 Проголосовать: не нравится

I've been waiting for days to this contest and now is unrated

»
5 дней назад, скрыть # |
Rev. 2  
Проголосовать: нравится +64 Проголосовать: не нравится

This reminds me of last year's Zhili Cup. It looks like some kind of curse; any THU contest on Codeforces is very likely to be unrated because of some unexpected events. This is truly unfortunate.

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +42 Проголосовать: не нравится

Ffs why is this unrated now, I woke up early for ts and now it’s unrated

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +51 Проголосовать: не нравится

As a PKUer, I want to condemn THUSAAC for causing me to lose the opportunity to become candidate master.

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

RagebaitForces

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Morning warmup round I guess

»
5 дней назад, скрыть # |
 
Проголосовать: нравится -16 Проголосовать: не нравится

CHINESE PROBLEM SETTER :O MUST BE HARD THAN AS USUAL DIV2

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

even if it’s unrated, I’m still willing to participate

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Let's put the link of leaked problems here and look forward to a nice result of the unrated round.

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +29 Проголосовать: не нравится

The only competition that fits my schedule has also been unrated…

»
5 дней назад, скрыть # |
 
Проголосовать: нравится -7 Проголосовать: не нравится

I would've had to skip lunch to give this contest.

Sadge, it became unrated. But hey I'm gonna go have some food now!

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Woke up early today for this contest, now I can go sleep again!

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

pechalka ||-||

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

It was my 1st Div.1 contest and sad to see that it's unrated :(

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

why it is unrated?

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

What means "technical reasons"?

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +28 Проголосовать: не нравится

Back to sleep.

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

Waking up early for a rated round only to see it become unrated is a bit disappointing, but ensuring fair competition is always the right call. Thanks to the technical team for their hard work.

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

they should've careful about sharing questions. i didn't wake up for unrated contest. but thanks anyway for your hardwork.

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

where it got leaked?

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

Where is the "fun" you've given me?

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Nice pun in the name of div1E.

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

Why are you cheating on an unrated round???

»
5 дней назад, скрыть # |
 
Проголосовать: нравится -8 Проголосовать: не нравится

Div1 D and E should be swapped.

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Did a 3-hour contest only to find out it was unrated. Should’ve just slept.

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

Do not use vector on Div.1 B or you will get TLE :(((

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

How to solve Div1E?

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

Testcases in problem B are weak

370786015 fails on this test:

1

999999572915

Answer should be 9, my solution gives 8.

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

How to solve D2E / D1C... is it something related to topological order or something constructive.

  • »
    »
    5 дней назад, скрыть # ^ |
     
    Проголосовать: нравится +7 Проголосовать: не нравится

    Assume vertices are 0-indexed. The goal is to assign 0/1 color to each vertex, such that the sum of color[i] * 2^i = s. For every vertex, you know its desired final color. When you get an edge u, v you direct it from min(u, v) to max(u, v) if color[u] = color[v], and from max(u, v) to min(u, v) otherwise. Since color[n — 1] = 0, you can reconstruct the color array

  • »
    »
    5 дней назад, скрыть # ^ |
     
    Проголосовать: нравится +10 Проголосовать: не нравится

    We noted that the range of the num is 1~2^n ,the first step is to take the number down by 1. It is to ensure that the nth bit is always 0

    Now we can rebuild the tree in this way. If we have 1 edge and two endpoints called u v ,if the uth bit and vth bit of s are the same,we make the direction of edge from max(u,v) to min(u,v) .if not we make the direction reverse. (You can check it by check the xor value of them).

    Once we rebuild the tree in this way ,we can restore the orignial number by the basic dfs ,start with point n,checking the edge direction,and we can restore each bit value of the number.

    In this way we get the orignal number,don't forget add 1 to it before you output.

    I hope this text can inspire you! Hope you enjoy your day.

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

This contest is really interesting.

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

Who also felt that div2B is quite annoying, it took me more than 2 hours to solve it :(

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

This contest was so good, except that it was unrated :(

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

Thank you for the problems, especially the communication problem (Div1C) =)

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

Div1 D is so weird, I guessed that the distance should always $$$\le 12$$$ and directly passed?

How can we explain that?

»
5 дней назад, скрыть # |
Rev. 2  
Проголосовать: нравится +6 Проголосовать: не нравится

I created video editorial for C. Interval Mod and video editorial for D. RReeppeettiittiioonn

»
5 дней назад, скрыть # |
Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

Can someone please tell me why is my solution wrong for B 370775032. My logic was, since using T and U together saves us most space, we always pair them first and then if no T is left, the answer is 3*(H + U). If T is left, then we have a choice, EITHER we pair T and H (taking 5 space) and then take care of remaining T or H (for H it will be 3 per item and for T we can pair it with itself and add 3 if its odd) OR we first pair T together with itself and add 5 for last one (if odd) with H, and then add 3 per H left, we take the minimum of these two values.

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +41 Проголосовать: не нравится

Too sad that this round became unrated...

»
5 дней назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Interesting problems, sad that is was unrated. (Or good because I suck.) Waiting for editorial...

»
5 дней назад, скрыть # |
Rev. 2  
Проголосовать: нравится +5 Проголосовать: не нравится

Please Explain how in Div2C testcase 5 is having answer 4 ??

I can't figure it out ???

Please Help

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

Anyone can tell the ratings of problems a,b,c , were quite easy however i found d difficult even thou it got solved by quite many?

  • »
    »
    5 дней назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Same

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

    Personally I think problem D is easier than problem C; it only took me about half the time of problem C.

    Spoiler: Perhaps noticed this helps me solved D quickly.
    • »
      »
      »
      4 дня назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      ooops! I didn't notice this and solved the problem in $$$O(d(n)+n^{1/3})$$$, where d(n) means the number of factors of $$$n$$$,$$$\le 7000$$$ when $$$n\le 10^{12}$$$.
      This algorithm can actually solve the problem without the condition $$$\sum n\le 10^{12}$$$.

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

Will the problems appear in the problemset/be given ratings?

»
4 дня назад, скрыть # |
 
Проголосовать: нравится +19 Проголосовать: не нравится

Editorial pleaseee

»
4 дня назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

Where's the editorial?