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

Автор sunbrey, 5 дней назад, перевод, По-русски

Привет, Codeforces :3

Очень жду вас на Codeforces Round 1138 (Div. 3), который начнётся в 27.11.2026 17:35 (Московское время).

Раунд продлится 2 часа и 15 минут, и вам предстоит решить 7-8 задач, а штраф за неверную попытку в этом раунде будет равняться 10 минутам. Раунд будет рейтинговым для участников с рейтингом ниже 1600.

Напоминаем, что в таблицу официальных результатов попадут только достоверные участники третьего дивизиона. Как написано по ссылке — это вынужденная мера для борьбы с неспортивным поведением. Для квалификации в качестве достоверного участника третьего дивизиона надо:

  • принять участие не менее чем в пяти рейтинговых раундах (и решить в каждом из них хотя бы одну задачу)
  • не иметь в рейтинге точку 1900 или выше.

Независимо от того являетесь вы достоверными участниками третьего дивизиона или нет, если ваш рейтинг менее 1600, то раунд для вас будет рейтинговым.

В подготовку этого раунда я вложил много сил, и я надеюсь, что вам будет так же интересно вчитываться в условия задач, как мне было интересно всё это придумывать. Каждая следующая задача продолжает сюжет предыдущей. Надеюсь, вы доберётесь до последней задачи и прочитаете историю до конца.

Хочу поблагодарить Vladosiya за полезные замечания и помощь в подготовке задач. Отдельное спасибо:

  1. MikeMirzayanov за платформы Polygon и Codeforces.

  2. Friendiks, KotlechkovEgor, semwin2008 за помощь в улучшении задач.

  3. MikeMirzayanov, zhichenlin, Timosh, wery0, JedbyKey999, itz_pabloo, vanta5n, grigalex40, xinerx за разноцветное и замечательное тестирование.

Раунд пройдёт по правилам образовательных раундов (расширенные правила ICPC),. Во время раунда решения будут проверяться на предварительных тестах, а после его окончания начнётся 12-часовая фаза открытых взломов. После неё все принятые решения будут перепроверены на тестах успешных взломов.

Удачи и приятного участия!

UPD: Разбор выложен.

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

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

6 testers working overtime so I can get WA on test 2 in problem A. Respect!

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

wow we had MikeMirzayanov as an author and now as a tester!

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

Waiting for Mike to comment "As a tester..."

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

Love when problems share a connected storyline! Looking forward to the round, thanks for preparing it :3

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

Sir Mike as a tester hits crazy, now Sir Mike only wasn't translator if I'm right?

how you think guys?

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

cute plushies

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

i hope i cross 1300 in this contest

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

Black testing orz

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

is that omori & aubrey on the picture? how cute

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

Omori round <3

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

Good luke,guys!/Удачи, друзья!

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

Who're the two cute characters in this picture?

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

Hello!

This is gonna be my first round actually, and I am pretty excited!

I wonder what rank would I get... :)

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

no game theory problem please

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

Hi lol

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

i came, i saw, i solved, i solved, i kept solving, i got -ve, i slept.

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

I shed a tear...

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

Isn't that Omori and Aubrey ? Kinda cute to see em here

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

.

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

So excited to read the story!

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

Thanks for the contest!!

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

good luck everyone

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

Drop a like for a cookie, please

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

omori round we sleeping good tonight

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

Its my first, it starts in 10 mins. I am scared!

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

My account ilia_rr just got disabled mid contest. Is there an official procedure for appealing the suspension or contacting the administration to have my account reviewed?

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

Is this a real div3 contest?

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

holy difficulty

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

Nice contest, here are solution sketches for A-G:

A. Simulation, $$$O(l+a+b)$$$

B. Sort the array, and for every block of $$$k$$$ consecutive elements either eat them individually or make juice, whichever is optimal, $$$O(n \log n)$$$ due to sorting

C. The answer is YES if and only if $$$n$$$ is even and the string is not alternating, $$$O(n)$$$

