ArvinCiu's blog

By ArvinCiu, 3 months ago, In English

logo

Halo, Codeforces! Ape kabar kitak? Nyi deu sit bau maang? 😍 😍

COMPFEST 16 is happy to invite you to participate in Codeforces Round 977 (Div. 2, based on COMPFEST 16 - Final Round) on Oct/06/2024 09:05 (Moscow time). The round will be rated. You will be given 2 hours to solve 5 problems, 2 of them will have subtasks.

Note the unusual time of the round.

The problems are written by ArvinCiu, CyberSleeper, athin, and joelgun14.

We would like to thank:

COMPFEST itself is an annual event hosted by Universitas Indonesia. It is the largest student-run IT event in Indonesia and competitive programming contest is one of the competitions hosted.

We hope you will enjoy and have fun in the contest. Muga-muga beja lan isa entuk biji apik!! 💪💪🔥🔥

Edit 1: Score distribution is $$$500 - 750 - (750+1000) - 2500 - (1750 + 750 + 1000)$$$

Edit 2:

Congratulations to the winners!

Div.2 :

  1. Xun_Xiaoyao

  2. Traumatize

  3. TurtleZW

  4. wullaaa

  5. cpy0512

Div.1 + Div.2:

  1. ecnerwala

  2. tourist

  3. ksun48

  4. StarSilk

  5. kotatsugame

Congratulations also to the first solvers!

COMPFEST team and participants

On behalf of the COMPFEST committees, we are glad that our Codeforces Round ran quite smoothly and we hope that you all enjoyed our problems. See you next year! 😍 😍

Edit 3: The editorial is up!

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

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

Pyqe will win COMPFEST 16!

»
3 months ago, # |
  Vote: I like it -8 Vote: I do not like it

Please highlight the unusual starting time

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

Tomorrow:

  • 1- 4am: Hacker Cup
  • 5am — 1pm: 8 hours of good sleep
  • 2 — 4pm: Codeforces
  • 4:30pm: School

weirdest one ever

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

    school at 4:30?

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

      China is very big country, but they use only one timeline. So if they live far from beijing, their time goes weird.

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

      It's a boarding school, so we have to go back on Sunday afternoon

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

        You don't have National Day Holiday?(In fact,I already went to school yesterday afternoon.I'm in the computer lab now.)

        As far as I know,the holiday in high school is always shorter than usual.

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

          We senior high school students hardly have time to relax on holidays.

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

    based sleeping schedule

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

    Could you tell where to participate in Hacker Cup?

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

    Never seen such a good contest time and duration for Chinese!

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

Never seen such a good contest time and duration for Chinese!

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

    I wasn't so excited by contest. Thanks to everyone who had contributed in this contest

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

As a participant, I registered.

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

Looking forward to the contest :DDD. Thank you everyone, especially errorgorn and ArvinCiu for the sigma helps!

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

Halo Codeforces! Muga muga kowe kabeh sehat.

Maturnuwun karo KAN, errorgorn, ArvinCiu lan juru susun acara liyane uwis isa ngadano mirror COMPFEST nang Codeforces. Muga muga kowe kabeh seneng karo soale, Muga muga kowe kabeh bedja, enthuk biji sing apik, lan aja lali seneng-seneng ngelakoni ujiane.

In English
»
3 months ago, # |
  Vote: I like it -30 Vote: I do not like it

I am unable to attend this contest just because of the start time. Many Bangladeshi students won't be able to attend in the contest

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

What is the score distribution?

»
3 months ago, # |
  Vote: I like it -31 Vote: I do not like it

Never seen such a bad contest time and duration for Bangladeshi!

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

    Never seen such a good contest time and duration for Chinese!

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

An odd times may change anyone's rating oddly.

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

Good contest time for me.Normal contest time is "unfriendly" for boarding high school students.

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

Good

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

Looking forward to it.It is a CF Round which I have a time to register(which hardly ever happen).

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

Hope to reach Cyan if i managed to participate in this contest....

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

The time of the contest is so wonderful for Chinese!

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

Nice time for Chinese!

Hello (Codeforces) 2021 :)

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

Cristiano Ronaldo nan paliang rancak.

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

good

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

hopefully this contest will be the start of a great journey ahead

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

when the contest will start tomorrow and how to join the contest?

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

Score distribution?

»
3 months ago, # |
  Vote: I like it -11 Vote: I do not like it

plz no mistakes LIKE last time...

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

Hoping for a great contest, especially with the 1am start time! Also please release the scoring distribution for the problems.

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

What about the score distribution?

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

GL & HF, and upvote for the time of the round :)

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

This is stupid, why can I only comment once in ten minutes

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

where is score distribution?

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

scoring distribution when?

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

score dist ??

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

Finally the score distribution is out!

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

AHHHHHHHHHH, continue getting TTTTtle... (4 times)

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

Is it just me or A is actually harder than B/C1 without the score distribution presented?

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

    The real order was C1 < B < A

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

      i solved A,B in the first 16 mins. and coudn't solve C1 :(

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

        you did better than me in first 15 minutes cheer up !!!!. It took me 12 minutes to just wrap A.

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

    I just made some predictions and... BOOM.

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

      Pretty much dislike guessing for a problem like this, it could have been a nice 1000-1125 point problem instead.

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

    agreed, A >>>>> C1 >> B. imo

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

      C1 seemed too easy for a C, B atleast had some implementation.(just my opinion)

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

      emm... why do I think A is easy (solved in ~16 minutes) and B is VERY hard (spend ~1h 40 min to figure out why it continues getting TLE)

      (and didn't take any look to C2)

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

    Felt the same thing

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

    +1

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

    ya i actually find a and b much more harder than c1

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

Why E3 only worth 1000 point? Isn't E1 and E2 just knapsack? Why 2500 point on them

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

    E1 could be enough for Floyd Warshall to pass. By the way, I'm surprised to hear that this is some kind of Knapsack problem.

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

      E2 => Knapsack

      E3 => Use Minkowski to optimize that knapsack

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

I solved A with just a hunch using priority queue, can anyone provide proof for the solution?

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

    If you do it in non-sorted order then basically, you would be making the average smaller, like if the average is non-intger then it gets rounded off. Now this rounded off number would be used for calculating the mean again and again, this way you would be affecting the largest number possible hence reducing the average by at minimum by 1. On the other hand if you via sorted order the maximum is never affected

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

D looked simple but was legit confusing once I tried solving it lol. Even E looked interesting. Welp :")

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

understood the issue. :)

