jdurie's blog

By jdurie, 18 months ago, In English

Hi, Codeforces!

I welcome everyone to participate in Codeforces Round 877 (Div. 2), which will start on Jun/04/2023 17:45 (Moscow time).

The round will be rated for participants of Division 2 with a rating lower than 2100. Division 1 participants can participate unofficially in the round.

You will be given 6 problems and 2 hours to solve them. One of the problems will be interactive, so please read this guide if you are not familiar with interactive problems.

The score distribution will be 500 — 1000 — 1250 — 1750 — 2250 — 3000.

All problems were created and prepared by me.

I would like to thank:

Good luck to all the participants!

Update: Editorial is available

Winners:

  1. EmeraldBlock

  2. dog_of_Nesraychan

  3. tofudra

  4. lmqzzz

  5. LLyw6

Unofficial winners:

  1. arvindf232

  2. Vercingetorix

  3. Geothermal

  4. tabr

  5. maspy

  • Vote: I like it
  • +274
  • Vote: I do not like it

| Write comment?
»
18 months ago, # |
  Vote: I like it +67 Vote: I do not like it

As a tester, they will silence me, but I will give you an insight that shall give you an unfair advantage:

Problems are sorted in ascending level of difficulty.

»
18 months ago, # |
  Vote: I like it +27 Vote: I do not like it

As a tester, I enjoyed the round and found some very nice problems there!

»
18 months ago, # |
  Vote: I like it -14 Vote: I do not like it

Nice score distribution.

»
18 months ago, # |
  Vote: I like it +34 Vote: I do not like it

As a tester, ScarletS orz.

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

jdurie

»
18 months ago, # |
  Vote: I like it +16 Vote: I do not like it

As a tester, A comment saying that the pset is awesome (although I forgot the problems)

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

As a participant, I am glad that I will actually be able to participate at this time!

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +16 Vote: I do not like it

    You claim to be Java yet you solve using C++. Curious

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      Maybe he just likes to drink coffee?

»
18 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Thank you for an early score distribution!

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

InteractiveForces)

»
18 months ago, # |
  Vote: I like it +21 Vote: I do not like it

As a tester, I particularly enjoyed this contest, and I hope that you all can participate!

»
18 months ago, # |
  Vote: I like it +17 Vote: I do not like it

As a tester, the problems were very original and used ideas that I have never seen before.

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +19 Vote: I do not like it

    Why does the last part make me a little .... scared .....

»
18 months ago, # |
  Vote: I like it +23 Vote: I do not like it

As a non-tester please give me contribution to annoy the testers

»
18 months ago, # |
  Vote: I like it +3 Vote: I do not like it

SpeedForces vibes?

»
18 months ago, # |
Rev. 4   Vote: I like it -8 Vote: I do not like it

#876 before #875 ?

»
18 months ago, # |
  Vote: I like it +13 Vote: I do not like it

Will this round become #875 then?

»
18 months ago, # |
Rev. 2   Vote: I like it +26 Vote: I do not like it

Checker comment: wrong answer jdurie found an answer, but contestants didn't.

»
18 months ago, # |
  Vote: I like it -15 Vote: I do not like it

wow,through the tester,we can know the test is really good. I am looking forward to it!

»
18 months ago, # |
  Vote: I like it -39 Vote: I do not like it

As a tester, happy Chinese internet maintenance day!

  • »
    »
    18 months ago, # ^ |
    Rev. 2   Vote: I like it +14 Vote: I do not like it

    懂得都懂(

    Remark: for those (non-Chinese and Chinese alike) who don't understand what Sparky_Master_WCH1226 is referring to, look at the date of the contest, June 4th. It's the 34th anniversary of the Tiananmen Square massacre.

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

waiting...

»
18 months ago, # |
  Vote: I like it +13 Vote: I do not like it

As a tester I hope all you sussy bakas will enjoy the contest >w<

[insert an additional funny comment regarding the contest, with rizz]

»
18 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

z

»
18 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Will it be my "Promotion to CM" round?

»
18 months ago, # |
  Vote: I like it +4 Vote: I do not like it

D looks solvable from the score distribution. Hope to solve it ;)

  • »
    »
    18 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    was it !!!!!!

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      didn't manage to solve it :(

      • »
        »
        »
        »
        18 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        never judge a contest by its score distribution.

        Score distributions can be deceiving ...

        - author, drexdelta

        • »
          »
          »
          »
          »
          18 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          it was definitely solvable, I almost solved it as a specialist

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

It's so sad that I can't participate in this contest because of my courses

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

will there any panelty for wrong submission in CF Round 877?

  • »
    »
    18 months ago, # ^ |
    Rev. 3   Vote: I like it +15 Vote: I do not like it

    Standard Codeforces rules are applied. You can read them here (relevant section: judging).

    TL;DR: An incorrect submission that passes test 1, i.e. the (first) example test, but fails on another pretest, deducts 50 points from the score you would get by solving the problem. This means that each wrong submission decreases your total score by 50 points, but these points are only removed if you solve the problem with the wrong submissions.

»
18 months ago, # |
  Vote: I like it +69 Vote: I do not like it

why round delayed 10 min?

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    Perhaps, again, there are a lot of people who want to participate in the contest

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    There's randomly some 503 from codeforces.

  • »
    »
    18 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I need to sleep!

»
18 months ago, # |
  Vote: I like it +64 Vote: I do not like it