D. Right to left DP, store the best possible score for each player (max for Sunny, min for Aubrey) if they are currently on the left, transitions are $$$dps_n = \max(x_n-y_n, 0)$$$, $$$dpa_n = \max(y_n - x_n, 0)$$$, $$$dps_i = \max(x_i - y_i + dps_{i+1}, dpa_{i+1})$$$, $$$dpa_i = \max(y_i - x_i + dpa_{i+1}, dps_{i+1})$$$, answer is based on $$$dps_1$$$, $$$O(n)$$$

E. Binary search on the answer, for $$$m$$$ steps the smallest possible position of Aubrey where $$$y = \lfloor m/(k+1) \rfloor$$$ and $$$z = m - y(k+1)$$$ is $$$(2^y-1)(k+1-z) + (2^{y+1}-1)(z)$$$, $$$O(\log^2 k)$$$

F. Create an auxilliary directed graph of $$$2n$$$ nodes where $$$n$$$ are a "black mode" and $$$n$$$ are a "pink mode" which represent the next edge color you must traverse to keep the path alternating, and check if there is a cycle in it, $$$O(n+m)$$$

G. Sort the array, the optimal set of pictures to choose for a tournament is the first $$$n/2$$$ and last $$$n/2$$$, the optimal order eliminates the largest elements last, brute force on every tournament size, $$$O(m \log m)$$$

Trivial bonus for G: Solve it with update queries

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

    Could you explain the math in $$$E$$$ in more detail? How did you derive the solution from the start?

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

    bruh i was hesitant to dp for D cuz div3 D. Thank you for the sols <3

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

    How do you arrive at that conclusion for problem C? How can we find that invariant?

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

      The even length is pretty simple as you delete 2 bits every time

      For the alternating string condition we can see that the operation keeps the string alternating and neither 01 or 10 work

      You can keep any other string non-alternating and therefore it will eventually end up as 00 or 11

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

        that was your thought during the contest ? you had to guess that

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

          I noticed that alternating strings didn't seem to work and I tried them and saw that it was because they stayed alternating, then tried a few other cases knowing this condition to see if everything else worked. And the even one isn't very hard. It was definetly quite guessy though.

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

          Try to perform it on an alternating string, the operation does not change it, rest all strings can be emptied. Try it on a no. of different string combinations, you'll see that. So, I don't think it was guessing, just observation.

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

          If the initial string isn't alternating, then it's always possible to keep the string non-alternating after an operation, provided that $$$n$$$ is even.

          For simplicity, let's say the string has the longest contiguous span of 0s. Let $$$l$$$ be the length of the span ($$$l \ge 2$$$).

          • If $$$l \ge 4$$$, you can simply remove one 00.
          • If $$$l=3$$$, the string should contain 1000 or 0001 (because $$$n$$$ is even). Here you can apply the operation on 000 and you'll have 11 as the result.
          • If $$$l=2$$$, there are three possible cases.
            • If the entire string is 00, just remove them, and you are done.
            • If the string contains 0010 or 0100, then apply the operation on 010 and you have 00.
            • Otherwise, the string should contain 0011, 1001 or 1100. Just remove 00 and move on.
        • »
          »
          »
          »
          »
          2 дня назад, скрыть # ^ |
           
          Проголосовать: нравится 0 Проголосовать: не нравится

          I did write all 16 strings with lenght equal to 4 and then guessed it. Then I just needed a prove (or just some half prove) which wasn't that hard to find.

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

    Could you explain bonus G in depth

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

Guessforces

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

C was a nightmare to guess

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

    I think I arrived at a complete proof.

    Odd lengthed or alternating strings are bad, so we talk about even lengthed and non alternating ones.

    Suppose we pick the pair (i, j) and call P = s[0 ... i — 1], X = s[i + 1 ... j — 1] and S = s[j + 1 ... n — 1]

    Claim: We can force PXS to be non alternating (empty strings are assumed to be alternating)

    Assume, that s[i] = s[j] = '0'

    The only way PXS can be alternating iff P, X and S are alternating and X connects to P and S with the same bit before flipping.

    First, assume that at least one of P and S is non empty. Assume that it is P and S is empty for convenience.

    The only problematic triplets are 101 and 000. However, 101 is not possible under our assumption because s itself would be alternating in this case.

    In 000, simply pick any but the middle 0 and the resulting string contains at least one equal and adjacent pair.

    If both P and S are empty and n >= 4, we can select a suitable same bit from X to reduce it to the previous cases.

    If X is empty, then there must exist only one pair of 0s and that too adjacent ie only one occurrence of "00". Even in this case, we can reduce the string to an empty one.

    So, I think the conditions are sufficient. I would be happy to have someone hack this.

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