My Disappointment Is Immeasurable and My Day Is Ruined! gg

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

Is it just me, or someone else also felt like E1 is much much easier than C2 ?

( hopefully I won't get FST , my comment is based on the pretests results. May be I might be missing something which is not covered in pretest) .

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

    Probably... In fact coming up with idea in C1 is harder than C2 imo.

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

      really?? Imo A is harder than C1, but I found C2 much harder than both.

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

        Problem A, I just had some senses that if I prioritize to take those smallest numbers to do the operation, then the answer will be maximum because the larger numbers won't be halved too early. Well, you're right. Actually it's hard to prove A that way so not everyone could do it smoothly.

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

          I also thought same as you can't prove the solution of A though but I think its greedy to always just chose smaller elements and that way it will be maximum

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

Speedrun.

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

E1 << D.

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

    I guess it was kinda obvious from score distribution

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

      So it is useful to see the score distribution. (For most contests)

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

How did C2, I got the intution that we need to find inversion_count on each update but was not able to code further don't know how to find it , plz help .

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

    The sufficient condition for the order to be valid is, if you denote min_pos[i] be the minimum position the $$$i^{th}$$$ person in this order, then you need to have min_pos[a[i]] < min_pos[a[i + 1]] for all $$$1 \leq i \leq n - 1$$$. So what we can do here is maintain the number of position $$$i$$$ such that min_pos[a[i]] < min_pos[a[i + 1]]. If this number equals to $$$n - 1$$$, then the answer the Yes, or No otherwise. Submission: 284562164

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

      Thanks, this was the first intution before i got to inversion count , Weep :)

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

      im so tilted, i came up with this with like 1 hour and 15 minutes left, and i just couldnt debug in time. thank you for the explanation

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

        Omg bro, you're so good, it's really unfortunate that you couldn't solve the problem

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

      sorted <=> no of inversions = 0 (neccessary and sufficient) , here because of permutation , we need lesser than inversions

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

      an alternative for so much if statements: 284600395

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

What was the approach for C1 kept staring at it thought it as easy question and made two wrong submission then realized it's not my cup of tea. Can anyone please explain me what was the trick in the question and also share your approach. Thanks in advance.

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

    The condition for the array to be good is that for every $$$a_i$$$'s first appearance in $$$b$$$, all elements that come before it in $$$a$$$ have appeared in $$$b$$$ before it.

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

    Basically first process all b in sequence which are unique wrt previous one, now basically you wanna check if it's elements are present in a in that order. But when there is a mismatch, this can only be fixed if that element which is now present in b has been processed sometime ago, so keep a set to keep track of all the unique elements that have been processed, if its there in set then we can rearrange it and make it feasible.

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

    Build an array C which only keeps first appearances, for example if b= 1 1 1 2 3 2 1, then C = 1 2 3. Then the answer is YA iff C is a prefix of the array a. After the first appearance of a student you can move him as you whish, so it only matter to compare first time of each one.

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

    Just check, In what sequence members are appearing, and then check whether the members who should present each section are appearing in same order? example : 3->4->1->2 are members who will be presenting slides then, 3->3->4->1->4->3->2 is valid whereas 3->1->4->3->2 is invalid (since 1 is appearing before 4)

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

    For an array $$$b$$$ to be valid, for all $$$1 \leq j \leq m$$$, the index of $$$b[j]$$$ in $$$a$$$ must be lower or equal to the number of distinct elements in $$$b[1:j]$$$.

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

    I thought of if initial b order is same as a then yes else no

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

Good contest overall. Love how it requires coding knowledge to solve problems, rather than relying on obscure mathematical concepts.

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

It seems difficult to make up for the remaining questions.

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

sortforces

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

Can someone explain why this submission to B fails?284540617

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

    Is the frec array cleared correctly?

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

    You modify $$$freq[i]$$$ for values of $$$i$$$ that are not in $$$a$$$, but only reset if for values in $$$a$$$.

    This input fails :

    input

    You should rather define vector<int> freq(n+1) in the while loop, this way you won't have to think of reseting your array.

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

      Thank you! For some reason even after realizing only the first n values mattered I still made a global freq array. I did eventually solve it, but I didn't figure out what the mistake with this submission was.

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

Can anyone tell me why I got wrong answer in this code ??

Is there any edge case I was missing ??

https://codeforces.net/contest/2021/submission/284596509

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

Good round, thanks.

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

Good round!!!
Thanks!!!

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

any sqrt decomp solution for C2 ?

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

    My solution used hashes. I noticed that if we leave only first occurence of each number in $$$b$$$, it must a prefix of $$$a$$$, that is both necessary and sufficient. I wanted to be able to calculate the hash of this transformation of $$$b$$$. It can be done with segment tree

    284558525 code

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

      nice approach

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

      Can you check my blog about this same solution? https://codeforces.net/blog/entry/134809

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

      Beautiful solution bro, I was able to boil down the problem but wasn't able to implement it.

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

      Done the same thing with hashing and seg tree

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

      I was trying to understand your code and had a few questions, in the initializer list for the parametrized constructor of the struct node, you have passed one argument to h, i.e. h(x). Looking at the constructor of the hint structure, this would mean that only h1 is set to x and h2 and h3 are still 0 right. But when you create the pref array, I believe all of h1, h2 and h3 are being set. Am I getting something wrong here?

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

        Either c++ magic or I was actually using only one hash lol. I copied this structure from one of my previous codes and didn't give it much thought

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

          Right, I checked locally, you're using only one hash. I really liked your idea btw, I was thinking of coming up with a hashing solution initially but I couldn't figure out how do I handle the zeros. Your idea of treating zeros as a length 0 object so that it doesn't contribute to the hash is really interesting.

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