one refresh cost me 10 min delay

»
18 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Why delay of 10 minutes?

»
18 months ago, # |
  Vote: I like it +36 Vote: I do not like it

why 10 mins delayed??? please dont cancel todays contest.

»
18 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Postponed?

»
18 months ago, # |
  Vote: I like it +1 Vote: I do not like it

hopping it is not a queueforces round considering so many participants

»
18 months ago, # |
Rev. 3   Vote: I like it -10 Vote: I do not like it

I have opened several pages, in one it's showing the contest started , would you like to enter ? and all others 10 min delay

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    If u click the bottom of go to the contest page, it will tell u "the contest didnt start" xd

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Once you do click on enter, you get a notification saying "Contest has not started", so basically wait 5 minutes more.

»
18 months ago, # |
  Vote: I like it +3 Vote: I do not like it

OMG! more than 30k participants in division-2.

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

why 10 mins delayed??? please dont cancel todays contest.

  • »
    »
    18 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    You sent this comment with your other account 5 mins ago!

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      It isn't my account . I want to express the same opinion.

»
18 months ago, # |
  Vote: I like it +1 Vote: I do not like it

server seems very reactive now. Refreshes in nanoseconds

»
18 months ago, # |
  Vote: I like it +7 Vote: I do not like it

Why has today's contest got so many registrants?

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Rip m3

»
18 months ago, # |
  Vote: I like it +1 Vote: I do not like it

swapforces iykyk

»
18 months ago, # |
  Vote: I like it +18 Vote: I do not like it

This contest felt very, umh, 'unnatural' or just me?

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Welcome to codeforces

    • »
      »
      »
      18 months ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      So obvious bait comment tho.

      Yes, CF does have it's 'falls' here and there, but overall it's been doing a pretty good job.

»
18 months ago, # |
  Vote: I like it +14 Vote: I do not like it

just asking out of curiosity is it me only and others also noticing that A problem of past two contest are not that trivial which they used to be

»
18 months ago, # |
  Vote: I like it +33 Vote: I do not like it

Why so hard

»
18 months ago, # |
  Vote: I like it +1 Vote: I do not like it

nice round,nice me,and wanna an expert:)

»
18 months ago, # |
  Vote: I like it -25 Vote: I do not like it

As a participant , It is indeed unfortunate when you get the Pure constructive problems , some algo+constructive is way good , but pure constructive is unfair :/

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +20 Vote: I do not like it

    I was also stuck on problem C for a very long time, but I wouldn't call it unfair. It's just, unpleasant.

»
18 months ago, # |
  Vote: I like it +3 Vote: I do not like it

The problems are good, I like them. But they are a bit difficult. I have been stuck in the code implementation of problem D for a long time.

  • »
    »
    18 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    can i know what is the expected time complexity of D...i tried with O(n^2 * q) but it gave tle in pretest-9

    • »
      »
      »
      18 months ago, # ^ |
      Rev. 3   Vote: I like it +1 Vote: I do not like it

      My algorithm is $$$O((n + q) \log n)$$$.

      It can be observed that we have two possible outputs of Yes:

      1. The original string is a sequence of parentheses.

      2. The first continuous left parenthesis in the original string is before the first continuous right parenthesis, and the last continuous left parenthesis is before the last continuous right parenthesis.

      The above situation can be maintained using set.

      code

      • »
        »
        »
        »
        18 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        how is that possible??atleast u need to traverse the string once did u mean nqlogn

        • »
          »
          »
          »
          »
          18 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          looks at the constraints for n and q and time limit, nqlogn also wont get accepted

»
18 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Can anyone explain how to solve E?

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

