Автор awoo, история, 4 года назад, По-русски

Привет, Codeforces!

В 08.09.2022 17:35 (Московское время) состоится Educational Codeforces Round 135 (Rated for Div. 2).

Продолжается серия образовательных раундов в рамках инициативы Harbour.Space University! Подробности о сотрудничестве Harbour.Space University и Codeforces можно прочитать в посте.

Этот раунд будет рейтинговым для участников с рейтингом менее 2100. Соревнование будет проводиться по немного расширенным правилам ICPC. Штраф за каждую неверную посылку до посылки, являющейся полным решением, равен 10 минутам. После окончания раунда будет период времени длительностью в 12 часов, в течение которого вы можете попробовать взломать абсолютно любое решение (в том числе свое). Причем исходный код будет предоставлен не только для чтения, но и для копирования.

Вам будет предложено 6 или 7 задач на 2 часа. Мы надеемся, что вам они покажутся интересными.

Задачи вместе со мной придумывали и готовили Адилбек adedalic Далабаев, Владимир vovuh Петров, Иван BledDest Андросов и Максим Neon Мещеряков. Также большое спасибо Михаилу MikeMirzayanov Мирзаянову за системы Polygon и Codeforces.

Удачи в раунде! Успешных решений!

UPD: Разбор опубликован

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

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

plz be good round plz be good round plz be good round

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

Hoping for Creative Round

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

Hoping for Creative round

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

Educational Rounds always have original problems.

I Love Educational Rounds

Update: Although EDUs have repeated problems, still I Love Educational Rounds

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

Finally a Rated,Original round. Hoping for a fair and creative round.

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

+1

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

Are they all original? I don't want to waste two hours and then unrated:(

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

Great way to start long weekend. Happy moon festival to all!

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

I hope this won't be a waste of time.

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

⣿⣿⣿⣿⣿⣿⣿⢿⠟⠛⠿⠻⠿⠿⠟⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⡿⠛⢙⣨⣥⣶⣶⣿⢿⣿⣿⣷⣦⣅⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⠟⢀⡴⠟⠋⢉⣀⣠⣤⣤⣤⣀⠉⠻⣿⣧⡈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⠀⠁⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣷⠀⢻⣿⣇⠝⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⡀⣼⡿⠟⠀⠙⣛⣬⠱⣿⣿⣿⣿⣿⣿ ⣿⣿⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⢀⠄⠁⣠⣶⣾⣿⣿⣿⡆⣼⣿⣿⣿⣿⣿ ⣿⣿⠀⣀⠙⣛⣛⣻⠛⠋⣉⣢⣤⣾⠃⣰⡄⠸⣿⣿⣿⣿⣿⣷⠘⣿⣿⣿⣿⣿ ⣿⣿⣤⢹⣷⣶⣶⣶⣾⣿⣿⣿⣿⣿⡄⠸⣷⠀⢻⣿⣿⡿⠟⠛⠡⣿⣿⣿⣿⣿ ⣿⣿⣿⠄⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠄⠻⠇⢈⠁⠀⠀⠲⠠⠞⠿⣿⣿⣿⣿ ⣿⣿⣿⣷⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣶⢤⠀⠀⢲⣿⣿⣿⣷⣤⡉⣻⣿⣿ ⣿⣿⣿⣿⣧⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣳⡀⢻⣿⣿⣿⣿⣷⠐⣿⣿ ⣿⣿⣿⣿⣿⣯⡈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⡇⡆⣿⣿⣿⣿⡟⣀⣿⣿ ⣿⣿⣿⣿⣿⣿⣷⡀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⢃⡿⠿⠛⡋⣀⣾⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣷⣀⠹⣿⣿⣿⣿⣿⣿⣿⠿⠋⢁⣠⣿⡦⠐⠀⢈⡙⢿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⠋⢀⣿⣿⣿⣿⠟⢃⣤⣤⡀⠻⣿⣇⣠⣴⡿⠄⠹⣧⡸⣿ ⣿⣿⣿⣿⣿⣿⡿⠃⢠⣾⣿⣿⡿⢋⣤⣿⣿⣿⣿⣄⠈⢿⡿⠋⣠⣤⣀⠈⣡⣿ ⣿⣿⣿⠅⣀⣈⠁⣰⣿⣿⡿⠋⣤⣾⣿⣿⣿⣿⣿⣿⣷⣵⣂⣽⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣄⠘⢿⣿⣿⠟⠋⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣷⣤⣬⣅⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿

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