Too tight memory limit for E2. Maybe 512MB or more would be better?

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

    You need only one $$$n \times n$$$ array and some $$$n$$$ arrays, what's the need?

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

      I built a Kruskal reconstruction tree which has $$$2n-1$$$ vertices, so I need one $$$2n\times n$$$ array which is too large for the memory limit.

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

        Instead of making dp on subtrees you can merge dps of two components when Kruskal merges them

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

it was my first contest just happy to give :')

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

Thank you for this round! So far my only rating loss was on COMPFEST 15, but today I got my revenge and became CM on COMPFEST 16!

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

I submitted by mistake the solution for C2 in C1 and it got accepted for C1 obviously, but the previous submission for C1 (which also passed all the test cases) was skipped and as a result my ranking declined and also my rating (seddddddd) please make the first submission for C1 only count...... ArvinCiu

284567403 got skipped and 284580672 got accepted. I want 284567403 this to be accepted instead as it was submitted well before in time than 284580672.

Thank you in advance.

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

    It is the contest rule that only the final submission counts and resub gets -50

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

This round A is the same of Luogu Simulation Game

Picture:

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

I finally became an expert this round!

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

What's wrong with my idea in B ? My idea is to increase the frequency of $$$a[i] + x$$$ whenever the frequency of $$$a[i]$$$ is greater than 1, keep the frequency of $$$a[i]$$$ at 1, and then calculate the MEX.

from collections import Counter

def max_mex(a, x):
    freq=Counter(a)
    arr=[]
    nfreq=freq.copy()

    for k in sorted(freq.keys()):
        if nfreq[k]>1:
            nfreq[k+x]+=(nfreq[k]-1)

        nfreq[k]=1
    
    mex = 0
    while mex in set(nfreq.keys()):
        mex+=1
    return mex

t = int(input())
for _ in range(t):
    n, x = map(int, input().split())
    a = list(map(int, input().split()))
    print(max_mex(a, x))

WA Link: 284609466

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

    Consider 0 0 0 0

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

      Thanks, I should've read the task more clearly on "after every operation we can increment any $$$a_i$$$ by $$$x$$$. I misread as we should only able to change the original $$$a_i$$$ s. Just iterating up to $$$n$$$ would be suffice rather than iterating on freq.keys()

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

    consider freq map has values [1,2] and [2,1] and x=1

    so nfreq will be same as [1,2] and [2,1] now when you are looping in freq , when 1 comes , it will inc the count of 2 in nfreq , but in freq, the count of 2 will remain same as it was previous.....so you just need to change freq to nfreq in that loop

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

I became a specialist in this round.

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

Hello guys.When will the solution be released? I think I need to add some ideas for learning how to solve problems.

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