could D be solved without lazy segtree??

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    Yes. We just need to store all occurrences of two consecutive equal characters and update these every query. This can be easily done with std::set. 208498566

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      had the same algorithm, knew i had to use segment tree, but i didn't know how to write it :(

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      yes, but what if a RBS cannot be formed before first occurence of '((' or last occurence of '))'. how are you finding that?

      • »
        »
        »
        »
        18 months ago, # ^ |
          Vote: I like it +12 Vote: I do not like it

        If the first )) appears before the first ((, no solution exists.

        Similarly, if the last (( appears after the last )), no solution exists.

        Now, suppose that the first (( appears before the first )) and the last )) appears after the last ((. If the first character is ( and the last character is ) (and $$$n$$$ is even), a solution always exists. I suppose you understand how we can make everything in between these a regular bracket sequence.

        Let's look at the beginning of the bracket sequence. It must be equal to ()()...((..., i.e. () repeated some (0 or more) number of times, and then comes the first ((. If you don't see why this must happen, you should try to come up with a counterexample.

        It should be obivous that this can be simply just be walked and it will result in a regular bracket sequence. Similarly, we can see that the sequence must end ))...()()(), which can also just be walked.

        • »
          »
          »
          »
          »
          18 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Got it, Im just stupid..

        • »
          »
          »
          »
          »
          18 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Thank you very much!!! Very good explanation!

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Just simple segtree with "find first non-zero element"

    Look at string. It is corrent, if and only if it looks like this:

    $$$()()()()()()()((-bla-bla-bla-))()()()()()()()$$$.

    We will work with pairs of elements. We can track those $$$()$$$ as $$$0$$$ in segtree and all others $$$(($$$, $$$))$$$ and $$$)($$$ as $$$1$$$. Now, to answer query, ask segtree for position of first $$$1$$$, and check, that this is $$$(($$$. Do following with reverse direction.

»
18 months ago, # |
  Vote: I like it +87 Vote: I do not like it

I ended up with this summation for E, but I don't know where to go from here.

$$$\displaystyle\sum_{i=0}^{m - n} {{n + i - 1} \choose {i}} (k - 1)^i k^{m - n -i}$$$
  • »
    »
    18 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    same

  • »
    »
    18 months ago, # ^ |
    Rev. 3   Vote: I like it +21 Vote: I do not like it

    I just got the idea, but you have to notice that the actual array isn't important at all. The expression you got is independent of it(you can also write a simple recurrence to see this independence). So you can assume that the array is made up of all 1s. So, now you have to count the number of m sized arrays which have <=n-1 number of 1s and subtract from the total.

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Same. In the first n gaps created by ai's, you can put any value except the value of ai following the gap

  • »
    »
    18 months ago, # ^ |
    Rev. 4   Vote: I like it +29 Vote: I do not like it
    $$$\begin{equation}\begin{split}\sum_{i=n}^{m} \binom{i}{n} x^i & = \frac{x^n}{n!} \frac{d^n}{dx^n} \sum_{i=0}^{m} x^i \\ & = \frac{x^n}{n!} \frac{d^n}{dx^n} \frac{x^{m+1}-1}{x-1} \\ & = \frac{x^n}{(1-x)^{n+1}} - x^n \sum_{i=0}^{n} \binom{m}{i} \left(\frac{x}{1-x}\right)^{n-i-1} \end{split}\end{equation}$$$

    Doing some substitution of variables to transform your expression into this gives the same summation as in the editorial.

»
18 months ago, # |
Rev. 2   Vote: I like it +4 Vote: I do not like it

hashtag ihateconstructiveproblems

»
18 months ago, # |
  Vote: I like it +13 Vote: I do not like it

if nothing FSTs i'll become M for the first time!!

btw can smb please tell how to solve E

»
18 months ago, # |
  Vote: I like it +8 Vote: I do not like it

y so hard :(

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    btw how 2 solve c :(

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it +11 Vote: I do not like it

      put all consecutive integers in a row. If number of column is not a prime then you are done, For the same column, each row differs by a non-prime.

      If number of column is a prime, then it's the same problem with swapping a series of number from (1- n) such that non of the adjacent number differ by 1. It's a bullshit problem imo

      • »
        »
        »
        »
        18 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        i finally know it, thx a lot :)

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it +13 Vote: I do not like it

      We can IF case $$$(n = 4, m = 4)$$$. Else, either $$$n$$$ or $$$m$$$ is at least $$$5$$$. Suppose $$$n \ge 5$$$. Then we can fill table this way:

      $$$1, 2, 3, ... m$$$

      $$$2m + 1, 2m + 2, ...$$$

      $$$4m + 1, 4m + 2, ...$$$

      ...

      $$$m + 1, m + 2, ...$$$

      $$$3m + 1, 3m + 2, ...$$$

      ...

      All differences will be either 1 or $$$km$$$, where $$$k \ge 3$$$. Therefore, each difference is not a prime. If $$$m == 4$$$ we can swap $$$n$$$ and $$$m$$$

      • »
        »
        »
        »
        18 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        i know it, thx for your number matrix :)

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      There is no rulebook that decides score distribution of problems, but,,, IN MY OPINION, C IS DEFINITELY NOT 1250 , and D IS DEFINITELY NOT 1750 .

      C could be 1250, if n * m is an EVEN number, otherwise, its difficult to find the solution when n * m is odd .

      Honestly I knew how to solve D, but I couldn't solve C even after trying for 1 hour 30 minutes. Why so hard C, and still 1250 points !

      • »
        »
        »
        »
        18 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        same 2 me. on task d you can easily think out to step many times on first "((" and last "))", and use segment tree and set to solve it, but on task c you hardly think out to swap rows to avoid prime difference.

»
18 months ago, # |
  Vote: I like it +14 Vote: I do not like it

TBH E is much easier than B, C and D, giving $$$a_i$$$ is just a trap.

»
18 months ago, # |
Rev. 2   Vote: I like it +2 Vote: I do not like it

Is the intended solution for F:

First check the boundaries (row 1, row n, col 1, col n) If the bad belt is not there, make a snake pattern that goes from (1, 1)->(2, 1)->(3, 1)->...->(n, 1)->(n, 2)->(n-1, 2)->.... and so on covering the entire board.

If you get an infinite response to this query:

this means that one of the internal cells are either < or ^. Binary search on the column of bad belt. To do that, make the snake pattern upto the column and mark the last cell of the column so that the cell exits the board. If you get infinite, r=mid or l=mid+1. After finding the column, the bad cell in the column can be easily found.


else: do the same kind of binary search, but with directions reversed.

If this is the intended solution, it has an awful implementation and what's worse is that idea-wise its not so hard.

  • »
    »
    18 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes, The idea of the problem is too easy, but bad implementation with binary search.

»
18 months ago, # |
  Vote: I like it +6 Vote: I do not like it

How to solve C?

  • »
    »
    18 months ago, # ^ |
    Rev. 2   Vote: I like it +4 Vote: I do not like it

    My approach--> We can fill the matrix starting from 1,2,3... row wise. For ex-> for n=5 and m=5 it will be - 1 2 3 4 5 - 6 7 8 9 10 - 11 12 13 14 15 - 16 17 18 19 20 - 21 22 23 24 25

    Now we see that difference between any two adjacent row elements is always 1 and difference between any two adjacent column elements is equal to m(i.e. number of columns). So we can just swap the rows or simply first we can write the even rows and then the odd rows.. doing any operation like this will make the difference between any two adjacent column elements, a multiple of m which will be non-prime.

    there is an edge case for n=4 and m=prime in which we can just do the same thing with columns.

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I am unable to write the matrix in a grid form, so please understand that after every hyphen '-' a new row starts.

  • »
    »
    18 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    This is my approach

    If m is not prime just go from left to right, top to bottom and increase one on each step

    Horizontal difference will be 1 Vertical difference will always be m

    If n is not prime just do the same but increase one from top to bottom (rotate the matrix)

    If both of them is prime it doesn't matter if we work on rows or columns, so we will choose working on rows

    The first row will be 1 to m Starting with the second row we will apply this approach:

    Find the largest element in the last row, let it be x Insert x+1 exactly below it (let it be mn) Add x+m (max number in this row, let it be mx) to the left of mn

    It is clear that the difference between mn and mx is always even because mn = x+1 mx = x+m mx-mn = m-1 (m is prime >= 4) Go from this mx to the left of the row decreasing one in each step Then go from mn to the right of the array increasing one in each step

    Now the row is finished with all numbers between mn and mx (inclusive)

    Now we need to prove that the vertical differences will always be either 1 or an even number

    If we ignore the first row Every number will have different parity than the two numbers on their sides, except the smallest one which will have the same parity as the number on its left side

    mn have difference of 1 with its top element which was x

    Each element on the left side of the mx of the last row have difference parity than its neighbours So when we set mx to the same parity of its top element and increase 1 on each step going to left, each element on its left side will have the same parity with its top element

    The right side of mn will always have the same parity with its top element because the mn have difference parity than its top element, its right side increase by one and its parent go one step with the same parity and then increase by one

    Note: we can get the next mn position if we go from right to left in a circular way (decreasing one on each step and when we are at position 0, we go to m again)

»
18 months ago, # |
Rev. 3   Vote: I like it +46 Vote: I do not like it

Man C sucks. It's one of these problems where you just have to mentally brute force different solutions until you luckily find one.

D is easier than C for me. Imagine training on 2100 problems for the last few days that require good intuition just to get bogged down by bullshit problem like Div2.C

  • »
    »
    18 months ago, # ^ |
      Vote: I like it -20 Vote: I do not like it

    How do such problems like C even get accepted?

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it +28 Vote: I do not like it

      as a tester, i found it brilliant, here is how i solved it :

      1) 1 is obviously good, so having continuous subarrays is excellent

      2) we only need to worry about the difference between the starts of the rows now

      3) 2x is always non prime, so something like 1 * n 3 * n ..... 0 * n 2 * n ..... will work

      and done, no logical jumps, nothing, just plain logic. Why do you dislike it?

      • »
        »
        »
        »
        18 months ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        I couldn't get the intuition how to solve it. I hate such problems where you basically have to guess the correct construction of the answer.

        • »
          »
          »
          »
          »
          18 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          does it seem like i guessed the construction even in the slightest?

          • »
            »
            »
            »
            »
            »
            18 months ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            The way of placing numbers row by row seems a bit guessed for me.

            You may argue that any solution to any problem is basically guessing the correct steps. Okay, that's fair. Still, this problem is pure construction of the answer, and you definitely need some intuition or experience how to do that. I couldn't think of anything for 20m, so I skipped it.

            • »
              »
              »
              »
              »
              »
              »
              18 months ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              its a div4G, so i immediately recognized it (well not quite, but close enough) https://codeforces.me/problemset/problem/1352/G

              the basic idea is just to go differences of 2, i think thats fairly doable

              • »
                »
                »
                »
                »
                »
                »
                »
                18 months ago, # ^ |
                  Vote: I like it 0 Vote: I do not like it

                I haven't solved that particular problem, maybe if I had, it would be easier for me with this one.

                There have been similar pure constructive problems in the past, and I managed to solve them pretty fast because I had solved similar problems before.

                Ik this again sounds stupid, since basically any solution is partially based on the previous experience. Nevertheless, I have my right to not like such type of problems, especially this one after not solving it :)

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  18 months ago, # ^ |
                    Vote: I like it +3 Vote: I do not like it

                  absolutely, you do, i explained why i liked it :)

