Evirir's blog

By Evirir, 21 month(s) ago, In English
A drawing of Evirir the dragon
Art by Evirir

Hello / Selamat sejahtera / 你好 Codeforces! ^.=.^

We, CSQ31, Evirir, and YouKn0wWho, are excited to invite you to Codeforces Round 994 (Div. 2) on Dec/20/2024 17:35 (Moscow time)!

In this round, you will learn more about Evirir the dragon and help (or stop) them as they wreak havoc and escape from a wizard.

You will solve $$$6$$$ problems in $$$2$$$ hours.

The score distribution is $$$500 - 750 - 1000 - 1750 - 2250 - 2750$$$.

There will be at least one interactive problem, so please read the guide for interactive problems if you are unfamiliar with them.

We would like to thank everyone who made this round possible:

Fun fact: As far as we know, this is the first round by Malaysians since 2020 (last being Codeforces Global Round 10)!

UPD: The score distribution has been added.

UPD 2: Editorial

UPD 3: Congratulations to the Top 5!

Div. 2:

  1. rainboy
  2. not_natural_fruits
  3. Aestivate
  4. trunkty
  5. 1.618034

Div. 1 + 2:

  1. Rubikun
  2. arvindf232
  3. antontrygubO_o
  4. StarSilk
  5. Otomachi_Una
  • Vote: I like it
  • +152
  • Vote: I do not like it

| Write comment?
»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Do you really think i will solve them?

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hoping for a fun contest!

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

frist connemt :D

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it +46 Vote: I do not like it

    :'(

    a5887f6b89ac42783fdb6cc94ba55ce71d345761

    • »
      »
      »
      21 month(s) ago, hide # ^ |
       
      Vote: I like it +25 Vote: I do not like it

      Well you see, the question of "who asked?" is simply a paradox. Since by asking "who asked?", you are implying that people need to be asked before speaking. However following that logic, you would have needed to have someone grant you permission to say that, because who asked you to say "who asked?" ? Exactly, nobody did, and nobody can ask anyone to give them permission to give you permission because no one asked them. And this perpetual loop never ends, creating a paradox.

      Created by @veryhungrydinosaur

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

hope you all get greens give your best with best wishes

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

orz Evirir

»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

finally a contest with interactive, orz Evirir

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

don't make C as interactive make D or E or F

»
21 month(s) ago, hide # |
 
Vote: I like it +24 Vote: I do not like it

Interactive problems are fun to solve. Isn't it?

»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

malaysian round lesgo

»
21 month(s) ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

Hope no negative delta this time.

»
21 month(s) ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

AAT, I really enjoyed the problems: it’s well-balanced and has something for everyone. Hope you all have fun solving it, too. GL orzz

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

judging by the drawing, this is going to be a banger [fire emoji lol]

»
21 month(s) ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

the frog is so cute...oh! its a dragon,my bad

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

LOL☠️☠️

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

orz CSQ31 orz Evirir rawr >////<

»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Score distributions??

»
21 month(s) ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

As a participant, i'm afraid of interactive problems

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Cute dragon.

»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

The FBI told me this round will indeed have problems.

»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

You will solve 6 problems in 2 hours. Tks!

»
21 month(s) ago, hide # |
 
Vote: I like it +25 Vote: I do not like it

You will solve $$$6$$$ problems in $$$2$$$ hours.

Really? Meoww~~~~~~~~

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Wait... 6 problems and 6 dragon balls? Are we summoning Shenron or debugging our way to a wish?

»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

dont make interactive problem in A-C

»
21 month(s) ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Tahun baru kehidupan mu menjadi lebih baik

»
21 month(s) ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

It's almost time guys,give us the score distribution.

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Score distributions?

»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

I guess 4th problem will be interactive or any easy 3rd problem as interactive

»
21 month(s) ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

SpeedForces incoming !!

»
21 month(s) ago, hide # |
 
Vote: I like it +38 Vote: I do not like it