Hi Mike, I would like to know why you have banned so many Chinese coders, I think you have mistakenly banned some of them in the same server room, and some of them have had their numbers banned but others have not, is this a mistake on your part?

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

    They all used secondary accounts to participate in today's round. Such behavior is unacceptable and violates the rules. I think this could be a good lesson. I spent the entire two hours of the round investigating and analyzing the situation because of these "jokers".

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

      So they got their solutions skipped or did you just remove them from official standings?

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

      But you only banned a few people, there are still a lot of people who weren't banned, isn't that a mistake on your part?

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

        No, it isn't Mike's fault. It's the owner of those accounts to blame. Also, don't make these meaningless accusations, especially when you don't have any contribution to the community. If you think there are other accounts that should be banned, you could tell Mike kindly.

        For those who can neither speak English nor show their courtesy in their comments, I feel sorry for their country for having such a group of low-quality coders. (FYI: This is not for ChatgptMini, it's to the commenter of the abusive words in Chinese which got removed afterward)

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

          You can not show your courtesy,too.

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

            Yes, and yet it has nothing to do with what I said.

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

              Why don't you think about why you've got 16 down? Think about what you're saying.

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

                They criticised Chinese alters and got downvoted, wow. Seriously, why do Chinese give alters a pass? I'm also a Chinese and I don't condone such behaviour.

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

          Firstly, I don't think it's embarrassing to not know English. Secondly, when you do not have enough community contribution, you should not use community contribution to evaluate this matter.

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

            Firstly, I don't think it's embarrassing for not knowing English, either. But I think it's improper to use Chinese to post comments (especially abusive ones) when the only allowed languages are English and Russian.

            Secondly, I don't see there's a connection between my own contribution and the matter I'm talking about.

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

              What I mean is, you shouldn't differentiate people based on community contributions. Moreover, I believe that Mike's behavior also contains certain errors, and the punishment for opening a small account should not be imposed on a large account, which is extremely unreasonable.

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

                What I wanted to say is if he thought there are some accounts Mike forgot to block/unblock, he could tell Mike. I believe this is the better way to contribute to the community instead of blaming Mike. Sorry if I caused any confusion.

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

                Are you supposing that the owners of your alts are not you? The one to be punished is you instead of your account, although the sudden ban without any warning is somehow annoying and unreasonable.

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

                  But the punishment should correspond to the behavior, not the owner of the account. The act of registering a small account has nothing to do with a large account.

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

              There is some stupid mass attack from Chinese users. All comments opposing their cheating are getting downvoted. Maybe they should try following the rules next time.

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

                That's not true. We're not cheating.

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

                  Chinese are not cheating but you're not Chinese……

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

                Fox dung to that. Do you really believe your community, whatever it is,have no cheaters? Think of that before you speak

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

                The cheaters cheated. Not the mass Chinese users.

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

                We are not cheating!Most of Chinese users are really strong.The cheaters cheated.Just like rapists rape women.But not all Indians rape women.

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

          This blog were deleted...

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

          I think you are the biggest joker.

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

          No, it isn't Mike's fault. It's Mike's and your fault.

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

      Will these people's accounts be unblocked after a period of time?

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

      If you don't have an idea how to reconcile with the remote judge of Luogu or to solve the cloudflare and DDOS problems of codeforces, then you don't have an idea how to go home.

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

        MikeMirzayanov

        Healthy humans are supposed to break out of the solar system.

        The goal should be clear.

        You can go home if you have no idea.

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

      Agreeing with the rules, but I would like to see if random people with multiple accounts are investigated, analyzed and banned, but not only the tops of the rank list. Otherwise, it is still unfair and amusing. Let alone if the rule is set reasonably.

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

      Thanks to Mike, we now have a great CP site with bad connection (for all the users) but more importantly, good discipline (for some of the alt users)! Which is the most important is obvious for everyone! sto MikeMirzayanov orz

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

        Lets cheer, for today is the day Mike spent 2h dedicated on such meaningful work!

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

      why use alt got banned but cheaters just got skipped?

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

      Then you shouldn't ban large accounts either, as it will make the efforts of many users in vain.

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

      Man, what can I say?

      74traktor and mike out!

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

      I agree with the rule, but I want to see more proof of it.

      I think some people have been wronged.

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

      Hey! Why giving mike downvotes? Has he done anything wrong? Let's upvote!

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

        Whether we downvote or upvote is decided by the content of the text, not by the sender.

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

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

        no fishing.

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

      i agree with the rule, but i think you maybe wrongly banned some of them because in China there are few IPs and many people are using the same IP to surf the Internet.

      to MikeMirzayanov

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

      Could you please show the method to tell whether the accounts are of the same person?

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

      That is to say, you should also ban orzdevinwang because he used zh0ukangyang account before. MikeMirzayanov

    • »
      »
      »
      2 months ago, # ^ |
      Rev. 23   Vote: I like it -38 Vote: I do not like it

      MikeMirzayanov

      麦克 蜜耳炸压懦夫

      You are joker.

      你是小丑。

      qijianci said.

      萎哥说。

      Your biggest mistake is to ban wo_shi_wei_ge during the game!

      你最大的错误就是在赛时封禁了”我是萎哥“!

      You will regret it for the rest of your life!

      你会后悔一辈子的!

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

      Laugh track analysis: laugh track analysis deleted

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

      Yeah some people have violated the rules.But they are not "jokers" at all.

      About the impolite comments the other people said,I feel sorry and ashamed.

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

      In China, if someone cheating in competitions, there will be a ban about only accounts which participate in cheating. It can be fifty or more people who using the same IP, so you should not punish by banning IP addresses, as this may affect many innocent people  Others are not obligated to take responsibility for cheating, even if their IP addresses are the same  

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

      Why Why Why,Why Why Why,Why is the punishment for people with trumpets worse than people who cheat, do you have any ideas, if you don't you can just go home

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

      Don't think you're an administrator you can just slander people, don't talk shit about people because you can't do it. You have no evidence! !!! codeforces, that is the administrator enjoys the highest power, you think I am copying, you brown it, you can even block my number. But the eyes of the masses are bright !!!!

      If you block me, it will let the oiers of the whole world know that codeforces admins are rotten!!!! codeforces will be infamous!

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

      Your recent complaint has been reviewed and found to be clearly unjustified. Submitting such complaints violates the Codeforces rules—this is clearly stated right in the complaint submission form. As a punishment, you are barred from submitting complaints for 7 days. Repeat violations will lead to more severe measures, up to and including the blocking of your account. Please do not submit any more unjustified complaints.

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

      How do you know? If a lot of classmates participate in their school's special computer room, they would have the same IP.

    • »
      »
      »
      4 days ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      what happened here lol

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

Can somebody please explain the solution of E1?

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

    You can use Floyd- Warshall to create a distance matrix of the maximum of all edges used to reach that node and then greedily pick the server that gives the lowest sum across all houses that need internet because constant is small.

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

      But how do you pick 2 optimal servers, then 3 optimal servers efficiently?

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

        Run 3 nested loops : one for each additional server, then on all nodes, then for houses that need internet. You also need a visited array for servers chosen already.

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

      Why is it true that if we pick a server for k, it will be choosen for a bigger k?

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

        Greedily, it always makes sense to select one of the p nodes as the server ... Hence, when a node is chosen for k it remains.

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

          Seems to me that it doesn't work that easily, guys. Sometimes it's hard to prove greediness, and I didn't see proof in your answers. Maybe, I'm missing something so answer, plz, to the following question.

          For example, if we install server in vertex 3 for k=1, then why it's not possible for k=2 to have set of vertices (1, 2) as an optimal solution with latency less than (3, 1) or (3, 2) or any other (3, *)?

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

          It's easy to prove that it's always optimal to choose one of the p nodes (if we have solution with server in node v which is not in one of the p nodes, we can choose node w which is p node and minimalizes maximum on the path from v to w, then move server from node v to node w and we have solution equal or better), but i don't know why do nodes remain when they're choosen

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

Can anyone help me with problem a , I wasted a lot time but couldn't come up with some with good logic

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

    my idea was that the last element will be max, if the previous two elements that make it are max. so how would you pair so that this happens?

    1.pairing anything with the max element only decreases the max element. so not advisable. 2. pair min with min? yes! it increases the overall min of the array without hurting the max.

    so, sort the array and pair min with min.

    284608545

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

    I used priority queue (min heap) & kept taking floored average of 2 smallest nos., popping those 2 from the queue, & pushing back the floored average, until just a single number was left in the queue. You can view my solution.

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

As an official contestant, I just wanna say that "Boss, Thirsty" and "Digital Village" are very cool problems! Congrats to the problemsetters!

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

Can anybody help me find what's wrong with my solution for B ? 284594624

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

    Try > 1 instead of > 0

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

      Unfortunately it didn't work, rep stores the number of repetitions in my case not the number of instances.

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

    okay so after a lot of headache i figured it out.

    the problem with my code was that it basically was only checking for "gaps" between numbers within the array. but it didn't try to fill the gaps after the largest array element.

    adding a while loop that tries to complete the array after the largest element using the same idea in the previous loop seemed to work.

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

When will the editorial come out? I would like to see the solution for problem D and E3.

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

Tutorial when? QwQ

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

Anybody else missed the round?

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

How C2?

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

    3 2 1 4 — array a

    1 3 3 2 1 2 4 1 4 — array b

    so positions in sorted order in array b for each integer :

    3 : 2 3

    2 : 4 6

    1 : 1 5 8

    4 : 7 9

    If and only if bold letters are sorted from top to bottom then YA otherwise TIDAK

    Try to think from here

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

      I had this exact idea and 40 min left in the contest. But couldn't figure out at all how to check if they are sorted or not in O(logn). Any hints or ideas?

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

        segment tree? I could not think other solution.

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

        after each update only two bold letter's values get changed , so it's sufficient to only check those two bold letters and the ones immediately after that total 4 , keep a $$$track[i]$$$ which says whether bold letter in $$$i$$$ > bold letter in $$$i - 1$$$ and also keep count of no of $$$track[i]=1$$$ on the flow

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

        You can use a heap to store the slides for each member. After any change, it's easy to pick the new earliest slide the user needs to present(it's just the top of the heap). This can be used to maintain an array of first slide, each member in the queue needs to present. If that array is sorted, the slides are presentable. We can keep track of number of indices where a[i+1] < a[i] after each query, for a sorted array, this would ofc be zero.

        Code(Python), fairly readable - https://codeforces.net/contest/2021/submission/284731038

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