»
18 months ago, # |
  Vote: I like it +10 Vote: I do not like it

Wasted 40 mins with 4 wrong submissions on D because I missed the observation that the segment length had to be even ;_;

»
18 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Nice D

»
18 months ago, # |
Rev. 3   Vote: I like it +2 Vote: I do not like it
Spoiler
»
18 months ago, # |
  Vote: I like it -13 Vote: I do not like it

Task C is easier than task B...

»
18 months ago, # |
  Vote: I like it +24 Vote: I do not like it

A,B,C is so hard for me :(

»
18 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Kept thinking about moving 1 and 2 as far as possible in B, but the idea was to bring n between them if possible.Took a lot of time to observe this :(

»
18 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Is this the correct logic for B: if 1 is on the first or last index swap 2 with the opposite end and vice-versa otherwise use the position of the n and swap such that n comes in between 1 and 2.

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    You just need to take n Between 1 and 2.

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    idea: 1. if 1 and 2 are adjacent to each other, find relative position of n and swap thee one that lies in the middle acc to their position (1,2 and n)

    1. if they're not adjacent, chhose any index b/w them and swap with index of n
»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

It's a great pity that I divided B into 8 situations and got +10...I was shocked when I tried hacking.

»
18 months ago, # |
  Vote: I like it +8 Vote: I do not like it

nice contest XD

»
18 months ago, # |
Rev. 3   Vote: I like it +12 Vote: I do not like it

How did so many people manage to solve C? Share your thought process and how you came up with the solution pls, it was so hard for me.

I noticed that we can just print 1 2 3 4 ... when m is even, for each row. I didn't manage to think that if m is non-prime we can still do the same.

I also noticed that we needed to make some integers have difference of 1 for the ones at the "border", so that odd — even will give exactly 1. But how to proceed further? I literally could not think of it

UPDATE: Thanks everyone, my thought process here: https://codeforces.me/blog/entry/116995#comment-1034794

  • »
    »
    18 months ago, # ^ |
    Rev. 3   Vote: I like it 0 Vote: I do not like it

    Just think about:

    n+1 n+2 ...

    3n+1 3n+2 ...

    ...

    1 2 3 4 ...

    2n+1 2n+2 ...

    ...

    So C<<A for me...

    • »
      »
      »
      18 months ago, # ^ |
      Rev. 4   Vote: I like it 0 Vote: I do not like it

      5x5:

      6 7 8 9 10

      16 17 18 19 20

      1 2 3 4 5

      11 12 13 14 15

      21 22 23 24 25

      Ok got it, but how did you think of this solution? Just keep trying until something works? I could not spot this pattern at all during the contest.

      • »
        »
        »
        »
        18 months ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        Sorry, I used another similar plan to solve it. It has been corrected now.

        So for 5x5 this is ok:

        6 7 8 9 10

        16 17 18 19 20

        1 2 3 4 5

        ...

      • »
        »
        »
        »
        18 months ago, # ^ |
        Rev. 2   Vote: I like it +3 Vote: I do not like it

        if P is prime, then P+1 is never prime

        so you can do this:

           1    2    3    4    5
         p+2  p+3  p+4  p+5  p+1
        2p+3 2p+4 2p+5 2p+1 2p+2
        ...
        

        (rotating the rows) as you can see, a[i][j] and a[i+1][j] differ by p+1 or 1

      • »
        »
        »
        »
        18 months ago, # ^ |
          Vote: I like it +6 Vote: I do not like it

        If u know how to build table if m is not prime, you will notice, why this way doesn't work if m is prime. Now let's think how to fix it... Let's try to do the same thing but difference between two rows should be k * m, where k > 1. Well... it's clear that using odd rows at first and even rows then solves this task.

        • »
          »
          »
          »
          »
          18 months ago, # ^ |
          Rev. 2   Vote: I like it +7 Vote: I do not like it

          ok thats true, i guess i tunneled too hard on m == even or odd,

          I also didnt see that we can swap the rows directly, I tried other different patterns like +4 +4 +4 +4, zigzag, spiral, diagonals, and

          1 2 3 4 []

          5 6 7 8 []

          ...

          and then I couldn't fit the last column.

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    my thought process was

    First, if m is even, then we can just print the numbers in order. numbers in the same row will have difference 1, and numbers in adjacent rows will have an even difference (and nonprime since n,m >= 4)

    My second thought was if m was odd, then we could reorder the rows such that it goes (row 1, row 3, row 5. . . row 2, row 4, row 6 . . . ), but this didn't always work when n was even. For example with n = 4, m = 7 row 2 would follow row 3 and have a difference of 7 between them

    But I realized that when n is even, I could instead just mirror my approach for when m was even, going along the rows instead of the columns. Combining the 3 ideas, a complete solution is reached

»
18 months ago, # |
  Vote: I like it +12 Vote: I do not like it

Today I reach yellow if I don't fst

»
18 months ago, # |
  Vote: I like it +6 Vote: I do not like it

How to solve C?

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    Generate multiple for n%2==0 like 2 4 1 3 Else for n odd 1 3 5 2 4

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    Linearly assign numbers from 1 to n * m. If m is non — prime, that would be your answer. If m is prime, reorder rows such that the difference is multiple of m.

  • »
    »
    18 months ago, # ^ |
    Rev. 3   Vote: I like it +1 Vote: I do not like it

    I solved just after the round was over... I hope this is right... my approach:

    let's consider three cases.. 1) when n and m both are non-prime then the solution is simple, just print

    (1 2 3 4 5..m),

    m+1 m+2....

    because the neighbors will be {1,m,1,m}

    2) when n is prime and m is prime then let for 5 7,

    v[0]=1 2 3 4 5 6 7,

    v[2]= 15 16 17 18 19 20,

    v[4]....,

    v[1]....,

    v[3]....,

    i.e. first even ones,then odd ones or vice-versa because the neighbors will be {1,k*m,1,k*m}

    3) when n is non prime but m is prime try for 4 5 instead of horizontally like case 1, try it vertically

    (1 5 9 13 17),

    (2 6 10 14 18),

    (3 7 11 15 19),

    (4 8 12 16 20),

    because the neighbors will be {n,1,n,1}

