thanhchauns2's blog

By thanhchauns2, history, 2 months ago, In English

Hi Codeforces!

Igorfardoc, Vladithur, Alexdat2000, gluchie, DeMen100ns, SPyofgame and me (spelling "thanh-chau-n-s-2") are delighted to invite you to participate in Codeforces Round #842 (Div. 2). This round will be rated for all participants with a rating lower than 2100.

This contest is brought to you by

Special thanks to:

Edit: there will be $$$2$$$ packages for two participants in Vietnam, the highest score and the luckiest. You have to set your region to Vietnam to be qualified.

The score distribution is $$$500-1000-1500-1750-2250-3250$$$.

Hope to see you in the final standings!

Editorial is out.

Congratulations to the winners:

Div.1+2 Div.2
1 arvindf232 drizzlo
2 Hyperbolic jiangly_fan_fan_fan_fan
3 drizzlo BedzieMagikZa2Lata
4 jiangly BeautifulChicken
5 Um_nik AE-3803

And the first solver for each problem:

A B C D E F
Div.1+2 dapingguo8 tourist youknowiknowyouknow A_G nok0 jeroenodb
Div.2 celestialcoder 1024mb youknowiknowyouknow MIOC69 cmk666 drizzlo
 
 
 
 
  • Vote: I like it
  • +593
  • Vote: I do not like it

»
6 weeks ago, # |
Rev. 3   Vote: I like it +29 Vote: I do not like it

As a slave~ setter, wishing you all peace, joy, and unconditional love at Christmas and always. And of course, with ++rating :Đ

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

    As a tester, love you SPyofgame

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

      love you SPyofgame orz

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

        As a person that likes the colour cyan, this post is just pleasing for my eyes.

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

          As a tester, I'm only GREEN.

          But they promote me to...cyan! Thanks a lot. >_<

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

            You are a green with the power of a grandmaster, and that is something to look up to.

            Spoiler
    • »
      »
      »
      5 weeks ago, # ^ |
        Vote: I like it -12 Vote: I do not like it

      I as participant i love you aineee

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    As a tester [insert joke]. I liked the problems as I've put some effort in upsolving, hope you'll enjoy them as well.

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

    It's hard to increase your rating by only one. ++rating

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

      I did that. actually

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

      prvocislo: And I took that personally.

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

        lol and then they removed cheaters and rating++ was gone :')

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

          Nah because it was ++rating++, the bonus score is the gift from the main route mission to LGM.

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thank you! I wish you the same! May this year be the cause of new titles.

    • »
      »
      »
      5 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Good luck to all! I want to become a student in this round! and thank you by the way

»
6 weeks ago, # |
  Vote: I like it +2 Vote: I do not like it

I am a setter.

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

As a do-nothing-setter, gluck everyone!

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

    As a do-nothing-setter, I found another do-nothing-setter and that's pretty POG.

»
6 weeks ago, # |
  Vote: I like it +19 Vote: I do not like it

As a tester, Merry (late) Christmas everyone!

»
6 weeks ago, # |
  Vote: I like it +21 Vote: I do not like it
Hi!
»
6 weeks ago, # |
  Vote: I like it +21 Vote: I do not like it

As a tester,this is my first time.Also,i want tell you something important

Spoiler
»
6 weeks ago, # |
  Vote: I like it +19 Vote: I do not like it

cyanforces

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

As a tester, I can guarantee that you'll find interesting tasks in this round! GL & HF.

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

as a tester, nya

»
6 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

Cyan Supremacy

»
6 weeks ago, # |
Rev. 2   Vote: I like it +8 Vote: I do not like it

As a tester, this contest is worth participating and learning how to brainstorm ideas efficiently. Good luck and have fun in the last days of 2022!

»
6 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

Um_nik will finally be deemed less worthy after this cyan round.

»
6 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

omg cyan round

»
5 weeks ago, # |
  Vote: I like it +85 Vote: I do not like it

Regardless of my experience testing this round, the problems are good.

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

omg cyan round :)

»
5 weeks ago, # |
  Vote: I like it +26 Vote: I do not like it

As a cyan tester, I recommend partipating

»
5 weeks ago, # |
  Vote: I like it +17 Vote: I do not like it

as a tester, this round is better

»
5 weeks ago, # |
  Vote: I like it +11 Vote: I do not like it

Hoping for a problem E solvable for me (to keep my current rating)

»
5 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