I sort of understand the solution of B. But I keep getting TLE and I don't know how to optimize it. Can someone help me look at my code? It is 284575211. It should be pretty readable and it is basically brute force. Thanks a lot!

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

    Switch unordered set to a vector with size n and it should work.

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

      Thank you for the suggestion. I have tried to implement it with vector using the same idea and it did pass a few more test case. But still got TLE at testcase 9 284649489. I would appreciate any more suggestions.

      Edit: Actually I changed a few long long int to int and it passed but barely rt: 0.9(s). Is there a better way of tackling this problem?

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

        try inputting all numbers before actually doing any operations, it should be much faster that way

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

          Thanks it worked!! Is there an explaintion for that? Or should I just avoid doing operations while inputting?

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

            this way youre iterating n times exactly, so it cant TLE, in your previous approach for some inputs, you sometimes iterate over numbers redundantly,which leads to tle

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

    In your solution, the value is pushed forward until it becomes unique.

    Then consider the following test.

    1

    200000 1

    99999 99998 99997 ... 0 0 0 ... 0

    In this case, there will be no pushing until the first zero appears, but the remaining $$$10^5$$$ zeros will pass through all values greater than 0, which are also $$$10^5$$$ at the very beginning.

    Thus, at least $$$10^{10}$$$ operations will be performed in total, which is why TLE occurs, and the asymptotics of this solution is $$$O(n^2)$$$

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

      Thank you I understand. How should I optimize the solution? Basically how would I skip those numbers for a faster run time?

      Edit: I have a new solution that passed but the runtime wasn't great. Maybe there is a better way of dealing with this problem? 284650265

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

        I wrote my own editorial for this problem in this comment, the asymptotics of the solution is O(n)

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

Why still no editorial

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

getting wrong ans on test case 2(C1) please point out the error in my code 284584744

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

someone explain B

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

    Let A be the initial array. Note that the maximum MEX cannot be greater than n, since there are n total elements in the array. Let the array C contain the number of elements with the value Y in the array C[Y] = k, where Y is the value of the element, k is the number of Y in A (Since MEX is not greater than n, then it makes no sense to store Y > n values in C).

    Initially, we will go through the array A and for each of its elements $$$Z < n$$$ we will make C[Z] += 1.

    Now let's see which element we can't get in A. Let it be the element $$$el$$$

    Initially, $$$el = 0$$$. Next, we will use the following algorithm.

    If $$$el \ge x$$$ and $$$C[el - x] > 0$$$, then C[el] += C[el-x]-1. If we have several identical values, then it is optimal to change all but one, because MEX will not became lower from this. Using the C array, we push the elements further, leaving only unique values behind.

    If $$$C[el] > 0$$$, then el += 1, otherwise we will not be able to get the value of $$$el$$$ in the array A, which means the maximum MEX will be equal to $$$el$$$

    The asymptotics of such a solution is O(n)

    Edit: Code of this solution — 284652327

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

      I understand now thank you. I am supposed to move all duplicates at once instead of one by one.

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

Just woke up from my long slumber(my brain crashed while giving my worse possible Hacker cup, so I had to) and was looking for the Codeforces contest, and realizing only now, I have already missed it

»
3 months ago, # |
  Vote: I like it -11 Vote: I do not like it

anyone solved C2 with merge tree ?

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

nvm

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

Can somebody help me with my code for B? Why does it fail. Cannot seem to find any counter test case on my own — Link to code

  • »
    »
    2 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it
    1
    5 1
    0 0 0 1 1
    
    • »
      »
      »
      2 months ago, # ^ |
        Vote: I like it +10 Vote: I do not like it

      Thanks for pointing the test case my code gives 4. It should have been 5. Can you please guide what am I missing.

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

        You don't consider case when after moving elements there is number x that wasn't in the initial array and freq[x] > 1. You should move this element too, in your loop you only check elements that were in initial array.

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

          Hey Thanks. Got the problem solved it by replacing vec[i] with just i. After your explanation.

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