»
18 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

D solution: Imagine the string as a continuous segment of open and close. Notice that if the segment size is more than 1, you can have whatever count you want for open/close, but you can not change the parity.

You can make a regular bracket in the end iff parity of open and close segments are the same + string start with open and end with close, in addition, before you encounter a segment of open that is larger > 1, the balance must be 0.

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The content of this competition is very good, can very well expand my thinking and writing code ability

»
18 months ago, # |
Rev. 3   Vote: I like it +9 Vote: I do not like it

A: We can only create non-negative new numbers, so if there's any negative number, output it. Otherwise all numbers are non-negative, since for any a,b we have abs(a-b)<=max(a,b), the maximum number of the list will not increase during the process, so we can output the maximum value.

B: If the permutation is something like [..., 1, ..., n, ..., 2, ...] or [..., 2, ..., n, ..., 1, ...], there are only 2 subarrays which is permutation ([1] and the whole array), since any subarray containing 1 and 2 will also contain n. And by checking for cases with n=3 we can see that we always can swap 2 elements of 1, 2, n to reach this lower bound.

C: If m is even, we can arrange the matrix like:

1 2 3 ... m

m+1 m+2 m+3 ... 2*m

2*m+1 ... 3*m

...

where absolute differences are 1 and m (since m>=4 and m is even, m is not a prime).