⣿⣿⣿⣿⣿⣿⣿⢿⠟⠛⠿⠻⠿⠿⠟⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⡿⠛⢙⣨⣥⣶⣶⣿⢿⣿⣿⣷⣦⣅⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⠟⢀⡴⠟⠋⢉⣀⣠⣤⣤⣤⣀⠉⠻⣿⣧⡈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⠀⠁⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣷⠀⢻⣿⣇⠝⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⡀⣼⡿⠟⠀⠙⣛⣬⠱⣿⣿⣿⣿⣿⣿ ⣿⣿⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⢀⠄⠁⣠⣶⣾⣿⣿⣿⡆⣼⣿⣿⣿⣿⣿ ⣿⣿⠀⣀⠙⣛⣛⣻⠛⠋⣉⣢⣤⣾⠃⣰⡄⠸⣿⣿⣿⣿⣿⣷⠘⣿⣿⣿⣿⣿ ⣿⣿⣤⢹⣷⣶⣶⣶⣾⣿⣿⣿⣿⣿⡄⠸⣷⠀⢻⣿⣿⡿⠟⠛⠡⣿⣿⣿⣿⣿ ⣿⣿⣿⠄⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠄⠻⠇⢈⠁⠀⠀⠲⠠⠞⠿⣿⣿⣿⣿ ⣿⣿⣿⣷⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣶⢤⠀⠀⢲⣿⣿⣿⣷⣤⡉⣻⣿⣿ ⣿⣿⣿⣿⣧⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣳⡀⢻⣿⣿⣿⣿⣷⠐⣿⣿ ⣿⣿⣿⣿⣿⣯⡈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⡇⡆⣿⣿⣿⣿⡟⣀⣿⣿ ⣿⣿⣿⣿⣿⣿⣷⡀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⢃⡿⠿⠛⡋⣀⣾⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣷⣀⠹⣿⣿⣿⣿⣿⣿⣿⠿⠋⢁⣠⣿⡦⠐⠀⢈⡙⢿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⠋⢀⣿⣿⣿⣿⠟⢃⣤⣤⡀⠻⣿⣇⣠⣴⡿⠄⠹⣧⡸⣿ ⣿⣿⣿⣿⣿⣿⡿⠃⢠⣾⣿⣿⡿⢋⣤⣿⣿⣿⣿⣄⠈⢿⡿⠋⣠⣤⣀⠈⣡⣿ ⣿⣿⣿⠅⣀⣈⠁⣰⣿⣿⡿⠋⣤⣾⣿⣿⣿⣿⣿⣿⣷⣵⣂⣽⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣄⠘⢿⣿⣿⠟⠋⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣷⣤⣬⣅⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿

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

Comments in codeforces..

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

gl everyone. I'm sure it's original unlike the previous one ;D

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

Codeforces Language Picker -- chrome extension to fix codeforces language picker.

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

I like how all comments about previous round get downvotes lol

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

123

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

Good Luck to all Coders ! Never give up the CodeForces ! ! !

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

Hope to perform best in this contest

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

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

Very good round ❤❤
Thanks for all the authors and testers!(✿◠‿◠).

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