We are still waiting for the Editorial :(

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

Mike,please tell me,why do cheaters only get skipped while using multi accounts is getting banned?(plz forgive my poor English.)

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

    Ask yourself,

    1) How many Voter cards you have ?

    2) How many LinkedIn Profile you have ?

    3) How many Students Profile you have at your college / school ?

    Now, one may argue, codeforces is neither voting platform, nor hiring platform or may be school. But, this is some other platform, we want to keep fairness. We want to keep single identity for one person.

    4) What do we achieve by keeping one account ?

    TRANSPARANCY and FAIRNESS.

    So many of the Chinese CP-athelets are ORZ. Only a fool would doubt that. Now, these ORZ-Chienese CP-athelets are already in Div-1 at codeforces. They create ALT accounts and gets higher ranks and the person who should get rank below 200, actually gets rank above 500-700 ( considering 400-500 alt accounts ).

    Now, coming to CHEATERS. They suck. They don't have brains. Some people cheat because they are looking for job opportunities. In India, if you are college student, one of the criteria for getting interview opportunity is, you have good rating on coding platforms.

    Cheaters suck, so do ALT account users.

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

      You are right, but I think cheating is more severe than having alt accounts.

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

      I see.However,skipping is in order to warn the cheaters before banning them,but alt accounts users DON'T get warned before they get banned.

      So why don't just ban accounts that were rigistered later but ban their all?

      Definitely cheating is more terrible than using alt accounts,but what mike is doing is like alt is more terrible.

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

        What do you suggest to do here ?

        Should we warn the ALT account user ? How do we do it ? How does codeforces know, which two accounts are owned by same user ?

        If your government knows, you have two passports, then government will invalid one of the passports. Either you get notice or default. In case of codeforces, we don't have any other option to send notice or anything.

        I simply fail to understand, WHY DO YOU NEED ALT ACCOUNT ????

        are you trying to hide from others that you are still coding ? ( may be the solution to this problem is, codeforces provide some hide-profile mode )

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

          Then why do codeforces warn cheaters(by skipping) but not just ban them?

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

            You can ban them. Lack of awareness, or lack of knowledge, or may be pressure to get job makes people cheat.

            But literally everyone makes mistake. If the mistake is repeated multiple times, then of course you should get banned.

            Forgiveness is your answer !!!

            I don't know about others, but I believe in second chances.

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

              You give the second chance to cheaters,then why not give it to alt users?

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

                I assume cheaters are not insta-banned in case of misdetection by the system because it's half automated, not because they want to give cheaters a second chance. Catching alts is a more manual work and therefore the decisions are likely to be directly made by admins, so there is no reason to forgive them.

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

                explain the process to me, how can I give you second chance !!!

                I blocked your Div2 account, which was kind of useless. Your main account, where you are actually RED coder, is still active. what is wrong here !!!!

                I SIMPLY DON"T UNDERSTAND, WHAT EXACTLY YOU ARE FIGHTING FOR ?

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

          You like giving examples in passports, and you are radical.

          And the opinion you give once and again is, cheating is ok to forgive, while alt accounts are not. Using your strategy, its like using another person's passport is ok.

          I'll state why I think alt accounts are not as severe as cheating. Cheating is, you are not doing the problems on your own, but alt accounts on the other hand, to speak only on solving, legit.

          Now I'm going to answer some of your questions.

          Should we warn the ALT account user ? How do we do it ?

          Yes, we should warn the user just like the scenario in cheating. How? By sending private messages.

          If your government knows, you have two passports, then government will invalid one of the passports. Either you get notice or default. In case of codeforces, we don't have any other option to send notice or anything.

          One thing is to notice is that the problem with passworts is political, and in no case can represent alt accounts, as they were absolutely the different matter.

          I simply fail to understand, WHY DO YOU NEED ALT ACCOUNT ????

          Because you are not in a country in which competitions are very severe. If I create an account for training, but not competitions, it is only because you want to secretly solve problems and not to be noticed by other people or other orginizations.

          Another use is giving the sense of real competition. A master enters a Div2 contest, and he/she will not feel the atmosphere as before. However, this training is critical.

          And a another aspect is that codeforces has not implemented throughly "unrated register".

          Hide-profile mode is strange.

          And in your words, sir, I sense a high level of superiority. The internet isn't a place for quarrels, a problem should be discussed politely.

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

            You never explained one thing to me...

            WHY EXACTLY DO YOU NEED ALT ACCOUNT ?

            As a moderator, if I know, somebody is fake, and I know somebody is actually RED coder, pretending to be div2 participant,,, WHY SHOULD I LET that someone TAKE PART IN DIV2 another time ?

            explain this !!!


            Passport is radical, how about LinkedinProfile ? does that sound radical ? School/college profile, is that also radical ?


            This is my last comment on this topic, Please don't expect any revert back on these comments.

            I am deeply distrubed by these point less debate going on for "ALT USERS". I just fail to understand, WHY SHOULD A RED CODER BE ALLOWED TO TAKE PART IN DIV-2 contest pretending to be DIV-2 coder ? just for EGO BOOST ? . WHY NOT REACH LGM and boost your EGO ?

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

      Ask yourself,

      1) How many times can you lie before trust is broken?

      2) How long at most can you delay your credit card debt?

      3) How much can you hide before it all comes to light?

      Now, one may argue, codeforces is not a real-life platform. But, this is some other platform, we want to keep honesty. We want to keep pure integrity for one person.

      4) What do we achieve by prohibiting cheating?

      SINCERITY AND FRANKNESS.

      So many of the Indian CP-athletes are normal guys without any intellectual disabilities. Only a fool would doubt that. Now, these normal-Indian CP-athletes are still in Div-2 at codeforces. They create telegram groups and gets almost same ranks by transmitting their codes, and steal codes from the same room, and the person who should get rank below 200, actually gets rank above 500-700 (considering 400-500 cheaters).

      Now, coming to ALT ACCOUNT USERS. They suck. They don't have brains. Some people use multiple accounts because they are boring when Div1 contests are fewer and fewer. In China, if you are high school student, one of the criteria for getting a gold-medal opportunity is, you have good racing condition, in which you participate in real contests as much as you can.


      In a word, I think you are making NONSENSE COMMENTS (so was my imitation). You just SHOUT OUT, cheaters are bad, and alt accounts are bad, so we should ban alt accounts. What? For completely no reason. You have explained nothing but just done some simile tricks. I'm wondering why are you getting so many upvotes. Rediculous.

      In reply to your further comments:

      But literally everyone makes mistake. If the mistake is repeated multiple times, then of course you should get banned. Forgiveness is your answer !!!

      why can't registering an alt account be considered as a mistake? Registering an alt account, and cheating, are all banned in the contest rule, without any difference in severity level. If one can be forgave, so is the other. Let alone the ways Mike treats the two behaviors are completely different: a skip, with no rating decrease; and bans in both accounts.

      • »
        »
        »
        »
        2 months ago, # ^ |
        Rev. 11   Vote: I like it -26 Vote: I do not like it

        Since, not having open mind, THINGS WILL NOT MAKE ANY SENSE TO YOU.

        What "second chance" do you need in ALT account ? huh ? You create completely new account, and get into top 10 of div2. Just after participating in 3 Div-2 contests, you reach CM level. And then codeforces realises, nobody is this good, this must be some ALT account user. So, they will simply block your ALT account. Where is the problem in that !!!!! ( HOW DO I GIVE YOU SECOND CHANCE, EXPLAIN BRO !!! )

        Nobody knows, what is your ORIGINAL account, UNLESS, there is huge similarities between your code. You can change your coding style for ALT account.

        NOW, I SENSE LOT OF PERSONAL ANGER IN YOUR COMMENT. AND THIS ANGER IS COMING FROM EITHER OF TWO THINGS...

        1) YOU ARE USING ALT ACCOUNTS, AND YOU WANT TO KEEP DOING IT,

        2) YOUR CLOSE FRIENDS ARE USING ALT ACCOUNTS. YOU WANT TO SUPPORT THEM AND THAT'S WHY YOU ARE TAKING A STAND.


        You mentioned above...

        """I AM EXPLAINING NOTHING !!!"""

        what part of my comments don't make sense to you ???

        above comments are asking WHY NOT BAN CHEATERS, THEN WHY BAN ALTS. Cheating is worse than creating ALT account.

        I asked them counter question, WHY DO YOU NEED ALT ACCOUNT ? EXPLAIN IT TO ME !!! You already have one account, WHY NOT USE THE SAME ACCOUNT ? Are you trying to hide from someone, that you took part in the contest ???


        Cheater account still has an identity of its own, but ALT account doesn't have identity of its own. that's why ALT accounts should be immediately banned. In my opinoin, if cheater is caught cheating 3 times or 5 times, He also deserves BAN.


        Yes I am INDIAN, and YES I am NORMAL GUY. It took me 7-8 years with my inconsistent persistence just to reach CM level. I have been plagiarised on CodeChef for sharing my code with my Juniors during college time, just because I wanted to help them getting placements. But I never cheated on CodeForces, to get higher ranks. So yeah, I am average guy.

        NOT EVERY INDIAN IS CHEATER, AND NOT EVERY CHINESE CP-ATHELET IS ALT USER.

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

          ok do you play Genshin Impart?

          it is really a good game which fits Indians.

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

            One can learn from you, how not to take things personally.

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

              do you know why you has got 12 downvotes?

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

            Actually, the correct name is Genshin Impact, not Impart.

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

