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

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

Привет! В Apr/08/2024 17:35 (Moscow time) начнётся Codeforces Round 938 (Div. 3) — очередной Codeforces раунд для третьего дивизиона. В этом раунде будет 6-8 задач, которые подобраны по сложности так, чтобы составить интересное соревнование для участников с рейтингами до 1600. Однако все желающие, чей рейтинг 1600 и выше могут зарегистрироваться на раунд вне конкурса.

Раунд пройдет по правилам образовательных раундов. Таким образом, во время раунда задачи будут тестироваться на предварительных тестах, а после раунда будет 12-ти часовая фаза открытых взломов. Мы постарались сделать приличные тесты — так же как и вы, мы будем расстроены, если у многих будут падать решения после окончания контеста.

Вам будет предложено 6-8 задач и 2 часа 15 минут на их решение.

Штраф за неверную попытку в этом раунде будет равняться 10 минутам.

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

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

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

Задачи были придуманы и написаны нашей командой: mainyutin, VManoshin, ssor96 и ZergTricky.

Также большое спасибо:

  1. Vladosiya за помощь с идеями и прекрасную координацию раунда;

  2. FairyWinx, sevlll777 за красное тестирование раунда;

  3. ace5, Nickir, ibraevdmitriy, vladmart за жёлтое тестирование раунда;

  4. natalina за синее тестирование раунда;

  5. bitthal04 за бирюзовое тестирование раунда;

  6. Alequisk, Mohamed_Hesham за зелёное тестирование раунда;

  7. MikeMirzayanov за системы Polygon и Codeforces.

Всем удачи!

UPD: В задаче G была допущена ошибка с валидацией взломов, но сейчас она уже исправлена. Все успешные взломы будут перетестированы. Ошибка не затронула претесты, они не будут изменены.

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

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

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

yay div 3!!!

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

authors pic??

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

No pics with pizza.

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

Experts be like: I'm out of competition (つ▀¯▀ )つ

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

Дождались!

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

Is that a gan cube :o

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

Let this be the round where i shall become Pupil under the Heavens .

It's divine Conviction that i shall fulfil.

In the name of all mighty Behelet behold my Pupil Rank

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

Good luck to everyone! I'll sadly have school but I'll find a way to participate since cf >>>>>>>> school

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

i think it's time to give it a try to change my color

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

Authors' photos again!

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

Hope I can get back to my real rank of pupil

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

should i participate or nah?

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

OMG! Another mainyutin round ...

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

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

Back to Expert

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

Why ppl are lately participating comparitively less in contests? I remember seeing 40k registered_participants and 30k actually_participants! (not a long ago) But nowadays it's hardly 20k ppl

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

Queue is too big.

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

queuedforces :noo:

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

long queue

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

The site is unusable for today's round,i have been waiting for 10 min to submit,it keeps loading.

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

I am sorry but The queue is too annoying today.

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

hope rated

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

this comment is in queue

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

For once, I won't believe that my poorly optimized G could survive, so guys, please hack my G submissions till TLE XD

Nice contest overall. I was infuriated by H at first since I skipped a crucial line in the statement, yet after that the problem was really nice, huge kudos to its setter.

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

nice problems

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

Ahh! I just figured out how to optimize my solution for E.

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

    same man just did D, uploaded the file and submitted with 40 secs left,the submit didnt even register somehow!

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

    can you explain your solution please

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

      Given the constraints of the problem statement, it suffices to code a solution that works in O(N^2) per test case. So, we can brute force over all n to find the largest possible k that can change the characters to 1's.

      How do we find out whether this can be done for some k?

      If s[i] is '0', then we must flip s[i...i+k-1]. From i=n-k to n-1, we can't create anymore flipping segments. Therefore, after performing some operations, we can check whether s[n-k...n-1] is only 1's. Iff so, then k works.

      Of course, flipping each s[i...i+k-1] is O(k), which is slow. Instead, find out how many times s[i] has been flipped. Let this be flips. This can be done using a deque D: whenever s[i] is '0', flip everything from i...i+k-1 (increment flips) and push i+k to D. If i is in D, decrease the current number of flips (decrement flips).

      For the remaining k values, check if s[i] = '1'. We follow a similar procedure as before. To check if s[i] is '1', check if flips is even or odd. If it is even, then s[i] did not change. Otherwise, it clearly changed. If i is in D, then decrement flips (as this was an endpoint like other flips).

      I hope this explanation makes sense.

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