OH GOD THIS ROUND TOUCHED ME INAPPROPRIATELY

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

What are these names man

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

Great contest, unfortunately I ran out of time before I could finish implementing F. Finally Specialist :D

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

I don't know how to use dp to solve D...

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

Does no greedy approach work for Problem D?

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

Really enjoyed the questions in this round, sadly didn't do as well as I was hoping to but really liked the story part of these questions ❤️.

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

4k people solve d! i think my rating is going to drop a lot

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

Solved E but not D ToT

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

    how bro , D was easier then C and i couldn't solve E

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

      Not good at DP :( For E, the answer is monotonous and an upper limit is given, so use binary search. For each round you're checking, apply the compliments evenly so that Aubrey climbs the slowliest because she climbs faster and faster without the compliments. https://codeforces.me/contest/2292/submission/400052197

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

        1) I got the point the runs of Aubrey should be almost equal length

        2) Let's say we fix the no.of rounds R, then q = R/k+1 and rem = R%(k+1), then (k+1-rem) runs are of length q and rem rounds are of size q+1

        3) In this approach we can only check whether Aubrey crosses sunny after the last run, how to prove that it does not cross at any run in the middle

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

          These contents are translated by GPT.

          We need to prove that checking only the final positions is sufficient, even though Sunny must stay strictly ahead after every round.

          Let $$$q=\lfloor m/(k+1)\rfloor$$$ and $$$r=m\bmod(k+1)$$$. The optimal strategy divides the $$$m$$$ rounds into $$$k+1$$$ blocks: $$$r$$$ blocks of length $$$q+1$$$, and the remaining blocks of length $$$q$$$. A block of length $$$d$$$ makes Aubrey climb $$$2^d-1$$$ steps.

          Define the net contribution of a block as

          $$$ F(d)=xd-(2^d-1). $$$

          We can arrange the blocks in non-increasing order of $$$F(d)$$$. Then, the differences between Sunny's and Aubrey's positions at consecutive block boundaries have non-increasing first differences. Thus, these differences form a discrete concave sequence.

          The same argument applies inside each block: after $$$s$$$ rounds, the position difference changes by $$$x-2^{s-1}$$$, which is also non-increasing. Hence, the position difference is discretely concave within every block as well.

          A discrete concave sequence attains its minimum at one of its endpoints. Therefore, if the initial and final position differences are both positive, the difference must remain positive at every intermediate round.

          Consequently, the condition

          $$$ \boxed{a+mx \gt H_m} $$$

          is not only necessary but also sufficient for surviving $$$m$$$ rounds. This justifies the binary search.

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

Personally, I really liked the stories involving questions that were interconnected!

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

E looks like >:D

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

E seemed to be some reverse engineered maths formula

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

Hello sunbrey Vladosiya MikeMirzayanov

My account lydxn got disabled during the contest. I'd be grateful if an admin could check my account and a reason for the ban. As far as I'm aware I haven't broken any rules with regards to cheating or AI.

Thanks

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

peakmori round :O managed to solve A-G but not F it was lwk hard >w<

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