We can transpose this construction to solve for n is even.

If both m and n are odd, we can construce the last column like: [m, (n+3)/2*m, 2*m, (n+5)/2*m, ..., n*m, (n+1)/2*m], since n>=5 absolute differences of them are mutiples of m and not less than 2*m, so they are not prime. Then we fill other columns by ans[i][j]=ans[i][j+1]-1.

D: First the length of a walk will have the same parity of n, so if n is odd all answers will be NO. Also the first char of the walk will be s[1] and the last char of the walk will be s[n], so we must have s[1]=='(' and s[n]==')'. Otherwise, we need to look at occurences of "((" and "))" in the string. If their are no such occurences the answer is YES. Otherwise, consider the first occurence of them: the prefix contain the first occurence will be something like "()()...()((..." or "()()...()*)*...". For the second situation there's no solution, because when the first time we walk to * ) * the prefix sum will be -1. So the first occurence of "((" must be before the first occurence of "))". Symmetrically, the last occurence of "((" also must be before the last occurence of "))". If both conditions are satisfied, the answer is "YES" because the string will be something like "()()...()*((*...*))*()...()()", and we can walk back and forth on * (( * and * )) * to make the sequence regular.

E: Consider the subsequence in b[i] which is same as a[i] and has the lexical minimum sequence of indexes (that means, we find the first occurence of a[1] in b[i], and find the first occurence of a[2] on the right of a[1], and so on). Then numbers before a[1] cannot be a[1], numbers between a[1] and a[2] cannot be a[2], ..., numbers between a[n-1] and a[n] cannot be a[n], and numbers after a[n] can be anything. So let t=the position of a[n] in b[i], the answer will be sum(t=n...m)(C(t-1,n-1)*(k-1)^(t-n)*k^(m-t)), since m<=1e9 we need some mathematical tricks to calculate it.

  • »
    »
    18 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Important observation for D:

    You can use the first (( inf times, and the last )) inf times +- something to adjust, so anything between them doesn't matter

    Problem becomes symmetric as well

    Different method to solve would be to optimize this (messier than Yocycraft's solution, but easier to come up with i guess): 208507662

  • »
    »
    18 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    is there a simple way to do D?

    What i did is split into three separate check:

    • . Prefix check, single open must follow single close until encountering a non single open.
    • . Parity check (open and close must have the same parity)
    • . Reverse the string and do the same for close, except pretend close is open. the answer to query is only yes if all three above is true.
»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Maybe problem D, E or F were interesting. Unfortunately, B and C were so shitty that I couldn't read the rest

»
18 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Well, Question C screwed my mind for 1 hours straight

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve B , I did solved A & C , but overthinked B , my approach in B was to move 1 , 2 and max element in certain manner but could not proceed any further any help would be useful !

  • »
    »
    18 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I read that the idea was to put n between 1 and 2. I was trying to get the 2 away from the 1 as much as possible, but I dont know why that Idea didnt work, at least for me.

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Counter example:

      n 1 3 2 4 5... n-1
      

      trying to swap the number 2 with n-1 is going to result in 3 permutation subarrays.

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Doesn't work because:

      3 2 4 1 5

      swap 2 to index 1, becomes: 2 3 4 1 5

      Realise that 1 2 3 4 is a subarray permutation, but if we do: 3 2 4 5 1, we will not get 1 2 3 4.

  • »
    »
    18 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Your idea is correct. We need the max element ($$$= n$$$) to be between $$$1$$$ and $$$2$$$.

    Why?

    We can do the following:

    1. If the array looks like $$$[\dots, 1, \dots, 2, \dots, n, \dots]$$$ or $$$[\dots, 2, \dots, 1, \dots, n, \dots]$$$ (i.e. $$$n$$$ is after $$$1$$$ and $$$2$$$), we can swap $$$n$$$ and the last one of $$$1$$$ or $$$2$$$.
    2. If the array looks like $$$[\dots, n, \dots, 1, \dots, 2, \dots]$$$ or $$$[\dots, n, \dots, 2, \dots, 1, \dots]$$$ (i.e. $$$n$$$ is before $$$1$$$ and $$$2$$$), we can swap $$$n$$$ and the first one of $$$1$$$ or $$$2$$$.
    3. If the array looks like $$$[\dots, 1, \dots, n, \dots, 2, \dots]$$$ or $$$[\dots, 2, \dots, n, \dots, 1, \dots]$$$ (i.e. $$$n$$$ is between $$$1$$$ and $$$2$$$), we can do nothing = swap $$$1$$$ and $$$1$$$, for example.
»
18 months ago, # |
Rev. 2   Vote: I like it +27 Vote: I do not like it

An easy way to do C is:

if M even, just fill numbers row by row;

if M odd, then use the snake structure:

1 2 3 4 5 6 7

9 10 11 12 13 14 8

17 18 19 20 21 15 16

.....

then difference between every pairs will be 1 or even number larger than 4.

»
18 months ago, # |
  Vote: I like it +1 Vote: I do not like it

expected rating of problem D?

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    CLIST predicts 2200 (approx.)

    • »
      »
      »
      18 months ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      Hey, I was wondering whether clist rating is more credible or cf rating. They do differ significantly for a lot of problems. Edit: When I talk about credibility, I don't need the absolute rating to be perfect. I only care about relative rating. What I mean is if problem x is objectively harder than problem y, it should have higher rating than problem y. This way I can filter a range of problems effectively for my practice.

      • »
        »
        »
        »
        18 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Is cf rating a website or a browser extension? Can I get a link to it?

        • »
          »
          »
          »
          »
          18 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          By cf rating I meant the rating of the problem on codeforces website.

          • »
            »
            »
            »
            »
            »
            18 months ago, # ^ |
              Vote: I like it +3 Vote: I do not like it

            Ohh, I'm stupid. I don't know which one is better, but I don't think that the difference is very significant.

»
18 months ago, # |
  Vote: I like it +28 Vote: I do not like it

Thanks a lot for the contest.

»
18 months ago, # |
  Vote: I like it +14 Vote: I do not like it

Amazing contest I become pupil after it <3 <3.

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Could anyone help me with this code at problem D? Your text to link here... I get wrong answer on 4th query of test 4 (no instead of yes), but when i run my code locally it works. Does anyone know what could be the cause ?

  • »
    »
    18 months ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    If your code works in one environment and doesn't work in another, the reason is almost always either

    • 32-bit vs 64-bit environment, or
    • undefined behavior.

    Compiling and running your code with the -D_GLIBCXX_DEBUG compilation flag shows that your code is your code is attempting to dereference a past-the-end iterator. This is undefined behavior. Your code is too long, I won't try to debug it. But hopefully you can find and fix your bug with this information.

»
18 months ago, # |
  Vote: I like it +12 Vote: I do not like it

I'm blue!)

»
18 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Amazing Contest. Thanks to jdurie and all the testers! Also can anyone please tell the difficulty rating of A,B,C?

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it
Spoiler
»
18 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Why unr?

»
18 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Attention!

Your solution 208486016 for the problem 1838B significantly coincides with solutions ashish_ashish/208486016, khushi_kumawat/208493337. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.me/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.

I swear that I didn't cheat in the contest, and all the codes in this contest are 100% written by me. I didn't use an online IDE. I don't know the other users. The coincidence is caused by a trivial approach to the problem I believe many other contestants used the exact same method too,with very similar codes. I hope I can get my ratings back. Can someone help me please...

»
18 months ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it

Attention!

Your solution 208457479 for the problem 1838A significantly coincides with solutions BehruzbekRahimboyev/208454368, Kharsh21/208457479. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). I got a plag in my first question of this contest . it seems a coincidence because it is such a basic problem i see that the code is common but the question itself supposed to be common and follows the same procedure and also i used different #include which is my basic style it must be a coincidence . please have a look into it why would i cheat for a basic problem A the concept used is quite easy please ratify this .