Editorial pls

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

When the editorial will be uploaded?

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

I want Tutorial for E3 so bad!!!

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

    Notice that the answer in samples is convex (meaning $$$a_i - a_{i+1} \ge a_{i+1} - a_{i+2}$$$). You can store dp as its first element and difference array. Since dif array is sorted, you can store it as multiset. When merging two dps, it's basically merging two multisets. You also need to count first element, but that's trivial

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

Could someone explain submission D of ecnerwala . I think we somehow need to store two dp arrays , but he has used only 1.

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

    Not too sure which two arrays you have in mind. Each row needs to (strictly) include one of the endpoints of the previous row, so our dp array just stores the min cost for each row assuming that this point is an endpoint; we don't care whether it's a left endpoint or a right endpoint. We do a left->right and a right->left pass to update these, in each pass we store 2 variables, one is the best value assuming we have included the previous row's endpoint, one is the best value assuming we haven't. Maybe that answers your question?

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

      But how does that satisfies the second constraint i.e. a new element is there in the current row? I think in that case left or right endpoints matters.

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

        When I say it includes and endpoint, I actually mean it includes the "point between the no day and the yes day". Equivalently, it must include a particular consecutive pair of days: either l-1,l or r,r+1

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

          I must truly commend your brilliance. Upon reviewing the details more carefully, if I understand correctly, you've stored the DP array in such a way that allows the use of indices $$$j$$$ and $$$j + 1$$$ from $$$dp[j]$$$ to compute $$$ndp[j + 1]$$$ (Left pass) , $$$dp[j]$$$ holds the optimal solution when the previous row covers the interval $$$[l, j]$$$ or $$$[j + 1, r]$$$, which enables the use of the interval that $$$[l, j + 1]$$$ in the new row where $$$l <= j$$$ and it doesn't matters whether it was left endpoint or right.

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

ArvinCiu Editorial please

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

Pyqe will win COMPFEST 16!

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

wasted 2 hours on A and can't solve codeforces div 2 A guessing style are harder than 3000 rated problems for me

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

    my very first solution which I guessed after 16 minutes of the virtual participating was correct but I used set instead of multiset

    but even though this is a very bad problem the author at least should have allowed the formula solution to pass by lowering the Ai range

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

unusual time -> meanwhile me = only get accepted a

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

Why is the editorial not pblished yet?

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

Explain to me, plz, algorithm for E1. Most of the solutions use Floyd-Warshall algorithm to calculate distances between vertices. Then for each k they greedily find next vertex to install server, and this vertex should reduce current latency the most. So if we have set of vertices-servers on the step k, then solution for k+1 contains all these vertices plus another one that have met the criteria I've described above. While it's clear for me that we should install servers in vertices where we need servers (and do not consider other vertices as candidates), it's more complicated to prove optimality of greediness on each step for k. Can you explain me, why greedy solution would be globally optimal?

For example, for k=1 I have to put server in vertex, say, 3. Why it's not possible for k=2 to have set of vertices (1, 2) as optimal solution so that latency of (1, 2) solution is less than (3, 1) or (3, 2) or any other (3, *) solutions?

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

    Exactly, otherwise it would become a NP-hard problem i guess.If you got to know the answer to this doubt, please let me know!