Please downvote me

»
5 weeks ago, # |
Rev. 4   Vote: I like it +14 Vote: I do not like it

Round of specialists! (NY's magic)

»
5 weeks ago, # |
Rev. 4   Vote: I like it +21 Vote: I do not like it

I enjoyed the "you" trick and the hidden text (doesn't work on the dark theme).

»
5 weeks ago, # |
  Vote: I like it +9 Vote: I do not like it

CYAN IS EVERYWHERE!

»
5 weeks ago, # |
  Vote: I like it +11 Vote: I do not like it

cyan round, so maybe i've got a chance

»
5 weeks ago, # |
  Vote: I like it +26 Vote: I do not like it
»
5 weeks ago, # |
  Vote: I like it +20 Vote: I do not like it

One of the most visually pleasing announcements!!

»
5 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

This round should be named "Specialists Round"

»
5 weeks ago, # |
  Vote: I like it +11 Vote: I do not like it

omg cyan round

»
5 weeks ago, # |
  Vote: I like it +7 Vote: I do not like it
great contest will arise tomorrow
  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    definitely it will be a great and awesome contest. So all the best. All the best everyone

»
5 weeks ago, # |
  Vote: I like it +17 Vote: I do not like it

How about every participant changing their color to cyan for this round ?

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope I don't become green after this cyan round.

»
5 weeks ago, # |
  Vote: I like it +52 Vote: I do not like it

1000 cyans versus a LGM, just as in the old days.

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

Hocus Pocus Abrakadabra , turn me into cyan

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Viet Nam contest legoo

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Cyan_Forces ✪ω✪

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

wow, Filled with cyan on all sides

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Very eager for upcoming contests!!

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

cyanforces

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Wow. what an environment.. cyan on everywhere

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

Help -is-this-fft- finish off 2000 problems.

»
5 weeks ago, # |
  Vote: I like it +19 Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

The most cyan round ever. It will be interesting!

»
5 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

so~so~so~so~so~green~ ovo!

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Why is everyone cyan now?

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

craynforces

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

"you" is a good highlight.

»
5 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Time for VietnamForces!!

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

Specialist Forces

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I like the specialist magic here! Good luck everyone, have fun!

»
5 weeks ago, # |
  Vote: I like it +13 Vote: I do not like it

Today I feel Vietnamese.

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

OMG. Cyan round.

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

Cool fact that div made by Russians and Vietnamese while im Vietnamese but born in Russia... Great job guys!

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Specialists are ___!

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Wish everyone can solve more problems in this round.

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

Nice editing for last point.

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Div2 finally, its my time to shine!!

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope to get Master again!

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

This second competition this new year. I'm sure this competition will be great for everyone. Good luck! Let +1000 be added to your ratings.

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Everything Cyaned !!

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I love you!

»
4 weeks ago, # |
  Vote: I like it +27 Vote: I do not like it

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

as a tester, wishing you the best, gud luck.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

is the contest unrated?

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

    Added that it's rated for everyone with rating < 2100.

»
4 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

how to calculate the contribution?

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I pressed on LG "you", but it shows me grey :|

»
4 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

THE ONE PIECE IS REAL!!!

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Excited for this round.

»
4 weeks ago, # |
  Vote: I like it +17 Vote: I do not like it

DeMen100ns, what the ..?

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Specialists Round!!!

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

https://imgur.com/a/ZzDKJuT

I cant relate tho I cant write 200 line solutions

»
4 weeks ago, # |
  Vote: I like it +26 Vote: I do not like it

As a tester, I became cyan.

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

I hope to become cyan in the cyanforces

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

just made it in time (i ran from the bus station), hopefully i won't turn cyan

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

excited!

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

All the best guys....

»
4 weeks ago, # |
  Vote: I like it +11 Vote: I do not like it

Speedforces!

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

Permutation forces

Loved it

»
4 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

Task F is really awesome!

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

As a participant I love Vietnamese Contest! (tks for free rating)

»
4 weeks ago, # |
  Vote: I like it +16 Vote: I do not like it

Permutationforces. I love it.

»
4 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

Any ideas for C?

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

    I was also stuck at C , what was your approach?

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

      Nothing special, was implementing whatever was coming to my mind

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

        What did you guy stuck on C ? You can check for da editorial, but you can also give your question here and I will reply :v

»
4 weeks ago, # |
  Vote: I like it -14 Vote: I do not like it

stupid speedforces

»
4 weeks ago, # |
  Vote: I like it +13 Vote: I do not like it

Why are there so many permutation problems?

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

From expert to pupil. I don't understand why this is happening...

»
4 weeks ago, # |
  Vote: I like it -11 Vote: I do not like it

A<F

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

    I am almost sure that 99% people simply saw the testcases and returned n-1 :P for A

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

      Anyone with > 0.5 braincells can see that n! = n * (n — 1)!

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

        i didn't see it and failed to solve A. how did u realize this observation?

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

      is this not correct??

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

        yes that is, but no one derived it I meant.

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

          i have 10 min i doesn't see that it ask for max i think it ask for min i tried binary search but when loking at sunmission rate i rewrite then just a second to solve k! + (k-1)! = (k+1)(k-1)! k-1 is best choice

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

    F>A

»
4 weeks ago, # |
  Vote: I like it +28 Vote: I do not like it

permutationForces.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Why would you do that??? So many problems on permutations! It's just ridiculously disrespectful for those who suck in this theme!

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Now its time to chnage the color After very long time

»
4 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Hate permutations, hate sortings, hate myself. Goodbye chance to become pupil :(

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

    +1 hate permutation problems, therefore hate this contest...

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I wonder how many people actually proved their solution for A.

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

    it was kinda easy to prove .

    take the (x-1)! common from (x ! + (x-1)!) which will end up giving this equation . (x-1)! * (x+1). take a x such that x+1 = k .

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

    It was clear to me that if there is a solution it should be k-1 to obtain the maximum number of factors from the factorial. To prove that this answer always works, I did a simple proof.
    for x = k — 1
    x! + (x — 1)! = (x — 1)! * (x + 1) = (k — 2)! * k

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

how to solve C anybody ?

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

Hi guys I have uploaded editorial solutions here — check.

have uploaded A,B,C for now and would upload D in a few mins :) let me know if you find these helpful :)

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

nice

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Permutation Round!!!

BTW, how to solve D?

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

    Permutation with inversion number can only be in form $$$s := {1,2, ...x-1, x+1, x, x+2, ...n}$$$.

    So the basic idea is to try each $$$x$$$, there are $$$n-1$$$ possibilities.

    When changing your permutation from $$$p$$$ to $$$s$$$, it is equal to swapping $$$x, x+1$$$ in $$$p$$$ and sorting $$$p$$$. It is well known that the minimum swap required to solve $$$p$$$ is $$$len(p) - component(p)$$$ (p after $$$x, x+1$$$ swapping). So we need to find $$$x$$$ that maximizes the number of components after $$$x, x+1$$$ swapping.

    Another conclusion is that if $$$a$$$ and $$$b$$$ are in the same component, then swap $$$a, b$$$ adds one component. Otherwise, if $$$a$$$ and $$$b$$$ are in different components, then swap $$$a, b$$$ decreases the number of components by $$$1$$$. So we need to check whether there exists an $$$x$$$ such that $$$x, x+1$$$ are in the same component~

    Besides, how to solve B???

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

      Best possible arrangement is for any N is 1 2 .... N , in sorted order.

      You just need to find the longest best arrangement possible

      For eg : N = 5 , A[] = [ 1 , 3 , 2 , 5 , 4 ] , the best possible arrangement that is already possible is taking [1 , 2] & not perform any operation on them as they are in longest sorted order & perform the operations on the remaining elements, taking the ceil of [Remaining elements / K] as the answer.

»
4 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

How to solve B, please??? A+C+D <= 40min. Unfortunately, I have no idea to solve B in the left time. I have to admit I am stupid.

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

    Find 1 in the permutation. On the right of it, find 2. Continue this process until you can't find the larger number. ( n — numbers you've found )/k is the answer (round up).

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

    check editorial here — click

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

    Yes, scan $$$1,2,3...$$$ in LEFT->RIGHT direction. E.g. dynamic regex: /\b(??{ $s })\b(?{ $s ++ })(*F)/

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve problem — B ?

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Please help in problem D My idea was to find minimum moves to make the array equal to the sorted permutation in which exactly one pair of adjacent elements is interchanged This gave WA

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

    try this example:

    1
    8
    5 2 3 1 8 6 7 4
    
  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    idea is the same just you have to make component s if the adjacent is not in the same component at all first we find all then all +1

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