»
18 months ago, # |
  Vote: I like it +5 Vote: I do not like it

I received an email from Codeforces stating: "Your solution 208509190 for the problem 1838C significantly coincides with solutions krishna699/208505958, hehe_trying/208509190." The latter of which is my own submission and was submitted at 22:14 (UTC +5.5), while krishna699 's submission 208505958 was submitted at 22:04 (UTC + 5.5). Although these submissions look similar, I had no contact with the inidividual. My intuition was to place the numbers row wise first filling all the even indexed rows(0-based indexing) and then the odd indexed rows. I did that in submission 208503781 which was submitted at 22:03 (UTC+ 5.5) (before krishna699 's) . This submission is same as my accepted one, but misses only the cases where one of n or m is 4 and the other is a prime number. I corrected this and resubmitted. Thus it can be said that I had figured out and submitted a solution at 22:03 (UTC+ 5.5), but it missed a case. I think this is evidence that my code is not copied.

»
18 months ago, # |
  Vote: I like it -7 Vote: I do not like it

Hello, I had got a message from Codeforces that my code matches with other user.

////////////// Attention!

Your solution 208467064 for the problem 1838B significantly coincides with solutions Ozymandias_Codeforces/208467064, Newbie0069/208486461. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.me/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked ///////////// Your solution 208484900 for the problem 1838C significantly coincides with solutions Newbie0069/208484699, Ozymandias_Codeforces/208484900. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.me/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked. ///////////////////////