»
2 months ago, # |
  Vote: I like it -24 Vote: I do not like it

so we're not sure whether we will use codeforces for the next time.

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

In some ways, codeforces has been disabled too.

»
2 months ago, # |
  Vote: I like it -10 Vote: I do not like it

Compared to banning small accounts, Mike should pay more attention to user experience, such as the lengthy evaluation times (often taking several minutes to get results after submitting a problem during contests), the various negative impacts caused by Cloudflare (which can take nearly 10 minutes before a contest), and the frequently crashing website (especially in China, where Codeforces is very slow to access and sometimes inaccessible for hours). As a well-known platform, Codeforces should work on improving its servers.

——This is ChatGPT 4o's opinion on the matter.

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

    why dont you give your own opinion instead of gpt lmao

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

    A small piece of advice: next time, it's better to ask ChatGPT in English, so that it will generate English contexts for you, and you don't have to do stupid (and wrong) translations from Chinese to English.

    Another piece of advice: you should reply to Mike instead of replying to the whole post.

    Anyway, if you want to tell me that your comment is generated by ChatGPT, I think it shows that you do not understand / support your comment, right?

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

Why hasn't the official solution been made public yet?

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

When will the editorial be out? Seems to be taking longer than usual..

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

orz

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

Dear YocyCraft, we heartily miss you, and your small editorial. We didn't get any editorial for last context from almost 1.5 days.

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

When will the editorials for this round be published?

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

When can we expect the editorial to be published?

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

    Hello! The editorial is currently in progress. Thanks for your patience, stay tuned, it’ll be ready soon! 😍 😍

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

Editorial Please!!

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

Editorials?

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

Editorial When?

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

Can someone tell me why this contest doesn't have a editorial?

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

Editorial pls!

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

So why isn't the editorial added?

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

ArvinCiu Editorial Plsss

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

editorial where :(

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

Hunting Editorial

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

Still waiting for the editorial.

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

editorial waiting room

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

solution to C2 really seems dirty with no exception.. even jiangly's

is there any easier way to implement?

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

hello , recently i received a message from system stating that my submission https://codeforces.net/contest/2021/submission/284556726 matched with https://codeforces.net/contest/2021/submission/284580743 this submission.

I have used my local machine for code compilation and not any online compilers but still our codes matched to a very great extent. My submission was made quite before the another one. His submissions are marked SKIPPED .

can someone please tell me what should i do, clearly its a coincidence. Will my submission will also get skipped? ArvinCiu please look into it. Thankyou.

»
2 months ago, # |
  Vote: I like it -12 Vote: I do not like it

hello , recently i received a message from system stating that my submissions coincided with others solution. This is my solution for 2021A https://codeforces.net/contest/2021/submission/284537400 and it shows skipped even though i didn't receive any message for this one. My solution for 2021B was this Java solution https://codeforces.net/contest/2021/submission/284580891 which also shows skipped. And my solution for 2021C1 https://codeforces.net/contest/2021/submission/284591253 coincided with other solutions, i really have no idea how it coincided with others solution and i just use vs code for solving and don't use any online compilers. Thank you for your patience and i hope this misunderstanding gets resolved.

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

Hello , recently i received a message from system stating that my submissions coincided with others solution. I have been told that many others have found solutions similar to mine. But I really don't know how to match it. I write code in vs code and I don't use any online compiler. I try my best to solve the whole contest by myself... hope i was able understand, even i have solved two problems both are doing skipped show. my submission link : A. https://codeforces.net/contest/2021/submission/284545259 B. https://codeforces.net/contest/2021/submission/284600769

ArvinCiu

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

OMG YES FINALLY CONTEST IN 1PM

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

Hello , recently i received a message from system stating that my submission 284588336 for the problem 2021C1 coincided with others solution. I have been told that many others have found solutions similar to mine. But I really don't know how to match it. I wrote my solution on my local computer and didnt use any online ecompiler. It so happens that i took idea from a a similar question to solve this and this might have been the reason of solution being matched with other. But it definitely isnt copied and was written by myself.

ArvinCiu please look into it.

»
2 months ago, # |
Rev. 7   Vote: I like it -13 Vote: I do not like it

hello my submission of 284585378 got skipped for problem B. but i used the idea and code from one youtube video which was already posted before the contest so please review it and make my submission valid. I write code in vs code and I don't use any online compiler. I try my best to solve the whole contest by myself... my code is definately not copied from someone else you are mistaken please go through it once this is the link of that video that contains the idea and is already published much before the contest. so please review it.. https://www.youtube.com/watch?v=q2UYu3TS78E

ArvinCiu Thanks! [user:joelgun14][user:athin]

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

I'm not black!!!

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

Regarding someone[user:Shivansh_24] with the same code as me for question B during the competition.

I want to say, I did not cheat.

reason:His submission time is longer than mine,Obviously, he plagiarized my code.

Please be informed.

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

Hello organizing team, First of all competition was awesome, so thank you for that. My submission 284580743 was detected to be similar to subsmission 284556726 by codeforces model.

I received mail as this:-

"Attention!

Your solution 284580743 for the problem 2021C1 significantly coincides with solutions Garvit_Goyal/284556726, clerisyutsav47/284580743. 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.net/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."

My submissions has been skipped and it's first time it happened, I didn't even coded in any online platform nor copied code from anywhere. I request organizers to please look at this regard, My code template is same everywhere.I believe human reviewer would be able to distinguish it. I did copied my template from internet and our template do match slightly. But that happened coincidentally, none of the other solutions are matching. You can even look at the solutions from other competitions, none of them are similar to anypoint. Please look at it ArvinCiu

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

Can someone please take their time out to explain me why in the question E1, the nodes we choose for any value of K-1 , will also be included in the optimal list of servers for K ?

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

What is the limit of your Laziness ? You guys are still unable to come up with the Editorial of E ?

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

Confirmed

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

I can't read the source codes. When I click on the code it shows me N/A