such a boring two weeks with no normal contests :(

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

how to access editorial or blog regarding this contest??

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

D cooked mee

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

ughh 8 mins short for H

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

way to bring back omori trauma :')

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

Hey Guys, sunbrey, MikeMirzayanov

thehvd3.redemption(click here) this is my account, while I was giving contest today, it was suddenly disabled. I request the moderators to please enable my account, as I was not doing any kind of cheating nor was I using AI. Also, what was the reasoning for disabling my account? Was it just the fact that a newbie account solved 4 que in 30 min?

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

why are so many succesful hacks getting TLE verdict on problem D?

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

I have a question, how to have a CP online community where everyone discuss about CP and improve together

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

Hello, I submitted a solution for problem D during Codeforces Round 1138, but it does not appear in my submissions or the standings. My handle is bhaumik2427, and I submitted at approximately 10:20 pm in India using C++. Could you please check whether the submission was received?

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

I really like problem H although I can not solve it in Contest ^^, but now I can solve it. The idea burned my head ^^

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

I participated in the live contest, but my profile still shows no rating change.That's why??

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

New color :yayy:

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

wow, i dont expect, what this tasks will be about Omori game :)

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

can someone explain H?

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

    Consider the information of each node independently, let it be $$$u$$$ and suppose it is the root. Call an $$$i$$$ good if it's the first time $$$e_i$$$ transfers information from the parent to the child, the amount of people knowing the info of "$$$u$$$" is the amount of good $$$i$$$.

    Note that this sum only changes if we remove one of the good $$$i$$$, and the next time the same edge $$$e_i$$$ appears again let it be $$$j$$$.

    So the difference after removing $$$i$$$ is just the amount of good $$$k$$$ in the subtree of $$$e_i$$$ originally minus those $$$k$$$ coming from the new $$$j$$$.this gives the idea of dp, let $$$dp_i =$$$ the amount of good $$$k$$$ in the subtree of the edge of $$$i$$$ if $$$i$$$ were to be a good index.

    we can compute it from right to left and $$$dp_i =$$$ sum of the dp for each node that is direct child of the "child" of $$$e_i$$$.the the answer is $$$dp_i - dp_{i'}$$$ for each good $$$i$$$. Where $$$i'$$$ is the next appearence of $$$e_i$$$this runs in $$$O(NM)$$$

    the idea to optimize is noting that each edge has two different orientations. for example imagine an edge like this :

    U
    |
    V
    

    when we take anyone above $$$u$$$ or $$$u$$$ as root the subtree of $$$v$$$ is always the same so we can build another dp considering these orientation where $$$dp_{i, \text{flag}} =$$$ is basically the same thing of the aforementioned dp but $$$\text{flag}$$$ is $$$0$$$ or $$$1$$$ defining whose from $$$u$$$ and $$$v$$$ is the "parent"

    so now we could theoretically go for each $$$i$$$ and calculating how many nodes $$$x$$$ above $$$u$$$ have $$$i$$$ as a good edge.

    to discover this we can just consider the same dp but in reverse since note that a information going from $$$u$$$ to some $$$z$$$ is the same as rooting in $$$z$$$ and it goind to $$$u$$$ in reverse.

    So it is just how many nodes $$$z$$$ before $$$i$$$ have edge $$$i$$$ as good minus how many $$$z$$$ before $$$i"$$$ have edge $$$i$$$ as being good (where $$$i"$$$ is the previous appearence of $$$e_i$$$).

    using some precalculations for nodes we can bring the complexity to $$$O(M + N)$$$

    Code

    I hope it is clear, feel free to ask questions.

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

Hello, sunbrey and MikeMirzayanov.

I created this account solely to post an appeal on behalf of my original account, maltta900, which was disabled during this round. After reading the comments, I noticed that several other participants experienced the same issue. I would greatly appreciate it if you could manually review my case and clarify the reason why my account was disabled. And I emphasize that I've strictly followed the rules for the contest. I am willing to cooperate with the review process, provide any relevant information, and explain my submissions. I respect the Codeforces community and its rules, and I sincerely hope my case can be reconsidered. Thank you for your time and consideration.

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

Can anyone pleasee explain how to solve problem H

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

I made a short comment on this yesterday, but I decided to ramble a bit more here. I'm assuming from previous comments that I should ping these people to get their attention. Feel free to let me know if I'm wrong: MikeMirzayanov sunbrey Vladosiya