MexForces

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Is E binary search on k? If yes, how?

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    I am wondering the same question. I tried multiple ways, I mean n has a constraint of 2^30 and there are 33 queries so there must be some sort of way to binary search on answer.

  • »
    »
    21 month(s) ago, hide # ^ |
    Rev. 3  
    Vote: I like it +24 Vote: I do not like it

    Yes, its binary search.

    Lets first split the array into 4 equal sized ranges. This is clearly possible since $$$n$$$ is a power of $$$2$$$ and at least $$$4$$$.

    If we queried these 4 ranges, we would either get back:

    • 3 "0"s and 1 "1", indicating that 1 represents the range with the hidden value, and thereby $$$\frac{n}{4} \lt k$$$. In this case, we binary search on the size of the range $$$[l, r]$$$, always ensuring it completely contains the range which returned $$$1$$$. Since this range will always contain the hidden value, the smallest size where the value becomes $$$0$$$ is your answer for $$$k$$$.

    • 3 "1"s and 1 "0", indicating that 0 represents the range with the hidden value, and thereby $$$\frac{n}{4} \geq k$$$. In this case, we binary search on the size of the range $$$[l, r]$$$, always ensuring it remains completely within any range which returned $$$1$$$. Since this range will never contain the hidden value, the smallest size where the value becomes $$$1$$$ is your answer for $$$k$$$.

    This naively takes $$$4$$$ queries for the first part + $$$30$$$ for the binary search which is $$$1$$$ too much. But we can notice that the result for the 4th segment can be uniquely obtained from the query results for the first 3 segments, reducing our total to $$$33$$$ queries.

    Code — 297544715

    • »
      »
      »
      21 month(s) ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Nice problem, thanks

    • »
      »
      »
      21 month(s) ago, hide # ^ |
      Rev. 2  
      Vote: I like it 0 Vote: I do not like it

      Nice problem and interesting solution!

      During the contest, I tried to split the array into $$$2$$$ equal sized ranges, then I was struggling with how to determine whether the return value is case $$$s(l, r)$$$ or case $$$1-s(l, r)$$$.

      I did not notice that by splitting it into $$$4$$$ equal parts, it is possible to identify the return value through counting number of $$$1$$$ and $$$0$$$. This is a really unexpected idea for me.

      Thanks for your prompt solution reply!

  • »
    »
    21 month(s) ago, hide # ^ |
    Rev. 3  
    Vote: I like it 0 Vote: I do not like it

    I tried to first do 3 queries on range [1, n/4], [n/4+1, n/2], [n/2+1, 3*n/4]. That way you can find where the 1 is present and if k is greater or smaller that n/4.

    Afterwards ask for [1, n/2] in case k >= n/4. If with that you discover k >= n/2 then you search including the half you know contains the 1, otherwise you search in the half you know it has only 0s. This way you can binary search as the function changes from true to false at a single value which will be k.

    I think the idea is right but wasn't able to implement correctly, please let me know if somebody finds any flaws.

  • »
    »
    21 month(s) ago, hide # ^ |
    Rev. 3  
    Vote: I like it +7 Vote: I do not like it

    I did 3 queries:

    1. with first query I can determine which of [1,n/2] and [n/2+1,n] gives answer 1 (because these two intervals have to give different answers.

    2. the chosen interval [l,r] is divided into two halves [l,m], [m+1,r] and they are queried.

    3. If those two answers are the same: that means [l,r] doesn't contain 1, and we also determine if k is in range [n/4+1, n/2] or [2, n/4].

    4. If the two answers are different: that means the [l,r] contains 1 and k is in range [n/2+1, n].

    In all these cases, the remaining part is very simple binary search on k.

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Solving D too slow made me fail to return CM, nooooo...

»
21 month(s) ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

F is cool

»
21 month(s) ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Question B's n constraint of 5000 kinda confused me for a bit, for a moment I thought it was brute force, tho it turned out O(n) is enough.

»
21 month(s) ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

"Submit code for E": 0:00:09

The submit site done loading: contest over.

Screw me over....

»
21 month(s) ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

agghhhhh, I solved B and C so slowly :( and just almost solved and implemented D in time.

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Slow specialist like us are tend to eat dust from the expert + CM. Time to upsolve and practice some more haha

»
21 month(s) ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

this contest was a pain in the ass

»
21 month(s) ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Yeahhh!! There goes my rating .

»
21 month(s) ago, hide # |
 
Vote: I like it +4 Vote: I do not like it
»
21 month(s) ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

MEX FORCES

»
21 month(s) ago, hide # |
Rev. 2  
Vote: I like it +6 Vote: I do not like it

Is there something wrong with the tests on D? Why did my N^4 solution passed?297536216

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

How to C?

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    do MEX operation as problem said, repeat it 10 times (probably only need 3 times, but I rather 10) and you AC

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Fix $$$x$$$ and $$$y$$$, then brute force every other position. You can see that there exists an answer with element value never greater than $$$3$$$.

    • »
      »
      »
      21 month(s) ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Can you please elaborate a little bit,i couldn't understand why and how?

      • »
        »
        »
        »
        21 month(s) ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        Without loss of generality, assume $$$(x, y)$$$ as $$$(1, y-x+1)$$$ (as the array is cyclic).

        We'll see that friends should have different value, thus we can fix $$$a_1 = 0$$$ and $$$a_{y-x+1} = 1$$$.

        Loop for all $$$i$$$ in range $$$[2, n]$$$ except $$$y-x+1$$$. Initially, $$$a_i = 0$$$. Keep increasing it until the first moment it is not equal to any of its known friends (known = elements that had been set before, that would be anything previous $$$i$$$, $$$1$$$ and $$$y-x+1$$$)

    • »
      »
      »
      21 month(s) ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      You can also do it without ever using 3, i.e., using elements 0, 1 and 2 only.

  • »
    »
    21 month(s) ago, hide # ^ |
    Rev. 2  
    Vote: I like it +1 Vote: I do not like it

    If $$$|x - y| = 1$$$, then if $$$n$$$ is odd, print $$$2, 1, 0, 1, 0, ....$$$, and if $$$n$$$ is even, print $$$1, 0, 1, 0, 1, ...$$$. If $$$|x - y| \gt 1$$$, if the number of dragon between $$$x$$$ to $$$y$$$ and $$$y$$$ to $$$x$$$ is even, then print $$$1, 0, 1, 0, 1, ...$$$, otherwise let $$$a_x = 2$$$, $$$a_{x + 1} = 1$$$, $$$a_{x + 2} = 0$$$, $$$a_{x + 3} = 1$$$, ... (I draw all of those cases and saw the answers LOL).

  • »
    »
    21 month(s) ago, hide # ^ |
    Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    If there wasn't another condition on x and y, then the trivial solution is

    • If n is even: 0 1 0 1 0 1 0 1 ... (0 1 repeating)
    • If n is odd: 0 1 0 1 0 1 ... 2 (0 1 repeating, then 2 at the end)

    But when there is another condition on x and y (And if they have the same parity), then you will have to make either a[x] or a[y] equal to 2 too. (Note: There is an edge case when n is odd and x == 1, y has the same parity as x, then you will have to make a[1] equal to 2 instead of a[n])

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    First, think about a simple cycle of size $$$n$$$. If $$$n$$$ is even, $$$[0, 1, 0, 1, \ldots, 0, 1]$$$ is an answer. If $$$n$$$ is odd ($$$n \ge 3$$$), $$$[0, 1, 0, 1, \ldots, 0, 1, 2]$$$ satisfies the condition.

    For this problem, there are at most two cycles in the graph, and they share exactly one edge. You can allocate $$$0$$$ and $$$1$$$ to the two vertices the shared edge connects, and do the above for each cycle individually.

»
21 month(s) ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

hopes shattered!

»
21 month(s) ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

Ok, I'm absolutely stumped by WA on test 1 in E.

My submission correctly guesses "5" for the first sample case when run in Codeforces custom test and locally (tried compiling with both -g and -O2) but incorrectly guesses "4" when submitted.

All queries are small enough to safely verify by hand ((1, 2) --> 0, (3, 4) --> 0 and (5, 6) --> 1) or the responses are present in the sample ((4, 8) --> 1 and (3, 8) --> 0) so I doubt that's the cause of the issue.

I also don't see any obvious undefined behavior in the code:

Spoiler

Can someone help identify the undefined behavior (or mistake in my query responses) that are causing the difference?

Edit: I know there is a different bug in the code for the if(cnt_ones == 3) { block, but the samples don't run it.

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it +11 Vote: I do not like it

    For $$$k = 5$$$, the response for $$$(4, 8)$$$ would be $$$0$$$ since range contains $$$1$$$ $$$($$$at $$$6)$$$ and length $$$= 5$$$ is atleast $$$k$$$.

    • »
      »
      »
      21 month(s) ago, hide # ^ |
      Rev. 3  
      Vote: I like it 0 Vote: I do not like it

      Oh, test case 1 and the sample are different...

      I looked at the output of test case 1 and the explanation of the sample even though those clearly make no sense together >.> (using $$$k = 6$$$ for calculations and considering $$$k = 5$$$ output correct lol, my brain was clearly fried today)

»
21 month(s) ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

losing too much time on ABC sadly, could've have enough for solve 1 more but I can't... maybe next contest :(

»
21 month(s) ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

Is there beautiful solution in C? Because my solution is $$$ififififif$$$.

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it +4 Vote: I do not like it

    You can break the big cycle down into 2 small cycles defined as (1) in between x and y, and (2) outside x and y. ans[x] = 0, ans[y] = 1. Then, for each cycle, we separately start from y and work through the cycle back to x, just alternating the values being 0 and 1. If we return all the way back to x and find that we placed 0 and 0 adjacent to each other, we make that last-placed value a 2.

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    I don't know if it's a beautiful solution but here is my solution : 297477253. I know that a[i]<=2, so for each i, I create a set containing 0,1,2 and erase a[i-1], a[i+1], a[x], a[y] if I've already calculated their value, then I take the minimum (I have no proof of why it works but it seems logical).

    • »
      »
      »
      21 month(s) ago, hide # ^ |
       
      Vote: I like it +5 Vote: I do not like it

      I have solved with 0,1 only and then use 2 for the x,y cases:

      for (int i = 0; i < n; i++) arr[i] = (i % 2);
          if (n & 1) arr[n - 1] = 2;
       
          if (x > y) swap(x, y);
          if (arr[x] == arr[y]) {
            if (x != 0) {
              arr[x] = 2;
            } else {
              if (n & 1) {
                arr[x] = 2;
                arr[n - 1] = 0;
              } else
                arr[x] = 2;
            }
          }
      
»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

B >> C

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    I thought B > C too while at it, but when I realize a trick in B it's simple

    (I'm on panic af ngl, losing so much time shuffling between B-C, also losing too much unnecessary time on A because I'm late)

    • »
      »
      »
      21 month(s) ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      I came up with some bs solution for b, what is the easy way to do it?

      • »
        »
        »
        »
        21 month(s) ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        Brute force :3.

      • »
        »
        »
        »
        21 month(s) ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        brute force it coz n is small. The idea is work around left bound and right bound of an element

        With every p or s, it limits the left/right bound. After that check if l<=r for all and no range is overflow (range of 2 can't contain 3 numbers)

        • »
          »
          »
          »
          »
          21 month(s) ago, hide # ^ |
           
          Vote: I like it 0 Vote: I do not like it

          Breh, that's what I did... ig I was just trying to shortcut a check to find if any range was overflowed and thus took too much time instead of being patient.

          • »
            »
            »
            »
            »
            »
            21 month(s) ago, hide # ^ |
             
            Vote: I like it 0 Vote: I do not like it

            I too, was panic so bad and losing too much time...

            I bet I can solve E with 30 more minutes sadly. (I pick E personally, coz I love interactives)

            • »
              »
              »
              »
              »
              »
              »
              21 month(s) ago, hide # ^ |
               
              Vote: I like it 0 Vote: I do not like it

              Also, NOOOO! ... I just realized right now that my implementation of D was all correct except for saying that i = 1, I had to say i = 0. This actually sucks.

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it
  1. why do you hate python? D1
  2. what went wrong here? D2

?

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    ugh, ok, I get the error in D2, it's due to LL handling in cpp :(

»
21 month(s) ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

Ad hoc forces, there goes my rating..

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I suck so bad in solving DP problems, can you please share me best dp practice set apart from cses dp a problem/practice set with less no of problems but more to learn... plz

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    Exactly!! The standard dp is easy to identify but dp when in disguise like this, its becoming impossible for me to identify

    • »
      »
      »
      21 month(s) ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Yup exactly, i am thinking to solve 1800 codeforces dp problems from now on then only i will become good in such problems

»
21 month(s) ago, hide # |
 
Vote: I like it +8 Vote: I do not like it
»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Can anyone help me understand B? i tried a brute force approach. 297536174

approach
»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Is D Dijkstra?

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Dijkstra can be used only in cases where the answer is monotonic.

    • »
      »
      »
      21 month(s) ago, hide # ^ |
       
      Vote: I like it +8 Vote: I do not like it

      I did Dijkstra correctly, but it's a bit slower than DP.

      • »
        »
        »
        »
        21 month(s) ago, hide # ^ |
        Rev. 4  
        Vote: I like it +3 Vote: I do not like it

        Your one already crosses O((n*m)^2) using three states and one loop. Its answer is monotonic.

        I am talking about two states in which the answer is not monotonic.

        • »
          »
          »
          »
          »
          21 month(s) ago, hide # ^ |
           
          Vote: I like it 0 Vote: I do not like it

          Fair, thanks for pointing this out. Can you clarify in what sense the answer is not monotonic here?

    • »
      »
      »
      21 month(s) ago, hide # ^ |
       
      Vote: I like it +4 Vote: I do not like it

      I didn't understand, what do you mean by "monotonic"?

  • »
    »
    21 month(s) ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    It's possible to Dijkstra this but it's essentially encoding the DP transitions as a graph and you get an extra log factor

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

My solution of $$$E$$$:

Note $$$left = ask(1, \frac{n}{2})$$$ and $$$right = ask(\frac{n}{2}+1, n)$$$, we can see exactly one of the following conditions holds:

  1. $$$ask(1, n-1) \neq left$$$;
  2. $$$ask(2, n) \neq right$$$.

Then we can choose either $$$[1, m]$$$ or $$$[m, n]$$$ to perform binary search.

Sadly can not implement in time ;)

»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Contest How much rating you want to lose?

Me: Yes

»
21 month(s) ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

Screencast of me solving in rust (4k would be ready a bit later)

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Is Mass Destruction the reference of A?

»
21 month(s) ago, hide # |
Rev. 2  
Vote: I like it +18 Vote: I do not like it

Codeforces Hot News!

Wow! Coder chenlinxuan0226 competed in Codeforces Round 994 (Div. 2) and gained -160 rating points taking place 4892

Share it!

»
21 month(s) ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Solution for d using recursive dp anyone?

»
21 month(s) ago, hide # |
 
Vote: I like it -10 Vote: I do not like it

But we are not natural fruits :(

»
21 month(s) ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Too hard question for Div2 A. Hadn't expected this :(

»
21 month(s) ago, hide # |
Rev. 2  
Vote: I like it +12 Vote: I do not like it

Subject: Clarification Regarding Plagiarism Accusation for Problem 2049B in Round 994 (Div 2)[contest:994][problem:2049B]

Dear Codeforces Team,

I hope this message finds you well. I recently received a notification regarding my solution (ID: 297506801) for problem 2049B, stating that it significantly coincides with solutions Keylime/297472936 and tinytroubles/297506801. This notification has deeply concerned me, and I am writing to provide evidence and clarify that I did not engage in plagiarism.

Evidence Supporting My Case: Independent Work:

I worked independently throughout the contest and did not collaborate or share my code with anyone. Submission History:

My submissions demonstrate the evolution of my solution: Incorrect Submission 1: https://codeforces.me/contest/2049/submission/297498579 (submitted at 20:56 UTC+5.5)297498579 Incorrect Submission 2: https://codeforces.me/contest/2049/submission/297500380 (submitted at 20:59 UTC+5.5)297500380 Accepted Submission 3: https://codeforces.me/contest/2049/submission/297506801 (submitted at 21:08 UTC+5.5)297506801 These submissions were made within close time intervals, showing a logical progression in my thought process. Geographical and Logistical Impossibility of Collusion:

I am from India, while the flagged participant Keylime is from South Korea (Chung-Ang University). There is no possibility of communication or collaboration between us during the contest. Coincidence in Logic:

The flagged solution (https://codeforces.me/contest/2049/submission/297472936)[submission:297472936] appears to share similarities with mine. However, given the nature of competitive programming and the brevity of the problem’s solution, it is not uncommon for different participants to independently arrive at similar implementations. Additional Evidence:

If required, I can provide timestamps, drafts, and any other supporting materials to further substantiate my claim of independent work. Request for Re-evaluation: While I understand the importance of plagiarism checks to maintain the integrity of the platform, I believe this coincidence is an unfortunate case of two participants independently arriving at similar solutions. I respectfully request a thorough review of my case, as well as stronger measures to distinguish coincidental overlaps from actual violations.

Thank you for your attention to this matter. Please let me know if additional information is needed. I hope this can be resolved fairly and with due consideration.

Best regards, tinytroubles,tinytroubles ... expecting a change Evirir

»
21 month(s) ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

This is my own implementation, and I have not shared my code with anyone or used any online tools like ideone. I implemented it entirely locally on my computer and followed my personal template, which I developed myself and use regularly for contests. Below is the template I used:

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

void solution() {

}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int test;
    cin >> test;
    while(test--) {
        solution();
    }

    return 0;
}

And here is the full code I submitted for problem B:

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

void solution() {
    ll n;
    string s;
    cin >> n >> s;

    bool flag = true;

    bool p_exist = false;
    for(ll i = 0; i < n; i++) {
        if(s[i] == 'p') {
            p_exist = true;
        }
        if(s[i] == 's' && p_exist) {
            flag = false;
            break;
        }
    }

    bool s_exist = false;
    for(ll i = 1; i < n - 1; i++) {
        if(s[i] == 's') {
            s_exist = true;
        }
        if(s[i] == 'p' && s_exist) {
            flag = false;
            break;
        }
    }

    if(flag) {
        cout << "YES\n";
    } else {
        cout << "NO\n";
    }
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int test;
    cin >> test;
    while(test--) {
        solution();
    }

    return 0;
}

I received a message stating that my solution (link) is similar to another participant's solution (link).

The similarity might be due to the simplicity of problem B, which naturally leads to similar approaches among participants. Additionally, I submitted my solution approximately one hour earlier than the flagged solution, which supports that this is a coincidence.

I strictly adhere to Codeforces rules and have not engaged in any behavior that violates them. Please let me know if any further clarification is needed.


»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

This in regard for the my solution to problem 2049B(solution-297500190) of this round.

Please check the code as i always use this type of variables in all my submissions before Kindly recheck it for further clarifiation.

Also problem 2049A is also skipped and I haven't got any notification yet.

»
20 months ago, hide # |
 
Vote: I like it -9 Vote: I do not like it

the worst round of the year

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

    Why? I love this round. My best ever, Rank 5.

    and the problems had been good.

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

      the most important problems for many people (CD) were bad — D is just obvious dp and C is annoyning constructive

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

can someone explain me problem b.