I am a continuous user of this platform and solving problem on the platform. I hadn't cheated. The other user hasn't participated after that. He might have copied the code during contest. Also I have noticed that I was writing code in a Github shared Repository bymistake. Maybe that could be the reason of possible leakage of code, I am not sure but I haven't cheated.

My rating has improved from last few contests. Please don't revert it back. Kindly take actions on other user. I will make sure that my code doesn't leak from onwards.

»
18 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Today I got this warning message Attention!

Your solution 208499695 for the problem 1838C significantly coincides with solutions satyam533patel/208499695, sagar9647/208500861, lovedeep0529/208501082. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.me/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.

Neither i have copied my solution from anywhere nor I use any online compliler and i checked these solutions these are quite different also from mine code but don't know why I got this warning message Please help Thank you

»
18 months ago, # |
  Vote: I like it +16 Vote: I do not like it

Few days ago there was a problem with my laptop. So I used one of my friends laptop to participate in some contests.I forgot to logout from my account from his laptop. Now that guy logged into my account and copied my solution during the contest. I had no idea about the incident until I got a message from codeforces. I Don't know what kind of proof would be accepted or how can I prove what I'm saying. But I'm doing contests and upsolving for years in codeforces without any violation of rules. I would be grateful if you consider the situation and avoid giving me any penalties.

»
18 months ago, # |
Rev. 3   Vote: I like it +5 Vote: I do not like it

hello

  • »
    »
    17 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    lol this looks like it was generated by chatgpt

»
18 months ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it

Today I recieved this message all of a sudden:- Your solution 208499695 for the problem 1838C significantly coincides with solutions sagar9647/208500861, lovedeep0529/208501082. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.me/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.

I can ensure you that I have solved the code without any external assistance and with my own logic, I have implemented it. I have seen the solution of other users and they vary significantly from my solution. I have invested significant time and effort in solving this problem in an original and unique manner. It is disheartening to receive a notification suggesting code duplication. So, I request you to please resolve this matter.

»
18 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Dear MikeMirzayanov,

Attention!

Your solution 208488405 for the problem 1838C significantly coincides with solutions itzchefcoder/208479135, iseecp/208484606, CHIKU/208484766, bdyby002/208484863, goboy/208485085, Priyanshu_32/208485202, edu_7/208485343, TikolaNesla_/208486238, huntermarchi/208486721, 201112075/208487018, purav123/208487888, Abhirup2002/208488405, tusharkanwaria/208489293, Rico_027/208489305, ipl07/208489991, a02nimations/208492286, dualthread/208492659, harshit.raj2023/208495958, Zamiul043/208496376, ah260115/208497718, AMAR_TOMAR/208498184, JorgeKtch/208498312, alpy123/208498974, Trilok_Srivastava/208499138, klu_2100030586/208499643, Tohed812/208499809, sudo.sid/208499927, absolute_07/208500471, BittuSharma05/208500839, pushkariiitv/208501187, vilakshangupta2002/208501297, Aman_Soni_1502/208501584, Master_Noob/208501621, Dheeraj_33/208501704, PhoenixLulzsec/208502056, cheatme123a/208502245, callistopan/208502254, code_rider39/208502314, darkcoder.c/208502461, Guddu_111/208502463, lalith07/208502610, monster_within/208502619, Shivam_2020126/208502887, aarjavjain29/208502933, Aron_A_D_S/208503019, okm30/208503044, shashwat51/208503106, night_rider2004/208503342, 44312/208503357, Prince_001194/208503621, jhingran_king/208503671, haripriya_2404/208503738, saivaraprasad/208503765, Rajatkumar09/208503872, ritam.pradhan2002/208504035, klu_31800/208504181, gaurharsh012/208504212, joffery58/208504302, un_mole/208504466, jigyassharma7/208504650, eagleseye_01/208504674, sonali.verma.ece21/208504786, Alex_Wild_/208504789, Team_Omega/208504832, ayalghadban/208504860, shubham_sroy/208504903, Abhi02/208504917, deepanshu982001/208504935, CASTIAL_005/208505008, Colonel_mh3/208505061, MdAnas6757/208505240, a_rinwa02/208505470, Harsh_3703/208505798, wulver07/208505912, Ranju_27/208505955, tourist_____/208506030, Sunny1606/208506049, O-G/208506140, Aviral1908/208506316, LikithReddy123/208506358, 2000030370/208506516, vermastra/208506538, yuvithecode/208506875, MahaCoder/208507012, arnvv/208507442, Anonymous4650/208507550, neerajy_07/208507690, Coder__786/208507719, newbie_coder-15/208507858, Roshan18/208508026, yuvrajsinghdhakar/208508268, bkrayaguru931/208508570, bihari_guy_sensai/208508696, Vj_Rakshit/208509001, _2dvector/208509050, The_Blazing/208509088, riteshkantule/208509119, Jaiderbr/208509292, cr7bit/208509432, gunavardhan1230/208509618, moonshot_88/208509824. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.me/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.

II have solved the code without any external assistance and with my own logic, That question was a constructive algorithm problem and that type of problem can be solved with only unique constructive ideas which can be same for various people I have seen the solution of other users, there are some coincidences like the ways they have printed the result but all the other parts are different.I have implemented the code on my own. I am a continuous user of this platform and solving problem on the platform for a very long time. I hadn't cheated. I request you please resolve this matter.