How to solve D?

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

    My approach was just recursive DP + memoization. Make a function for Alice's turn with arguments for left index and right index of the remaining string. Make a function for Bob's turn with arguments for left index and right index of the remaining string AND the latest character that Alice picked (important for tie-breaks). Check base cases (length 2 for Alice, length 1 for Bob), check if this case was encountered before (use two maps to store results, one for Alice, one for Bob), and if neither of those hold, then recursively check the two choices (pick first or pick last character). Obviously pick the winning choice if you can, but otherwise try to force a draw.

    My submission: 171425586 (sadly, it was uploading right when the timer hit 0, so it didn't count ;~;)

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

      Why did you use map? Are you trying to save memory?

      Is it better to use maps instead of arrays in these type of problems?

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

        The map is for memoization. If any recursive call revisits the same case, the map indicates what the answer is and it is immediately returned.

        Without this, each step would always invoke two recursive calls until it reaches the base case, which leads to a time complexity of $$$O(2^n)$$$ (you can imagine the recursive calls forming a binary tree, with base cases as leaves, and each level removing only one character from its parent). This would get time limit exceeded. However, there are only $$$O(n^2)$$$ substrings, so those $$$(2^n)$$$ nodes involve a crapton of repeated calls to the same substrings, which can be avoided by saving the answer in a map after you compute it the first time (instead of rebuilding the same subtree every single freaking time).

        This technique of "check if you solved the case before and only recurse if you didn't" is called memoization. There are other ways to achieve this, but I'm just personally comfortable with using a map for it, since it can adapt to whatever your case is described by (e.g., since Bob's case involves both Alice's character and the substring endpoints, the corresponding map also has these three parameters for the key).

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

          Bro i know that much.

          I think code looks pretty with arrays anyways your choice

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

            (please don't assume genders)

            To each their own, but I prefer maps for various reasons:

            1. Arrays require the scenario to be described by an index (possibly multi-dimensional), but maps can adapt to any type of scenario.
            2. The size of the map is equal to the number of cases encountered, whereas the size of the array would be based on how large the value gets. This is notable for problems where the scenarios may involve very large values but you don't actually encounter too many different scenarios within a single test case.
            3. For a scenario that was not encountered, the default for a map is that the scenario simply doesn't exist in the map, and you can check this with the count function. But for an array, every scenario begins with a default value (0, false, "", etc), which might, in some cases, actually be legitimate possible answers, so you're forced to come up with some impossible value to fill up your array before each test case, or make a second boolean array to distinguish between encountered and non-encountered.

            The only real downside to maps imo is that checking and retrieving values takes $$$O(\log (\text{map size}))$$$ time (as opposed to $$$O(1)$$$ time with an array), but this is generally fast enough for the vast majority of problems, especially since the map size only scales with the number of reachable scenarios.

            EDIT: As later replies demonstrated, the time constraints and input sizes would not actually have accommodated the additional logarithmic factor. The acceptance of my submission was due to how successive map lookups involved keys in close proximity, so there were fewer cache misses and the worst-case runtime was not invoked as often. I would not recommend relying on this kind of approach to achieve the runtime. I do still stand by my general opinions on the advantages of maps, but I agree that its use in this particular problem is not justified due to the time complexity disadvantage.

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

              Your condescending tone is so cute, although it is nice that you actually explained your approach.

              this is generally fast enough for the vast majority of problems

              Is it though? I'm actually very surprised that your solution did not get TLE. It sounds like almost $$$10^7$$$ operations with maps, which I wouldn't expect to fit in 5 seconds, not to say 2.

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

                Don't be very surprised, it is actually quite easy to explain!

                Maps are slow, and can't do $$$10^7$$$ random access operations in 5 seconds, because of one reason — cache misses. When you search for an element in a map, you need to look at $$$O(\log n)$$$ random memory locations, which is slow, if you haven't accessed it recently.

                But if you search for an element, which is located near the element you already searched, it should work pretty fast as most memory locations of the tree path to that node should be in cache.

                In the case of the Andalus's code, to calculate dp for $$$(l, r)$$$, first $$$(l+1, r)$$$ is calculated recursively, and then $$$(l, r - 1)$$$.

                If you write down the actual order in which dp states are calculated, in most situations we don't go to the $$$(l+1, r)$$$ child, because it is already calculated, and just go to the $$$(l, r-1)$$$, then to $$$(l, r - 2)$$$, then to $$$(l, r - 3)$$$, and so on.

                And such elements are located close to each other in the map, so access is fast.

                For example, if instead of storing pair $$$(l, r)$$$ in the map, we use $$$(r, l)$$$, it gets TL: 171450551.

                Or if we first calculate $$$(l, r - 1)$$$ instead of $$$(l+1, r)$$$, it also gets TL: 171451903.

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

      What is the time complexity for this solution ?

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

        It takes $$$O(n^2 \log n)$$$ time because there are $$$O(n^2)$$$ substrings, and we'd look for them in the map at most twice. The memoization ensures that revisiting the same case will take $$$O(\log n)$$$ time to return the past answer (saved in a map). For $$$n = 2000$$$, this is actually really risky and I would not recommend this (see other related comments for why my submission was fortunately accepted despite appearing to be too slow).

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

          Is it not $$$\Theta\left(n^2\log n\right)$$$ due to the use of maps?

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

            Yes, you're right, sorry about that. I'll edit it, but idk if anybody would see it. My approach was already demonstrated as being unsuitable for the time constraints, with the AC verdict being a fortunate outcome of how the specific sequence of map lookups resulted in fewer cache misses than a worst-case estimation (due to the close proximity of successive key lookups), and it is not recommended to attempt this kind of risk in general.

            I agree with the assessment and would not advise anyone to follow my approach (I guess I sorta assumed that the downvotes would take care of the visibility, but that might not be the case).

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

I couldn't solve C, and felt its implementation would be pretty tough. This is a me issue though, great contest anyways.

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

how to solve C?

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

How did you solve C?

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

Great contest. Solved till D after a long time. 499 Rank. Got stuck at E. Learnt diophantine equations mid-contest, but did not get how to answer queries in O(1).

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

Is it ever possible for Bob to win in D? I have the conditional in my code, but I don't think it is ever actually hit.

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

My answer for B, I think, is correct, but I got WA.

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

    ...that means it wasn't correct

    Try $$$n = 5$$$. Your sequence generates [3, 2, 1, 4, 5]. The 3 raises $$$x$$$ to 3. The 2 resets $$$x$$$ to 0. The 1 raises $$$x$$$ to 1. The 4 raises $$$x$$$ to 5. The 5 resets $$$x$$$ to 0.

    Your idea of ending with $$$(n - 1)$$$ and $$$n$$$ was correct, but what's critical is that the element before $$$(n - 1)$$$ must cause $$$x$$$ to reset to 0. If $$$x$$$ ends up increasing instead, then it's impossible for $$$x$$$ to accept both the $$$(n - 1)$$$ and $$$n$$$. Constructing the first $$$n - 2$$$ elements is the second challenge here (which is still easy, but it's not as trivial as you thought).

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

The hardest Div.2 round I've seen.

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

Probelm A.

can you please point out why this submission in wrong. 171352491

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

multiplying my memory just by 2 killed me on D &_& got AC just by deleting that extra parameter

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

How to solve D ?

  • »
    »
    4 года назад, скрыть # ^ |
     
    Проголосовать: нравится -13 Проголосовать: не нравится
    My solution
  • »
    »
    4 года назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится +1 Проголосовать: не нравится
    Hint 1
    Hint 2

    My Submission

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

    My approach was just recursive DP + memoization. Make a function for Alice's turn with arguments for left index and right index of the remaining string. Make a function for Bob's turn with arguments for left index and right index of the remaining string AND the latest character that Alice picked (important for tie-breaks). Check base cases (length 2 for Alice, length 1 for Bob), check if this case was encountered before (use two maps to store results, one for Alice, one for Bob), and if neither of those hold, then recursively check the two choices (pick first or pick last character). Obviously pick the winning choice if you can, but otherwise try to force a draw.

    My submission: 171425586 (sadly, it was uploading right when the timer hit 0, so it didn't count ;~;)

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

Why I always solved out the last problem I've tried just a minute after the ending ?

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

Any hints on E?

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

    I think you may precalculate $$$dp[i] (0 \leq i \leq n)$$$, where $$$dp[i]$$$ represents the max taste you can get using $$$i$$$ red peppers and $$$n-i$$$ black peppers. The key observation is $$$dp$$$ could be decomposed into two parts, the ascending part $$$A$$$ and the descending part $$$B$$$ such that $$$A \cap B = \emptyset,\,A \cup B = \{0, 1, 2, ..., n\}, 0 \leq |A| \leq n+1, 0 \leq |B| \leq n+1$$$. For example, $$$dp$$$ could not increase, decrease, then increase. So you only have to search around the peak point.

    Here is my submission: 171418858. Welcome to hack me!

    Update: Hacked!

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

I can't find a case where Bob wins. Alice always wins right?

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

How many got a +1 in D because of appending and not prepending?

PS: Me even after reading that

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

How to solve B?

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

Congratulations awoo with my last educational round.

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

so many constructive >:(

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

Is there something wrong with G?

I tried to hack with a testcase with $$$m=18$$$, but I received Invalid Input because it said $$$m$$$ should be in the range $$$[1,16]$$$.

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

    Yes, there is. About 40 minutes before the contest, I've noticed that one specific version of model solution runs too close to TL, so I decided to drop the constraints to $$$16$$$, but totally forgot to update the statement. I am sorry for this issue.

    Since I don't want to affect the people who got AC during the contest, I will change the problem statement, so it coincides with the validator.

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

In problem C In one operation,

1.pick some integer i from 1 to n;
2.assign either f(ai) to ai or f(bi) to bi.

What should I select,
only one index?
or some indices?

if it is only one index.

Then, what does it mean by some?

or Am I thinking in a wrong way?

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

if I hacked a solution and my hack was unsuccessful will my standing be down?

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

What is the test case hackers are using to break a lot of solutions on Problem C?

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

171381725 I have no idea why I got hacked (TLE) for my O(n + 10) solution. Feel very disappointed.

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

My code is giving correct output for "ba" on my computer but different on CF. Please someone help.

https://mirror.codeforces.com/contest/1728/submission/171407603

dp(l, r, last, win): -> s[l...r] remaining -> last tells whether Alice choose l-1 or r+1 in previous move. -> win : in the suffix where both Alice and bob has put character who was dominating recently returns 0 -> loosing, 1 -> winning, 2 -> drawing state

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

So is the C question today again facing the dictionary hack in python that happened a few contests ago? Makes me wonder about the extent of this disadvantage for python users. BTW I guess this can be fixed by taking random XORs to reduce collisions while hashing.

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

    How to hack hash tables and how to prevent hacks on hash tables is a very important discussion topic on Codeforces. Now that you learnt this time, you can either salt the hash or otherwise not use the hash table at all from now on.

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

Code is giving correct output for "ba" on local but wrong on CF. Please someone help.

https://mirror.codeforces.com/contest/1728/submission/171407603

last tells Alice made previous move on l-1(last = 0) or r+1(last = 1) or nowhere and win tells in the suffix where both alice and bob has put characters who was dominating recently

stores 0 -> loosing, 1-> winning 2 -> draw state

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

Very nice problems A B C!

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

    After looking at the solution of C, it looked pretty standard and reminded me of some greedy problems I solved some time ago. I am actually curious about the proof though.

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

      dk if this might help but look at it this way First remove anything in a that’s in b and remove anything in b that’s in a , then turn apply operations on all number that’s greater than 9 in both a and b, let the number of operations be ans , now do the same as step one where you remove elements, now the remaining ones HAVE to be converted to 1 so just count the number of remaining number of numbers greater than 1 and add it to ans , this is your answer

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

        yeah, I noticed this, but I am looking for a formal proof (why applying from biggest is optimal)

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

          Hmm I’m bad at formal proofs , so , sorry , can’t help you there , maybe that’s why I’m still a pupil haha

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

          It doesn't have to be the biggest, but you do need to deal with multi-digit numbers before the single-digit numbers.

          My approach was to first remove elements that appear in both arrays, so now the two arrays have no overlaps.

          Now that there are no overlaps, we now apply the operation on every number that's $$$\geq 10$$$ (contains 2 digits or more). As proof of why this is always required, note that the values are only as high as $$$10^9$$$, so there is no number with 10 or more digits. Therefore, the operation can only produce numbers from 1 to 9. So if you have a multi-digit number $$$x$$$ in the first array while the second array has no $$$x$$$, then it's impossible to produce $$$x$$$ in the second array through operations, and it is therefore necessary to apply the operation to $$$x$$$ on the first array.

          After these operations, the arrays have only one-digit numbers. We can remove overlaps once more (no operations performed) until there is no element appearing in both arrays.

          At this point, we have to transform everything into 1, so we count the number of non-1s, applying that many operations to turn them all into 1, after which we are done.

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

      Note that the operation is individual for each number and the operation will make a number smaller. So let's just consider the biggest number and assume it is in A. If there's a number in B that equals to A then alright remove them all. If not, it's clear that we should apply operations on it or we won't find a number to match it.

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

Did you know that adding more samples is totally free?

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

Any hint for E? I know how to precompute the best answer for $$$i$$$ red peppers for all $$$i$$$, but I don't really know how to deal with the queries fast enough. I guess I'm missing some observation.

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

Is there someone can hack my C problem?

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

Is there anyone can hack my C problem?

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

For C, what is the proof that if you have a match, you always want to pair them immediately?

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

    Suppose you have $$$x \gt 1$$$ an even number of times (and you already dealt with bigger numbers). Suppose you change one of them to $$$f(x)$$$. Now the amount of $$$x$$$ would be odd, which means one $$$x$$$ would have no pair, so you must actually change both of them to $$$f(x)$$$. But both $$$f(x)$$$ are equal, so you just did two unnecessary operations, because you could just match them when they were $$$x$$$.

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

Can anyone please help me where I am wrong? Talking about problem C.

My submission : https://mirror.codeforces.com/contest/1728/submission/171436863

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

    Can you please briefly describe your approach? It's hard for me to figure out exactly what you're doing.

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

      Yeah sure

      I made 2 vectors a and b initially. Then I made a vector a1 and map m1.

      a1 contains elements of a that are not matching with elements of vector b. similarly m1 contains element of b that are not matching with elements of vector a.

      then I iterated over a1:

      let e be element of a1

      if(e>1&&e<=9)
      e>9

      now we iterate over remaining element in m1 (lets name this element as p)
      if(p==1)continue;
      if(p<=9)ans++;
      else ans+=2

      Code link : https://mirror.codeforces.com/contest/1728/submission/171436863 Giving WA on TC2

      Revision 1 : AC now!

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

I think I have an $$$O(n)$$$ solution for Problem D. 171446061

If the string has following structure:

$$$ABC$$$

Where $$$AC$$$ is a palindrome and $$$B$$$ is made out of pairs of equal letters (e.g. aahheeiiwwmmyy), then it is a draw. Else Alice wins.

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

    Nice structure! I think I have some argument. Suppose we have a string of minimum length that Bob can win, denoted by a1 a2 X a3 a4. Bob must pick smaller letter than Alice at the first turn, since the best outcome afterwards is a draw. Hence, we have three posibilities:

    (1) a1 > a2 and a4 > a3

    i) a1 = a4

    X a3 a4 must be a draw, and a1 a2 X must be a draw, so X = a4 a3 Y a2 a1. We now have that Y a2 a1 and a4 a3 Y must be draws. This repeated chain can't end, contradiction.

    ii) wlog a1 > a4

    a1 a2 X must be a draw, so X = Y a2 a1, where Y is a draw. Hence, when Alice pick a1 in a1 a2 Y a2 a1 a3 a4, neither a2 Y a2 a1 a3 nor Y a2 a1 a3 a4 can't be a draw, contracdiction.

    (2) a1 > a4 and a4 > a3 (and thus a1 <= a2 by excluding (1)), i.e., a2 >= a1 > a4 > a3.

    If Alice pick a1, Bob should choose a4. a2 X a3 must be a draw. Since a2 != a3, X = a2 Y a3 where Y is a sequence of pairs of identical letters. Now, Alice pick a4, Bob should choose a3, and a1 a2 a2 Y a3 can't be a draw, since a1 != a3.

    (3) a4 > a1 so a1 > a2, which is symmetric to (2)

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

    Great solution! Could you share your logic on deducing ABC template for draw scenarios? It took me significant amount of time to do it, perhaps your way is faster?

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

      Bob wants to force a draw by always picking the same letter as Alice. There are only two possible answers to Alices moves. Either pick on the same side as Alice or on the other side.

      In the palindrome situation Bob needs to pick always the other side as Alice did pick. In the $$$B$$$ situation Bob always needs to pick on the same side as Alice picked.

      Transition from palindrome to $$$B$$$-situation works out for Bob. Transition from $$$B$$$ to palindrome does not work out. Alice can start picking on the palindrome before the $$$B$$$ part is finished, so one side of the palindrome won't be reachable. So the structure needs to be $$$ABC$$$.

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

I messed up this round and got a rank in the 8000s. I hope to perform well in the upcoming contests <3

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

    In my experience, messing up in a manner that is not reflective of your skill level is usually not a problem (unless it happens a lot). Even if your rating decreases by a lot, it would quickly climb back up when you do later contests at your consistent skill level. The initial drop means you'll generally gain more rating in the next contest, so you should quickly catch up.

    More importantly, I hope you actually learned more from doing the contest and improved, even if only slightly. Improving your personal skill level would eventually lead to consistently maintaining a higher rating, despite the occasional drops from randomly choking.

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

      Nice thought! One of my problems is that I get stuck in a problem, and then struggle with it for 45 mins or even an hour. Then during upsolving I realise that the problem was not that difficult and could have solved it within 15 mins. In short, I think I can solve problems, but I take so much time that my rating doesn't increase as much as it should, or even decrease. Can you advice me on this?

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

        Each person is different, so my advice may not necessarily be the best for you. However, my suggestion is that, when you find yourself struggling with a problem that you are able to easily upsolve later, try to think carefully about what was the crucial observation you missed that prevented you from solving it faster. I then recommend writing this down physically on paper. In my experience, this helps to avoid missing similar observations in the future.

        If you find that a particular issue arises frequently for you, then make a special note of this and try to make arrangements to remind you of this for future problems, e.g., adding it to your code template as a comment, placing a sticky note on the corner of your screen, etc. Eventually, you should get the hang of dealing with these issues quickly on your own.

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

Has anyone managed to fit O(Msqrt(M)) into E? I decided that normal solutions are boring, so I have something which runs in O(NKlogK) preprocessing + (N/K) query, which I could not fit into TL. You could add smart cutoffs, but at that point the model solution is easier. So — has anyone fir in a O(Nsqrt(N))?

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

in problem D. if the string is baab the answer will be Bob right?? or is it a draw??

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

It seems that Bob can't win in problem D. I got the AC during the contest but still can't come up with an elegant proof to back it up. Any suggestions?

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

    in the test case "baab" Bob will win right??

    Update : sorry i read the question wrong. Please ignore.

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

      Nope he doesn't in this case

      I had an inductive proof for that but it is too long still anyway:

      Base case: we will have a string of length 2. if the characters are different Alice wins, if the characters are same we'd have a draw.

      Recursive case: Suppose we have a string of length l where Bob wins. Since Alice can always pick the lesser of the first and last characters we'd skip the case where Alice and Bob pick characters from the opposite side. Consider the case where Bob and Alice pick the characters from the same side. For the recursive case we have made the assumption that Bob can't win for any string with length < l. Let the string be c1.c2.s(some string).cn-1.cn. If Bob wins then cn > cn-1 and c1.c2.s will result in a draw and c1 > c2 and s.cn-1.cn will result in a draw. Since the frequency of each character in a string which is a draw, is even, we get c1 = cn, c2 = cn-1.

      Now, we have c1.c2.s.c2.c1. Since, c1.c2.s is a draw string, if Alice decides to pick c1 then, s has to end with c1. In a similar way, s also has to start with c1. We keep on repeating this process, build s and we arrive at a contradiction at a position in s.

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

        Proof: As the length of the string is even.

        The deciding factor will be the last 2 remaining characters. Now the 2characters can be same or different if different then as alice gets the first pick she wins.

        If the characters are same then both of them have the same first letter in their own string. So the deciding factor will be the 2 characters picked before the last ones.

        Same logic here those 2 character can be same or different if different alice wins as she gets the first pick. If same then deciding factor will be the 2characters picked just before. And this will continue. So you can see that Bob can never win.

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

        I just got the problem accepted. I read the question wrong and spent 5hours on the wrong question.

        I was adding the characters to the end of Alice and Bobs string.

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

    I think you can look at a problem backwards. At last 2 letters Alice goes first and can choose lesser letter and win. So Bob can only hope for draw so last 2 letters should be the same.
    It means optimal strategy for Alice is choose at any step lesser letter, strategy for Bob is to choose the same letter as Alice for getting draw.
    I feel like problem can be solved in O(n) though I didn't solve it

    UPD. https://mirror.codeforces.com/blog/entry/106726?#comment-951491 found comment with O(n) solution. Looks like I missed a piece of observation with combining palindromes and pairs of same letters :(

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

In problem F, how to prove that the number of useful values is $$$O(n)$$$? I've added lots of trivial optimizations but still got TLE. Or is it maybe I need a faster max flow template?

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

Would appreciate if Educational rounds could release the editoral soon after the contests :) Most other contests have been doing so, and I think it would help for learning about unsolved problems while it is still fresh in our minds.

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

Codeforces becomes Mathforces in these days

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

I solved 2 problems in yesterday contest but the rating didnt change till now.

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

I'm a newcomer in Codeforces.That's my 5th contest... But i have noticed it takes really long to update ratings on codeforces.. Why is it so?

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

Is my Solution to A good? I feel like I wasted time to write such a solution, and could have written a much simpler solution in less time.

https://mirror.codeforces.com/contest/1728/submission/171356537

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

why are ratings still not published, is this round rated or unrated?

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

Anyone else misinterpreted 'Find any possible color of the remaining balls.' as find the number of colors that can be last standing? :D

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

Via debugging E, I'm surprised to find out that -54/15=-3 (in c++) and -54//15=-4 (in py)

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

When will the rating update?I cant wait to get a positive result.

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

If I solve any question even though I am div 4, will my rating go up??

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

I completed 2 problems in yesterday's contest still i am unrated. When does it gets updated?

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

When will the ratings get updated and tutorial get released for this round?

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

Why rating hadn’t changed yet isn’t it supposed to be after 2 or 3 hours just after open hacking phase?

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

I have read the problem B. It's clean but i can't solve. Help me! p/s: i just have solve as brute force thank you

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

    ok here is the idea u will notice that you can at most get the sum of the two largest numbers in the sequence that because each two consecutive positive integers must be greater than to the following number to them this is the case for n > 3 so if i give you n = 5 then max you can get is 4 + 5 which equals nine and if n = 8 then the result will be 7 + 8 and so on the problem comes is that how i make sure that when i start to count the two largest numbers the current res is 0 so if it is even n like this case n = 6 then the sequence will be like 4 3 2 1 5 6 which if you trace will get 0 4 0 2 0 5 11 so if it is even print from n-2 to 1 then print n-1 and n if n is odd like n = 7 then just replace n-2 with n-3 so it will be like that 4 5 3 2 1 6 7 which by tracing gives 0 4 9 0 2 0 6 13 and you can generalize this on any n.

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

when will be the rating changes?

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

uhh... when will the rating update?

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

why haven't the rating changes appeared yet?

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

I guess the rating will be updated after the #820 starts to register to prevent some bugs of rating calculation.

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

Why is my code giving tle on problem C(digital algorithm) using unordered_map but getting ac using map?

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

My intuitive reasoning to D :

First, because Alice play first and the length of the string is even, Alice can force Bob to take any particular character in the string by simply never take it. After Bob take this character either the string become empty and the game end, or it become a shorter string with even length, then we use this strategy again for the shorter string. By take advantage of this, when play optimally Alice will never lose.

The only way for Bob to draw is to always take the same character as Alice. Now we reverse the game from the end to begin to see what the original string would look like :

For each double turn of Alice + Bob, we add 2 identical character to the same side or different side of our string (for example : $$$aa \rightarrow aabb, bbaa$$$ or $$$baab$$$)

The critical point is that if we add to the different side, we can't add to same side anymore. Take the example $$$baab \rightarrow baabcc$$$, here Alice can take $$$b$$$ and Bob can't take any $$$b$$$ so he will lose

So the form of our string is : half palindrome + some pairs + other half palindrome, the 1st and 3rd part form a palindrome

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

In problem D why using global recursive function link gives AC whereas converting it into a recursive lambda link is giving MLE ?

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

Hey everyone... is this round rated? I don't see my rating changes for 1 day (mostly, it takes under 1 day) so I just ask in curious.

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

Can anyone explain me non-dp (greedy) solution for D? i.e. $$$O(n)$$$ solution?

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

    You can get an inductive/recursive proof for the type of string, once you get that code is fairly simple.

    Sketch/Approach
    Answer

    Link to the code: https://mirror.codeforces.com/contest/1728/submission/171419727.

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

When is rating updated it has been 24 hours??

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

Why did you skip my d? Do we have to ask everyone to use different ideas to solve the same problem? I don't understand

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

https://mirror.codeforces.com/contest/1728/submission/171413965 https://mirror.codeforces.com/contest/1728/submission/171404066 can you tell me why my code skipped look at my code it OBVIOUSLY not the same plz look at the two codes MikeMirzayanov

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

Why the rating hasn't been updated yet!?(┬┬﹏┬┬) MikeMirzayanov
and where is the editorial? ◑﹏◐

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

Hey, yesterday I had 3 accepted solutions and today I have only two. I've got TLE on this submission: 171386970

Is it an error or is my solution bad?

Can I download a test to check on my own?

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

Hi, MikeMirzayanov.

The submission 171396201 and 171412747 of 1728D - Letter Picking are just coincidences

I am sure I didn't copy the code or send it to others.

Obviously, we have the same idea of this problem, and coincidentally, our code styles are similar.

My submission is at 23:33(UTC+8) and the other one's submission is at 00:09(UTC+8). And this problem is simple for me. This ruled out the possibility that I copied his code.

By the time he submitted his code, I had already came up with the solution to 1728E, so I am sure I can become yellow after this contest. I have no reason to send my code to others and cause me to be skipped.

Moreover, solutions to 1728D are all very similar, except dfs and the O(n) solution. If necessary, I can find more submissions similar to mine.

So I just have the same idea and similar code style with a stranger coincidentally.

Thanks!

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

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

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

How to become pupil as soon as what topic really need to solve 1000 1100 and 1200 1300 rated problem ?

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

I am finally an expert. Thanks to this contest :)

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

Все мои посылки за этот раунд были проигнорированы из-за подозрений в списывании. Были указаны следующие два решения:

171402277 — моё, отправлено в 18:45 мск

171407053 — участника alien_lover, отправлено в 18:56 мск

Однако до того, как мы получили ОК по этой задаче, мы оба отправили неверные решения, в частности:

171393859 — моё, отправлено в 18:29 мск

171398726 — участника alien_lover, отправлено в 18:38 мск

Если мой код действительно был использован alien_lover, то он использовал неверную версию моего кода. Но ошибки в этих решениях разные! Я забыл добавить только одно условие, а alien_lover изменил свой код довольно сильно.

Вместе с тем фактом, что я и alien_lover не можем иметь совершенно никакой связи, это обстоятельство делает вероятность того, что кто-то из нас списал у другого, очень маленькой. Поэтому я хочу попросить пересмотреть решение об исключении меня из участников раунда.

Кроме того, по какой-то причине сам alien_lover из раунда не был исключён и получил рейтинг за него. Почему — совершенно непонятно.

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

Can someone explain digital logarithm to me? I just don't understand what "f(x) for a positive integer x as the length of the base-10 representation of x without leading zeros" means. In example 2 why does f(2) = 1? and f(100) = 3?

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

It's a great competition.I like it very much.

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

trash