RIP python users for F

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

    Why?

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

        Spoiler

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

          Tell other method pls

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

            Hint 1

            Hint 2

            Hint 3

            Solution

            Code

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

Can anyone please give a test case where my D solution will fail?

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

Why is this giving a runtime error? My code works when I test it myself

Submission: 255757485

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

B is harder than F.

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

    Think out of the box and B would be really easy.

    Take the minimum element of $$$b$$$ is a new $$$a_{0,0}$$$, then construct $$$a$$$. Sort $$$a$$$ and $$$b$$$, and we'll now only need to check if two sorted lists are identical.

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

    Trying to compare B and F is so weird because they're so different since B is a "just code it" problem and F is a logic problem, but I definitely agree with this opinion since F is guess forcable and one of the integers isnt even that relevant (namely 4)

    If they increased the integer maximum to be 8 I'd think that would make it a reasonable F problem

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

I think F should come before D. He's too easy in that order!!!

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

Can someone explain why 255755491 gets TLE for problem D. It should be O(nlogn),right?

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

Video Solutions for all problems:

Video for A-D: Video for E-F: Video for G-H:

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

what a intresting problem H, sadely could not solve it,

can someone share the hints for it?

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

    First, lets try to solve an easier version of this problem:
    Ignore "However, each $$$r$$$ can only be used for at most one tower."

    Solution

    Going back to the main problem:

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

Is the intended solution for G not this: Brute for all factors of gcd(a[0][0], a[n-1][m-1])?

If it is, why is the TL so annoyingly tight?

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

contest shows how many problems with greed code that i can't write XD

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

Is this solution to G hackable. I stored all possible values of the gcd at cell $$$(i, j)$$$. I think it should work because there are at most $$$\log A$$$ values of the gcd on a path. Code:255759157

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

Can H be solved using maximum weight bipartite matching? I also used the observation that no tower would have $$$r \gt 20$$$, was this a wrong assumption?

Update: After looking at some other comments, I think I got the issue with my solution.

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

A nice competition!

I enjoy it!

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

https://mirror.codeforces.com/contest/1955/submission/255756584

could anyone tell a counter test case where this fails for D

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

Was the statement for problem A silently modified during the contest? More specifically, was the word "exactly" added or did I just miss it.

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

Using a segtree on problem E be like

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

    What's the solution for problem E?

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

      Basically since $$$O(N^2)$$$ passes, you can test every possible $$$K$$$ from $$$N \rightarrow 1$$$ and return the first one that works. This step runs $$$O(N)$$$ times. The question is now: how do you check if operations of size $$$K$$$ can turn a string to all 1s?

      First, notice that since this is just an XOR these operations are both commutative, associative, and their own inverse. So there's no point in applying the same operation to the same substring more than once.

      With that, notice that if $$$s_0 = 0$$$, there is only 1 operation we can and must perform: invert {$$$s_0 ... s_{k-1}$$$}. Inductively, it is sufficient for us to apply the operation only when the first element in the operation is zero. This step runs also in $$$O(N)$$$, bringing our current total to $$$O(N^2)$$$.

      The final step is figuring out how we can apply the operation very quickly. If we prefer typing or templates to critical thinking and reasoning, we can just use a range update / point query data structure like a Segment Tree, Fenwick Tree, Sparse Table, etc. I did this in during the contest 255770625 and made sure to statically allocate my segment tree instead of using std::vector so I didn't get hacked. I also manually coded this because I enjoy a nice hand-crafted segment tree (brainrot).

      However, instead of that beautiful solution, we can do it intelligently by inverting in $$$O(1)$$$ on the fly by keeping track of whether or not we are inverting, and then setting a reminder $$$K$$$ indices ahead to remember to start un-inverting. I did this after the contest 255903468.

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