very fast editorial

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

For Problem D , I tried with finding cycles for shifting/swapping. Then was trying something based on the cycle size. Something similar to min swaps needed to sort an array. but couldn't get it. Any ideas?

One observation I had was : to have exactly 1 inversion, we need i and i + 1 to be swapped , rest entire array needs to be sorted.

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

    You were correct in your approach and observation.

    Let x — min swaps required to sort the array. You just need to check if the cycle has a consecutive number then the answer is x-1.

    Else answer is x+1.

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

    yes thats the main observation after that you have to grp them (components) type then just find the ans

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

    Let $$$x$$$ be the min swaps to sort the array, let if $$$i$$$ and $$$i + 1$$$ are in the same cycle, you need $$$x - 1$$$ swaps to get the array where the only inversion is $$$(i + 1, i)$$$, otherwise you need $$$x + 1$$$ swaps. (can't really prove it tho)

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

Problem A is very bad for the CP contests, it is better for math competitions.

It is bad because it doesn't check any skills and knowledge because it was worth to try just $$$k-1$$$ after looking at the sample tests.

»
4 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

First time ranked top100 in div2. Hope for no FST!

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Any hints for D?

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

    i think this is a hint: answer is min swaps to sort + 1 or min swaps to sort — 1

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

      What I was able to analyze is that eventually our answer would look like 1.2.3.4...i+1.i....n So yes the answer should be the swaps to sort + 1 or -1 depending upon can we make the above state just before the last swap to sort. Now IDK whether this is correct or not but if we have some i which is at position(i-1) or (i+1){1 based positions} then we'd subtract 1 otherwise we'd add 1. Is the above correct? Please give reason as well

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

        Incorrect.

        1
        5
        3 4 5 2 1
        

        2 in position 3. But answer is 4. Because 2 and 5 (in position 3) belongs to different cycles (1 3 5) and (2 4). So you cannot in two moves get 1 2 4 3 5.

        If you'd get cycle likee 2 5 x x 1 (two consecutive numbers in one cycle) then you can in one move get 2 1 x x 5.

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

          the positions are 1 based but u gave 0 based.

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

            Ok, then that

            1
            8
            1 7 5 8 2 6 3 4
            

            You got cycle x 7 5 x 2 x 3 x, so you can in two moves do

            x 7 5 x 2 x 3 x
            x 3 5 x 2 x 7 x
            x 3 2 x 5 x 7 x

            So you need to substract one, but there is no such i in i-th or (i + 2)th position

            Reason: all cycles can be treated indepenedent, so in cycle with len l need do l - 1 moves to sort cycle, and if in cycle exists two consecutive numbers then you need l - 2 moves to get one inversion in that cycle.

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

        Incorrect

        1
        6
        6 5 3 4 1 2
        

        no such i but we'd subtract 1

        we cannot guarantee that the i is the inversion by just looking at this, this is actually my proposed solution in the contest :/ which i got Wrong Ans2

        Reason: idk, have some counter case

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it +2 Vote: I do not like it
    Hint1
    Hint2
    Hint3
    • »
      »
      »
      4 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yo, could u check my soln once? the one i wrote above

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

    Hint 1: A permutation has one inversion if and only if the permutation is $$$(i,i+1)$$$ for some $$$i$$$.

    Hint 2: The minimum number of transpositions from a permutation $$$\pi$$$ to change it to the identity is $$$n-c$$$ where $$$c$$$ is the number of cycles in the permutation.

    hint 3: The distance between two permutations is the distance between the permutation given by the composition of first with inverse of second, and the identity permutation.

    hint 4: count number of cycles $$$c_i$$$ in $$$p$$$ composed with $$$(i,i+1)$$$ for all i in O(n) time. The answer is $$$n- max(c_i)$$$

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

    Just check out this. All Will be clearminimum-number-swaps-required-sort-array Secondly check if there is any x+1=y element in the cycle.

»
4 weeks ago, # |
  Vote: I like it +7 Vote: I do not like it

Is problem C a little difficult to write? I wrote it twice.

Besides, the problems of this competition is very interesting.

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

    You know, it's permutationspecialistforces. :)

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

    I dunno, my solution was straightforward and simple :think:, maybe you can hack me I guess

    But as a setter, can you give detail for the issues you have to deal with during the contest ?

    Linear Solution for Problem C
»
4 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

WA on test 2 in problem C... can anybody help (188113413)?

»
4 weeks ago, # |
  Vote: I like it +7 Vote: I do not like it
  • Permutation of B Solved
  • Permutation of C Solved
  • Permutation of D Fucked Up Man
»
4 weeks ago, # |
Rev. 2   Vote: I like it +19 Vote: I do not like it
Spoiler
»
4 weeks ago, # |
  Vote: I like it +132 Vote: I do not like it

Is Um_nik stronger than 1000 cyans? Let's find out! Screencast with commentary

»
4 weeks ago, # |
  Vote: I like it -28 Vote: I do not like it

Problems A, B, C, D, and E were all very straightforward and meaningless to solve. With all respect to the authors, it was one of the worst contests that I participated in.

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

    I wish I could say this in some rounds.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

fuck this system bro i swear to god half of c submissions from youtube channels

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

    I hope all of those skipped! If you can make a blog as you spotted those similar solutions. Go on, Do!

»
4 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

finally cyan in the cyanforces <3

»
4 weeks ago, # |
  Vote: I like it +24 Vote: I do not like it

Ratings updated preliminarily. We will remove cheaters and update the ratings again soon!

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice

»
4 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

permutation_forces

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

So happy today !!! Became Specialist for the first time !!

Thanks a lot for the contest

I m shocked to observe that I somehow solved C in O(N)

»
4 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

Became Cyan (finally) in the Cyan round!

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

I would like to point out that the first to address F in Div.2 should be drizzlo. derekFeng's rating is 2746, and I think it may have been New Year's magic that led to an oversight on the part of the blog writers.


Updated:

Already fixed at light speed! Thanks again to the author for preparing such a great round and for the attention to feedback!

»
4 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Short Statements = Beautiful

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anyone help me figuring out why I'm getting runtime error for problem C on test case 7.I'm trying from 3 hours still not able to figure it out.Your time will be worth a lot.Thanks in advance . Here's my code 188125909

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

    Your code is such a mess. You can Google your exit code (-1073741819 )on test 7, it is something about memory access violation. My !guess! is x--; q[i]=*x; s.erase(x) Or x--; k.erase(x); p[i]=*x;

    But I haven't tried to fully understand what your program is doing

»
4 weeks ago, # |
  Vote: I like it +16 Vote: I do not like it

One of my favorite rounds, all of the problems have short statements and very clean solutions. I hope you guys author more rounds in the future!

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

.

»
4 weeks ago, # |
  Vote: I like it -10 Vote: I do not like it

Boring contest.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I became cyan for the 7th time. Thanks for this contest, created by 7 'cyans'.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Why are the top 2 in division 2 new accounts?

»
4 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

me sitting happy with +0 delta.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Solved only 1 but since it was div2, solving even one of them as a low rated newbie should have increased my rating. A few months ago, people who had similar rating solved 0 in div2 and still their rating got increased. For a newbie whose rating falls in (0-1000),solving 1 div2 problem is leading to downfall in rating, if it would have been div4,then it makes sense but it's div2 and still.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

MikeMirzayanov Hi, I received this message: Your solution 188082997 for the problem 1768C significantly coincides with solutions csegura/188082997, Sahil9259/188104072, UnRiVaLeD__/188104217, Frieza_Comeback/188106033, ashu1509goel/188107094, atharv_soni/188109171, BS_BISWA/188109314, POSEIDON_RAGNAROK/188119467, soumabha_12/188120764. 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.

I see that I was not skipped because I was the first one to submit the code; Good job in identifyng the copy. I don't use any online system, so it was leaked through the codeforces system. By the time that my code was leaked, it seems that the only person in my room that had closed the problem was coderpro2, so, if this is confirmed, in my opinion, actions against this account should also be taken.

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Got WA, can somebody help me? I still can't figure out the testcase which my code fails on. (188511376)

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I'm having a serious trouble solving Problem F with Java 8.I believe my code is essentially the same as the description in tutorial, but all I got is TLE in case 24/25. Is there anyone ACed this problem with Java? Or can someone tell me why my code is so slow?
Here's my code:188557390 Sorry for the trouble

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

    solved by fixing multiple mistakes. turns out I understand nothing of the solution :)

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I have been informed of an alleged matching of answer in my mail received from codeforeces, if possible, I would like a review of same because the logic of linked are same. I tried it 2 times I would like to see that and see my past submission they will look the same. I would really appreciate if it is reviewed manually..

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

Such a wonderful cyan text consisting of specialists' nicknames