I decided to join these contests a couple weeks ago, and this is my second one. I really enjoyed trying to do these problems quickly, but my account Catman6094 was "disabled by administrators" mid-contest. I got no message of any kind explaining what triggered this, and I did not cheat in any way that I know of (I didn't collaborate, plagiarize, or use AI tools in any way). Cheating is completely pointless and takes away from the joy of actually solving a problem for yourself. Cheaters clearly don't understand this joy of problem solving. Anyways I've created this new account to try and get the disabled one reenabled.

For reference, here are my solve times, which you can check on my disabled profile:

  • Problem A: 5 minutes after the beginning of the contest
  • Problem B: 11 minutes after problem A (after a wrong answer because I forgot to use 64-bit integers lol)
  • Problem C: 8 minutes after problem B
  • Problem D 12 minutes after problem C

I was solving E when the account was disabled.

Do these solve times seem fast for a new user? I don't know for sure because I'm new to the community, but if so, it should be noted that I have prior experience from the Project Euler community. I got hooked on Project Euler a few years ago, and I've solved 360 problems there over the course of a few years. This experience is how I've been improving my coding skills, and it carried over to Codeforces. I don't like defending myself like this because it feels too much like bragging, but I don't know what else to say.

So I am requesting that either my account Catman6094 is reenabled or at least please give me a legit reason for the ban. It is very frustrating to be banned without being given any explanation, because I don't know how I'm supposed to defend myself. I understand the paranoia around cheaters these days, what with AI growing in power, but I hope somebody considers looking into this.

Regardless, I have really enjoyed solving problems here for the past few weeks! In this contest, I found the pattern in problem C very satisfying to spot. I love inductive patterns like this one :) I also really enjoyed problem E, but sadly didn't get to submit it during the contest. I will keep solving problems here, but I guess I'll just avoid the contests if this isn't resolved.

Thank you and have a good day!

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

MikeMirzayanov sunbrey

Hello Mike, sorry to bother you here. My old Codeforces account kishan108 was suddenly disabled without any warning or explanation. I cannot log in, and my profile shows "The user is disabled."

I have already contacted the administration and sent you messages, but it has been over 7 weeks without a response.

Could you please review my account and explain the reason for the restriction? If it was a mistake, I kindly request your help in restoring it.

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