Can someone please tell why 255705783 gave wrong answer test 1, when I run it locally it gives me the correct output furthermore when I submitted the same code with c++17 it gave TLE test 3 which makes me think it's something around c++20 that I might not know ?

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

Problem G and H are enjoyable. Enjoyed how there was such a simple solution to G if you made the appropriate observation. And problem H was very interesting, I implemented a dp bitmask, but some reason still getting WA on test case 4. I think I may have small bug, but I think the approach is correct.

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

can someone please tell me why this 255705783 is WA test 1 when I run it locally it gives me the correct output, furthermore when I switch the compiler to c++17 it gives TLE test 3 this time, maybe it's smth abt c++20 that I don't know ?

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

255760248 Why does this submission exceed TL ? I think the complexity is $$$O(n\cdot(n\cdot \log n))$$$

I realise this is most probably not the intended solution. But if it helps to understand the submission, I have just tried to go over all possible $$$k$$$.
Used PBDS for calculating if a current position has been previously flipped an even or an odd number of times.
For each $$$k$$$, considering all previous operations that have modified a position, I have never flipped a position that is currently a $$$1$$$ and always flipped a position that is currently a $$$0$$$.

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

    IMO $$$\mathcal{O}(n^2 \log n)$$$ is a very dangerous complexity for $$$n = 5000$$$, and I would not gamble on it even with 3s TL.

    Used PBDS for calculating if a current position has been previously flipped an even or an odd number of times.

    You could actually improve this part by using a queue instead of a PBDS.

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

      My $$$\mathcal{O}(n^2 \log n)$$$ solution got AC and ran in under a second with Fenwick Tree. 255763784

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

      Thanks for answering. I was also guessing that PBDS is going to cause TLE even if $$$O(n^2 \log n)$$$ could have squeezed past the TL. Thanks for the queue insight too. I realised I know nothing about queues :)

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

        The only thing I could suspect is that PBDS is already a high-coefficient $$$\mathcal{O}(\log n)$$$.

        For the queue stuff, just imagine this assuming we're trying length $$$k$$$: store the starting points of all flipping segments in the queue, then when investigating index $$$i$$$, any starting indices up to $$$i-k$$$ has no value. Why a queue? We're iterating indices in ascending order, and added index would later be invalidated in that same order as well, which fits the FIFO nature of a queue.

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

    I used PBDS for calculating if the current position has been previously flipped an even or odd number of times. Here's my submission.

    I later realized we insert indices in a monotonically increasing fashion in the data structure we maintain. So we can also use vector/queue. With vectors we can use lower_bound and with queue we can pop the indices that are at a distance k of far than current k.

    Vector solution: here Queue solution: here

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

      All submissions you've linked are in queue at the moment lol.
      But, yeah lesson learnt. Don't be lazy and use sets everytime you want a sorted list.

      I later realized we insert indices in a monotonically increasing fashion in the data structure we maintain

      Now that you have put it this way. Its baffling how obvious this was and yet I missed it.

      Want a sorted list. Want integer-positions. PBDS. TLE. Die.

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

        Yeah it was pretty obvious but even I wasn't able to come up during contest so I did it using ordered set. It was only after contest when I realized it can be accomplished using vector.

        And as AkiLotus mentioned, queue can be used to eliminate the logarithmic factor and achieve a linear solution.

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

can anyone explain the idea to solving D?

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

I failed to see the key observation that GCD must be a divisor of both top-left and bottom-right corners, so I ended up solving a more general version of the problem which finds maximum gcd for each path from top-left corner to cell (i,j). Tbh it was a good problem to practice some prime optimizations although it was not intended.

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

bro my computer crashed during the contest and my coding software was deleted (dunno why) and any custom invocation would take more than 7min (dunno why) so i just had to randomly code on the submission site ToT

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

F should be in place of B didn't read it during contest

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

I just realised problem G is but a simple BFS ToT

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