The Editorial is taking FOREVER to come out. Can someone PLEASE explain how to solve E? I have some intuition from reading other's submissions but I am not able to prove it.

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

    Here was my intuition

    Each compliment resets Aubrey's speed to 1, splitting the game into k+1 blocks where she moves 2^L — 1. Since 2^L — 1 is convex, the block lengths differ by at most 1. By putting shorter blocks first, the minimum is at the end. Sunny only loses the lead once it's length passes floor[log_2 x]+1, so start there and grow blocks layer by layer.

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

    Here is how you can solve E problem.

    First observation: Distance travelled by Aubrey is of the form $$$2^0 + 2^1 + 2^2 + ...$$$ until she gets flustered (distracted) by Sunny's compliment and starts again like $$$2^0 + 2^1 + 2^2 + ...$$$ adding up to the previous distances traversed by her. Hence we can say that Aubrey's total distance is of the form $$$\left(\underbrace{11111\ldots}_{\text{few times}}\right)_2+\left(\underbrace{11111\ldots}_{\text{few more times}}\right)_2+\left(\underbrace{11111\ldots}_{\text{few more times}}\right)_2+...$$$ and so on. Also the total number of $$$1$$$'s in this expression is the number of rounds for which they have played. Also the number of terms of the form $$$\left(\underbrace{11111\ldots}_{\text{few times}}\right)_2$$$ is equal to $$$k$$$ because $$$k$$$ is the number of times Sunny can compliment Aubrey to distract her.

    Second Observation: Now let's fix the number of rounds we are going to have. Let's have $$$mid$$$ number of rounds (Binary search is coming). This simply means that we have $$$mid$$$ number of $$$1$$$'s to use in the expression for Aubrey's distance. And talking about Sunny, he would have travelled a distance equal to $$$mid \times x$$$. Our goal is to minimize the distance distance covered by Aubrey after $$$mid$$$ rounds (because we don't want her to takeover Sunny). It turns out that if we divide the $$$mid$$$ number of $$$1$$$'s we had into $$$k$$$ groups such that each group has almost equal number of $$$1$$$'s, minimum value of Aubrey's distance is achieved in the expression of the first observation. All we need to do is to make sure that this minimum value is less than Sunny's final position, i.e., $$$a+mid \times x$$$.

    (I have not discussed how to divide evenly the $$$mid$$$ number of $$$1$$$'s into $$$k$$$ groups to achieve minimum distance because I want you to think and spend time on this).

    Third Observation: This is a simple one. If Aubrey can takeover Sunny after $$$mid$$$ rounds, she can do that after $$$mid+1$$$ rounds also. This means that we can binary search on the number $$$mid$$$.

    This is my code for your reference:

    #include<bits/stdc++.h>
    using namespace std; 
    #define int long long 
    #define endl '\n'
    void solve(int test) {
        int A, X, K; cin >> A >> X >> K; 
        K++;
        int ans = 0; 
        int l = 0, r = 30*(K); 
        while (l <= r) {
            int m = (l + r) >> 1; 
            int q = m/K; 
            int rem = m%K; 
            if (q >= 63) {r =m-1; continue;} 
            int val1 = rem * ((1LL << (q+1))-1) + (K-rem)*((1LL << q)-1); 
            int val2 = A + m*X; 
            if (val2 > val1) {ans = m; l = m + 1;}
            else {r = m-1;}
        }
        cout << A + ans*X << endl;
    }
    int32_t main () {
    ios::sync_with_stdio(false); 
        cin.tie(nullptr);
        auto start = chrono::high_resolution_clock::now(); 
        int T = 1; 
        cin >> T; 
        for (int i=1; i<=T; ++i) {
            solve (i); 
        }
        auto end = chrono::high_resolution_clock::now();
        auto duration = chrono::duration_cast<chrono::microseconds>(end-start);
    
        cerr << "Execution time: " << duration.count()/1000.0 << " ms\n";
        return 0; 
    }
    
»
25 часов назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

It was like i didnt even solved a single problem then after the contest i thought the first question is maybe gcd and its was actually gcd ... ...

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

I've been stuck at C for a long time(about an hour). Finally i found it that it is easy. A good thinking problem though. But beyond my expectation is that D is a dp! i'v been thinking how solve it with greedy :(

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

When is the editorial arriving?

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

Where is the editorial

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

it should have been me! not sunny

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

Dear Codeforces Support Team,

I am writing to sincerely appeal for the unblocking of my account, GoldenFishKnight. I was deeply saddened to find that my account has been disabled. I firmly believe this is a false positive, and I would like to explain the circumstances that might have triggered your security system.

After browsing similar cases in the community, I suspect my account was flagged due to the following reasons:

  1. Unintentional VPN Usage (IP Change): I am currently located in Mainland China. During my participation in the recent contest, I forgot to turn off my VPN (proxy). As a result, my login IP appeared to be from Hong Kong. I completely understand that Codeforces has strict rules against IP fluctuations to prevent cheating, but this was purely an unintentional mistake on my part.

  2. Sudden High Performance and Account History: I understand that my sudden high rank in this contest might look suspicious. To be completely transparent: I actually had an old Codeforces account a couple of years ago, but because I stopped participating for the last two years, I completely forgot its password and cannot recover it. Therefore, I created this new account.

However, I am NOT engaging in multi-accounting or cheating. This is the only account I am currently using. The reason I achieved a high score is that although I stopped playing on Codeforces, I have been training rigorously on other platforms over the past two years. I have attached screenshots of my LeetCode (China site) weekly contest stats as proof.    As you can see, I ranked 56th in Contest 421 and 84th in a recent contest. This proves that my recent high performance on Codeforces is the result of my genuine, long-term hard work and consistent practice, not any form of cheating or unauthorized assistance.

I deeply respect the Codeforces community and the rules of fair competition. I apologize if my negligence regarding the VPN caused any trouble for the administration, and I promise to be extremely careful and ensure my network is clean for all future contests.

I kindly request a manual review of my account and my submission history.

Thank you for your time and understanding. I look forward to your reply.

Best regards, GoldenFishKnight

MikeMirzayanov