I have an ask for harder version of $$$G$$$ , same constraints , just your starting cell can be any cell inside the first row and finishing cell can be any of the last row , then how to solve it?

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

submission1 submission2 Here are the two submission can anyone tell me why they are giving different answer? The only difference is in the solve() function.

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

Problem G is the same as https://community.topcoder.com/stat?c=problem_statement&pm=16140&rd=18085. Of course, it's not as big of an issue as Div 3s are supposed to be educational anyway, but just putting this out here :D

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

Can binary search be applied in E to make TC roughly NlogN

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

Why using qsort (C/C++) in B can be easily caused by Quicksort hack halyavin.cpp to cause TLE (e.g. 255659588) ?

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

    It's the nature of quicksort algorithm itself to have $$$\mathcal{O}(n^2)$$$ worst case time complexity, thus as long as you know the sorting was a pure quicksort and you know how the pivot was chosen by the library, you could always counter it.

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

How to E

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

    bruteforce + greedy

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

      How to check if k is valid

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

        well you have to choose some subarrays of size $$$K$$$ to invert and subarrays do have a unique starting index and so you put inversion on an subarray starting from a particular idex at most $$$once$$$ so you start from the beginning , on your current index the value of the character in string is fixed so you can choose that index as starting point of a subarray or not(which is a certain choice), so if you do inversion the cost of that ends $$$K$$$ indexes later and if it's valid it will be at $$$\le n +1 $$$ and if valid you move on to the next index to check validity again otherwise invalid proved

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

Can anyone suggest a tc where this fails for problem D :(255769513

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

can anyone explain this solution to problem E? i fail to understand how we are checking if integer k is valid or not.

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

submission1 submission2 Why they are giving different answer? The only difference is in the solve() function only. Is this a CPP Bug or I missed anything? mainyutin

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

Can anyone tell me why my code of problem C 255769305 is giving TLE on testcase 3. I thought deletion in deque is O(1).

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

    The time complexity of your code is O(min(s,k)), s = sum of durability of the ships. As s and k might be too large (k <= 10^15, for example), it would give TLE.

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

    your solution time complexity is min(sum of all the element, k) which in worst case can go upto 2e14 like your are just simulating the process which is not optimal

    required optimisation — in the while loop of q.size() and k

    take the min of q.front() and q.back() if 2*mn <=k do this {

    then reduce mn from front as well as back of deque then if q.front==0 do pop_front() and if q,back()==0 do pop_back()

    } else break;

    now if d.size() is greater than 0 check can we remove the first element (value should be <= (k+1)/2 if yes pop_front() do same for last element if it exist (<=(k/2))

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

I spent really a lot of time during the contest trying to make my E solution faster, even though it should have O($$${n^2}logn$$$) complexity, which is with n <= 5000 should pass the 3 second limit. The only thing that helped me was changing long long to int, but even so, it's still very slow. Does anyone have any idea why my E solution is so slow (below is the final one)? And a similar question is about D as well, because I can't see any clear reasons why it is so slow:

E: 255741981
D: 255675779

Edit: Sorry about how code in E looks like, I don't know why it shifted, because for me it was totally normal when I was sending it.

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

.

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

    I too felt the cheating happened in this contest a lot, my rank was around 160ish before 1 hour end of contest, and i could not solve anything further was only able to solve 5(A-D and G) but somehow so many other peoples solved problems that my rank went to 700+, i was thinking maximum i can slide is around 300-400 but 700+ did not feel organic... I might be wrong but this is what i feel.

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

Great Contest!!! Very nicely framed

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

I hate newbies

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

does unsuccessfull hack have panalty in this round,

I tried to hack some solution, but failed will my score be affected by this?

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

Was the cpp's hash function mechanics of unordered_map changed recently ?

cause i can't seem to hack solutions using the default unordered_map like before .

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

Can someone tell How can we solve G using bfs I was first storing the factors of the last number and then I was doing dfs and each time i find a new pair of gcd between two colunms then I am checking it to be divisible by a factor of last number . Help needed !!!

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

problem D first I used map for frequency and I got TLE I removed the map and I used a simple global frequency array but with t 1e4 and the frequency array being 1e6 it is not possible so what should I use here in this case?

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

Toooo many hacks for G.

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

you may want to rejudge G with a higher time limit, except you had a better intended solution

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

Many people were hacked on G.

Poor pretest.

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

My 320 hacks on G were about trying to achieve maximum number of possible GCDs for as many cells as possible, so that solutions that hold all GCDs using a slow data structure such as std::set will insert a lot of elements. My test made it more than a million elements per test case, and since we can have 20 of 100*100 tests in a single file, these solutions tried to insert more than 20M elements in total, leading to TLE.

But it seems like there are far more intense cases, as even my possibly more optimized solution couldn't pass, as well as several LGMs' solutions, and now with all the Unexpected Verdicts we can assume even testers' solutions are hacked...

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

It seems that E is more difficult than F.

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

Can someone hack my solution in E? 255743941

it's O(n³) with an optimization

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

G is so humorous!!!

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

what a sight. seeing Geothermal losing and regaining his high ranking after the contest

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

It seems that the validator for problem G is wrong. The problem said that the sum of n * m cannot exceed 2 * 10^5, but it can be hacked with such data.

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

Validate is wrong. cpp #include <bits/extc++.h> using namespace std; int main(void) { ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr); size_t constexpr T=30; cout<<T<<"\n"; for (size_t t=0;t<T;++t){ cout<<"100 100\n"; for (size_t i=0;i<100;++i){for (size_t j=0;j<100;++j) cout<<114514<<" \n"[j==99];} } return 0; } This passed the check.

  • »
    »
    2 года назад, скрыть # ^ |
     
    Проголосовать: нравится +1 Проголосовать: не нравится
    #include <bits/extc++.h>
    using namespace std;
    int main(void) {
        ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
        size_t constexpr T=30;
        cout<<T<<"\n";
        for (size_t t=0;t<T;++t){
            cout<<"100 100\n";
            for (size_t i=0;i<100;++i){for (size_t j=0;j<100;++j) cout<<114514<<" \n"[j==99];}
        }
        return 0;
    }
    
»
2 года назад, скрыть # |
Rev. 5  
Проголосовать: нравится 0 Проголосовать: не нравится

What is this ? I precalculated divisors for all elements upto 1e6 ( in MlogM time where M = 1e6 ) and solved the overall problem in (approx) cuberoot(1e6) * 1e5 time , still hacked ? solution

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

G hack amazing now

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

The time complexity for the Python judge is not being properly set.

I got TLE at test 3 for my submission in python (submission no — 255718411) I got accepted for same code in Pypy 3.6 (submission no — 255806654)

Due to this , I have made additional 2 negatives. It's NOT FAIR If you want you can check in my recent submissions

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

So qsort is a poor way to solve cf problem? Since it can be hacked easily. I did not even imagine that qsort in stdlib have a O(n^2) situation, I thought it should have some method to prevent it from happening because it is in Standard Library! Forcing me turn to a cpp programmer? My rating is gonna drop for this ridiculous reason. ahhhhhhhhhh X(

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

Can anyone explain G? I thought this is a simple standard Dijkstra algo to keep track the GCD for each path with PriorityQueue?

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

Firstly I would like to acknowledge the contest author's effort and thank them. Now I can began my issue with the contest.

I think the statements for problems could have been more clear considering this is a Div 3. Also the explanations for the samples wasn't there or was not even helpful at all. I know that the author is not duty bound to explain the samples but with poor statement explanation I think this should have been done.

I did quite bad in the contest and to check whether I was feeling these issues because I did bad, I slept this off. Now even in the morning I feel the statements could have been better with better sample explanations.

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

It is so surprising to see so many G solutions are hacked. Given that my rather standard DP solution https://mirror.codeforces.com/contest/1955/submission/255745682 is accepted just fine, now I wonder whether I have missed something important, like a more advanced approach that usually works better.

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

The problemset was good no cap. but it's really sad to see so many solutions being hacked. There's a lot to improve in testing.

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

so,is it rated?

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

fvck G

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

Wow... with what happening in G, I feel quite disappointed.

I could accept my code TLE'ing due to bad implementation caught in stresstesting, but allowing hacks to let loose because of validators going nuts?

Please, problemsetters, be extremely keen in validator writings. Crosstest and add various validator tests if possible. This is not even the first time in a long while this happened, and this problem even has pretty standard constraints that one shouldn't excuse of difficulty in writing conditional checks, so why letting the issue prevail?

I don't really want to disrespect the authors, the problems themselves are fine, but this time the underneath preparation has an absurdly critical hole that I feel like I need to raise my voice.

Proof that hacks go out of problem statements' defined boundaries, solution RTE with exit code 2226 is my personal indicator when that happens.

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

unrated

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

How come this test case passed for Hack

*******************************
*** The hack uses generator ***
*******************************

** Command line arguments **
no arguments

** Generated test **
999
100 100
100000 99998 99996 99994 99992 99990 99988 99986 99984 99982 99980 99978 99976 99974 99972 99970 99968 99966 99964 99962 99960 99958 99956 99954 99952 99950 99948 99946 99944 99942 99940 99938 99936 99934 99932 99930 99928 99926 99924 99922 99920 99918 99916 99914 99912 99910 99908 99906 99904 99902 99900 99898 99896 99894 99892 99890 99888 99886 99884 99882 99880 99878 99876 99874 99872 99870 99868 99866 99864 99862 99860 99858 99856 99854 99852 99850 99848 99846 99844 99842 99840 99838 9983...

** Generator source **


t = 999
n, m = 100, 100

print(t)

for k in range(t):
    x = 0
    print(n, m)
    for i in range(n):
        for j in range(m):
            if (j == m-1): print(100000)
            else: print(100000 - x, end = " ")
            x += 2

This is 1000*100*100 well beyond limits

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

Any idea why this code gets TLE on problem D ?

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

A-find if 2*a<=b if so you can buy all ns with a, else buy (n/2)*2 with b and if n is odd add 1 B-sort the matrix and find the first number and then insert it in a vector, add d n times and find the value and insert them all in vector, then add c to the initial value of the matrix row and do this n times too C-Kraken attack (k+1)/2 shots from the start and k/2 shots from the end, just iterate over the array from the start and from the end and decrease the value as much as possible, if it becomes 0 add it to the answer D-store the values of b in map, and the values of first m elements in map, while doing that check if the values is second map were smaller than the value count in first map , if so do matched++, now iterate over the other values of a buy keeping an l(left) remove the left and add the right, simultaneously updating the map ,and updating the matched values as explained. E-Just iterate over all values of length to be the ans, then just reverse the length k segment whenever you find 0 in the string, at last if all are 1s this k is possible, hence find the maximum of such k F-first of all ans is a/+b/2+c/2+d/2 because their xor will be zero as the same value repeats twice, secondly is one of the a,b,c is absent then no further action is required as they wont add to the ans because of the placements of 1's in their binary representation, but is a,b,c are odd that means 1 ans can be extracted out of these 3 values hence ans++

rest ask from a higher rated coder,thanks :-)

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

Why so many Hacks on G? Even mine is hacked. Whats ideal expected TC for G? Is it better than O(n*m*100). Rating of G has gone from 1900+ (yesterday) to 2500+ (now) on clist :(

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

Can someone explain to me how to approach problem F. I can only think when count of all 1,2,3 and 4 is even and when cnt(4) is even and count 1,2,3 is odd. These could be the 2 cases when bob can win. Unable to code the solution. thanks in advance.

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

    $$$cnt(4)$$$ is independent from the rest, so calculate it separately.

    For $$$cnt(1)$$$, $$$cnt(2)$$$ and $$$cnt(3)$$$, I prefer splitting into two cases:

    • Start from a state with all three values being odd, then subtract $$$2$$$ from each, add $$$1$$$ into answer each time.
    • Start from a state with all three values being even, then subtract $$$2$$$ from each, add $$$1$$$ into answer each time. Do not add $$$1$$$ at $$$(0, 0, 0)$$$ cases though, as there are no cards to play.

    Pick the better case out of the two, then add $$$\lfloor \frac{cnt(4)}{2} \rfloor$$$ in for the final answer.

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

    4 has independent bit compare others(1, 2, 3).

    So you can try O(N^3) DP on one, two, and threes.

    just calculate dp(one, two, three) + four / 2

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

255713576 Hey this is my first contest ever and only one of my submission got accepted. The thing is on running the same code for B , C and D I'm getting the required output but here on site it displayed otherwise. I understand that writing in python would slightly impact the time execution but probably shouldn't be the case up until i reach a way higher rating. So it would be great if someone could point out the logical errors if any or if there's way i should be submitting my code, thus providing me with pointers for the same. Thanks

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

i think it's time to give it a try to change my color

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

The time limit and constraints for G are so stupid

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

I am curios to know why I got TLE on test 35 in G: 255703960

It is simple, try all divisors of $$$a_{1, 1}$$$ with $$$O(nm)$$$ dp.

We will have maximum 240 divisors (from 720720).

So maximum $$$ \lt 5 \cdot 10^7$$$ operation. std::vector construction can be strange but time limit is 3 seconds, it allows use nearly $$$10^9$$$ operation I think.

So how could I gotten TLE?

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

    Some people with the exact same idea still pass for some reason. Very weird constraints and time limit.

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

    I almost have the exact solution too and it TLE'd in test 35. Then, I changed vectors to global regular arrays and it passed.

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

    Take my words with a grain of salt, but my suspect is that the alternating testcases here was not for show, but a deliberate attempt to cause cache misses and thus slowing down any time a "true" test begins, making it work with a worst-case speed every time.

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

    I also encountered this situation, and later I changed vis from a local vector to a global variable and it passed. I guess the 2D vector initialization in C++is very slow

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

    std::vector construction involves dynamic allocation (allocating from the heap). It is not a cheap operation. When $$$t = 10^4$$$ and $$$a_{1,1} = 720720$$$, you are doing it $$$240\times 10^4\times n$$$ times (times $$$n$$$ because you allocate for each of the rows). Which is significantly slower than just constructing once.

    Also, the nested std::vector<std::vector<...>> is not fully contiguous in memory, so you also get potential cache misses when you access the next row.

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

      Same code works fine locally though.

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

        By locally do you mean your own computer or codeforces custom invocation?

        Anyway, my point is that the difference between using a nested vector and constructing it many times, vs using a global array, is not subtle. And this could be a determining factor when the time limit is tight.

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

      can you please tell why vector::assign works faster than just creating it everytime with constructor?

      with constructor : 255927707, TLE

      with vector::assign : 255927628, 734ms

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

        Well, I believe that when using vis.assign(n, vector<int>(m)), you are only allocating one size $$$m$$$ std::vector (vector<int>(m)). While your code using the constructor, it is allocating $$$n$$$ vector of size $$$m$$$.

        When you use the vector::assign, it just tries to copy the second argument (vector<int>(m)) to each of the rows of the nested vector vis. Because initially every row of your vector vis had already allocated memory that could at least fit $$$m$$$ elements (you had constructed it outside the lambda with size $$$n\times m$$$), for each of this copy assignment, it doesn't require allocating any more extra memory.

        tldr: so you are allocating $$$n$$$ times less.
        number of heap allocation, worst case:
        constructor: $$$t\times d(720720)\times n$$$ = $$$10^4\times 240\times 20$$$ allocations
        vector::assign: $$$t\times d(720720)$$$ = $$$10^4\times 240$$$ allocations

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

H is interesting

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

=

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

Looks like CF have problems with allocation, this solution(https://mirror.codeforces.com/contest/1955/submission/255842530) works 11s on test generated by this code:


t = 10000 print(t) for i in range(t): print(20,1) for i in range(18): print(720720) print(1) print(720720)

But local run is 2s... When I removed allocation of used in check -- it passed with 0.8s on cf.

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

when will rating changes come out ?

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

Because of your terrible hacking in this round, it's fair for you to receive a large number of downvotes.

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

    Be rational at what you are criticizing.

    If there would be anything to blame, the most critical would be the absurdly tight TL on G, and even that wouldn't be generally agreed — tight TL isn't the end of the world most of the time.

    Hacking due to loose validators is worth criticizing, but not downvotes. Main tests didn't breach it, hacks did, so nothing went wrong within the round. They are also reversible (and already been so at one point, as most of the hacked solutions have been rejudged with a proper testset). What more to blame?

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

      Well, I downvoted cos I can see solutions I have the same complexity with pass for G, while I get TLE. Plus, you're everywhere :D

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

      Actually, I do think the problem G itself is created badly. I think a good problem should focus on examining the complexity of time or space, rather than optimizing constants, especially for a Div3. In that case, I think the data range should be at least 1.5 or 2 times looser than the optimal solution.

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

        I think it served that purpose normally. Judging that the original testset had nothing too strict in particular, I would say even the judges haven't really considered to stretch the constant optimizing, and only until a legit hack attempted to stress greatly into it, the complete revelation of contestants' bad implementations would begin.

        I think the data range should be at least 1.5 or 2 times looser than the optimal solution.

        Well, they did, kinda. You could compare some "good" implementations with the "bad" ones — and we only consider the "formal" solution i.e. BFS with all candidate divisors. Sometimes the difference go up to like 5-6 times, signifying the gravity of the issues which, in my opinion, have gone beyond planning.

        At this point, to blame the authors or not is pretty much a gray zone. Perhaps the integer constraints should have been $$$10^5$$$, but normally who would put that awkward limit for an array element in a number theory problem?

        I, however, believed that FST'd participants would take some responsibilities as well instead of fully diverting the blame. Cache misses and similar memory issues are actual things, and its nature is actually included in some fundamental teachings in computer science. It will be relevant if you wanted to pursuit this career later on, nonetheless.

        So perhaps we might be agreeing to disagree. It's fine that way though. I would only hope that we wouldn't bring down our judgment recklessly based on short-lived emotion bursts.

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

Can anyone tell what might be the reasons of showing correct answer in compiler and wrong in codeforces?

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

Will the submissions to problem G that only fail on invaild tests be rejudged? Like this submission and this submission

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

https://mirror.codeforces.com/contest/1955/submission/255667514 Why is my solution giving TLE, can someone please tell(problem B Progressive Square)?

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

too many downvote :)

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

Why are you downvoting this post so much? I think even with the problem G's issue it was a great contest

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

Yesterday, it told me during the contest that my solution for problem B was accepted and it was shown in th rankings too. Today, it says that my submission for problem B is still "in queue". And the rankings don't show that I solved problem B either. Why is this? Can someone please help me out.

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

Is it because a lot of Problem G solutions are getting TLE which is slowing down systest? The testing progress bar only went up by 2% in 30 min...

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

guys fst is your skill issue please stop downvoting

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

Can anyone help me figure out why my solution to D got TLE? Seems $$$O(n)$$$ to me.

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

how this code got accepted with 2999 ms in problem G

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

HELP HELP How to know when not to use Unordered Maps? or should i use just Maps always? Got TLE in 'B' bcuz of this BS

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

    Rule of thumb for Codeforces: always use a stable data structure if you aren't sure how to protect yourself while using heuristic ones.

    That applied to a variety of things: quicksort, hash tables, etc., even RNG.

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

Problem D ; RIP python users, most of the solutions got TLE for test case 11. My solution as well got TLE for test case 11 (sad face). Please look into this if possible

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

This has been my second contest on here, but why is it showing up as unrated? "Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you." — doesn't this mean it should be rated for me?

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

A<B<D<C<F<E

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

Why is this submission 255757792 for problem G giving TLE on test 35, but when using the same test on custom invocation, it finishes under 2 seconds. Don't the judge and custom invocation use the machine????

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

Problem E is the same as a problem for 2023 practice in my school.link