desert97's blog

By desert97, history, 9 years ago, In English

Howdy Codeforces!

Come join us for a trip to Bovinia with everyone’s favorite munchkin Kevin Sun (ksun48) and his sidekick Nicky Sun (nsun48)! Codeforces Round #334 (for both divisions) will be taking place on December 1st, at 6:35pm MSK. The problems were written by Alex Wei (yummy), Michael Kural (pi37), and myself, Yang Liu. As proud Americans, we’ve themed all of our statements around the most glorious cow (and its many uses in life).

We are immensely grateful to GlebsHP for his guidance and suggestions, without whom we would not have a balanced problem set. In addition, we would like to thank MikeMirzayanov for creating Codeforces and Polygon, as well as Delinur for translating our problem statements to Russian. Finally, we would like to give a huge shoutout to Daniel Chiu (waterfalls), Kevin Sun (ksun48), Nicky Sun (nsun48), Weihang (Frank) Fan (pobelter), Ray Li (abacadaea), and Girishvar Venkat (numbertheorist17) for testing our problems and providing feedback.

We wish you good luck and hope you enjoy our problems and cow jokes. (We’ve milked our brains quite thoroughly for puns.) Come hop on the next cattlebruiser for Bovinia!

(Per Codeforces tradition, we will announce the score distribution just before the contest.)

UPD 1: Some added thanks to AlexFetisov and winger for also testing our problems.

UPD 2: The scoring will be standard (500-1000-1500-2000-2500) for Div 2 and 500-1000-1500-2000-3000 for Div 1. Good luck and have fun!

UPD 3: System testing is done! Congrats to the winners.

Division 1:

  1. subscriber
  2. rng_58
  3. Zlobober
  4. ecnerwala
  5. FreeMoneyCity

Division 2:

  1. matipau
  2. geniucos
  3. quasisphere
  4. emppu
  5. tranquility

UPD 4: The editorial is posted here.

Hope everyone enjoyed the contest! Comments about problem quality, etc. are also appreciated.

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

| Write comment?
»
9 years ago, # |
  Vote: I like it +150 Vote: I do not like it

moo

»
9 years ago, # |
  Vote: I like it +56 Vote: I do not like it

Looking forward to it!

»
9 years ago, # |
  Vote: I like it +39 Vote: I do not like it

Codeforces is getting colorful these days~

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It will be continued... Because the competition authors are competing with each other:D

»
9 years ago, # |
  Vote: I like it +185 Vote: I do not like it

Good Luck & Have Fun :)

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

    "Farmer John and Cows" are having a good day!

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

codeforces round starting times are going to confuse me...

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

If you are not into puns, this round may tear you up. :P

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

    Even those corralled minds who don't bullieve in excellent puns veal surely be mooved by our impeccowble wordplay.

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

      MoOOooOoMooOooooMooOooooMooOooooMooOooooMooOooooMooOooooMooOooooMooOooooMooOooooMooOooooMooOooooMooOooooMooOooooMooOoooo

»
9 years ago, # |
  Vote: I like it +10 Vote: I do not like it

is it a beef burger next to the cow?

»
9 years ago, # |
  Vote: I like it +19 Vote: I do not like it

Now this blog is what I call nice and precise announcement and I bet the statements will be really funny unlike the previous one.

»
9 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Very amusing blog :D Hope for some delicious problem set and saturating solutions and hacks :D

»
9 years ago, # |
  Vote: I like it +10 Vote: I do not like it

MMM... juicy beefs

»
9 years ago, # |
  Vote: I like it +44 Vote: I do not like it

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    MoOOOOoOMooOOoOoMooOOoOoMooOOooO MooOOoOoMooOOOOoMoooOoOOMooOOoOoMoooOOoOMooooOoO MooOOoooMooOoooo MooOoOOOMooOooooMooOooOoMooOOoOo!

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

    I'm sorry if it's a little bit racist but your skin color option on that drawing is pretty interesting.

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

      racist

      I don't think it means what you think it means.

      I wonder what skin fur colour you think bears have.

»
9 years ago, # |
  Vote: I like it +14 Vote: I do not like it

Could you add Cow++ compiler to Codeforces please?!

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

    NOOOoooo

    (Would add a picture of cow saying this if I had time :P)

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it +31 Vote: I do not like it
       ________________________________________
      < NOoOoOoOoOoOOooooOOoOoOoOoOoOoOoOoOoOoO >
       ----------------------------------------
              \   ^__^
               \  (oo)\_______
                  (__)\       )\/\
                      ||----w |
                      ||     ||
      
»
9 years ago, # |
  Vote: I like it +18 Vote: I do not like it

^^

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

    Challenge: Change position of at most 2 matches so that cow is looking in oppposite direction :) (it's possible ;) )

»
9 years ago, # |
  Vote: I like it +48 Vote: I do not like it

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    MoOOOOoOMooOOoOoMoooOOooMoooOOooMooOoOOoMooOOoOo MooOOOOoMoooOOOOMoooOOOOMoooOOoOMooOooooMoooOooOMooOOoOoMoooOOoo MooOooooMooOOooO MoooOoOOMooOoOOOMooOoOOoMoooOOoo MooOooOoMooOOoOoMoooOOooMoooOOooMooOOOOoMooOOoooMooOOoOo.

»
9 years ago, # |
  Vote: I like it +135 Vote: I do not like it

  • »
    »
    9 years ago, # ^ |
    Rev. 8   Vote: I like it +8 Vote: I do not like it

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

      MoOOooooMoooOOoO MooOooOoMooOOOOoMooooOOoMooOOOoOMooOOoOo MoOOooOoMooOoOOoMooOoOooMooOOoOo MoooOoooMooOOOOoMoooOOoo MooOooooMooOoooOMooOOoOo MooOooooMooOOooO MoooOoOoMoooOOoo MoooOoOOMooOoOOOMooOoOOoMoooOOoo MoooOoooMooOoOOOMooOooooMooOooOOMooOOoOo MoooOoOOMooOoOOoMooOooOoMooOOoOo.

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

    MoOoOoooMooOoOOOMooOoOOoMooOOOooMooOoOOO MooOOOooMooOooooMoooOOoOMooOoooOMooOOoOoMoooOOoO MooOooooMooOOooO MoooOoOOMooOoOOOMooOOoOo MoooOoooMooOooooMoooOOoOMooOooOOMooOOoOO MooOOoOOMooOooooMooOOoOoMooOoooOMoooOOoo'MoooOoOO MooOoOOOMooOOOOoMoooOooOMooOOoOo MooOOOooMooOooooMoooOoooMoooOOoo?

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

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

    MoOOOoooMooOooOOMooOooooMoooOOoOMooooOOo MoooOoOOMooOoooo MoOOOOoOMooOooooMoooOooOMooOoOOoMooOoooOMooOoOOoMooOOOOo!

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

      Feels like I came to zoo!

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

        MoOOoOOoMooOoooO MoOoOoOoMoOoOOooMoOOOOOoMoOOOOooMoOOoooo / MoOOOOoOMooOooooMoooOooOMooOoOOoMooOoooOMooOoOOoMooOOOOo, MooooOoOMooOooooMooOoooo MooOOOooMooOooooMooOooOoMooOOoOo MoooOoOOMooOoooo MooooOOoMooOooooMoooOoOo!

    • »
      »
      »
      9 years ago, # ^ |
      Rev. 2   Vote: I like it -12 Vote: I do not like it

      ?

»
9 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Auto comment: topic has been updated by desert97 (previous revision, new revision, compare).

»
9 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Sadly, bad time zone for this one. Moo.

»
9 years ago, # |
Rev. 3   Vote: I like it -37 Vote: I do not like it

ommoommoommommooommoooomommoommmommmmommomoomoomomommmmmommommoo

ommommmmommmommoommoomomomommmmmommooommommommmmommoomooommoomom

ommoommoommommmmommmoomoommooommommoomomommmoommommmmmom

I challenge anyone who thinks themselves good at cryptography to decode this message :)). I split apart the message into multiple lines so that it fits into the screen, but everything should be in one line.

  • »
    »
    9 years ago, # ^ |
    Rev. 2   Vote: I like it -33 Vote: I do not like it

    flag{I_love_codeforces}

    Split into blocks of 8 characters. o = 0 m = 1 ASCII COWDE

    MoOoOOOOMoooOoOoMoooOoOO MoooOoOOMooOoOOOMooOoOOoMoooOOoo MooOooooMooOoooOMooOOoOo MooOooooMooOoooO MoooOoOOMooOoOOOMooOOoOo MoooOoooMooOOOOoMoooOoOOMooOOOooMooOoOOO MooOooOOMooOoOOoMoooOOooMoooOoOO

»
9 years ago, # |
  Vote: I like it +34 Vote: I do not like it

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

    MoOoOOOOMoooOoOoMoooOoOO MoooOoOOMooOoOOOMooOoOOoMoooOOoo MooOooooMooOoooOMooOOoOo MooOooooMooOoooO MoooOoOOMooOoOOOMooOOoOo MoooOoooMooOOOOoMoooOoOOMooOOOooMooOoOOO MooOooOOMooOoOOoMoooOOooMoooOoOO...

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

      are you ok?

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

        It's almost obvious. rpeng has developed some kind of encoding using only 4 symbols: "M", "O", "o" and " " (space). He's trying to communicate with us using that system, hoping, someone is smart enough to figure it out.

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

          May be just replaced A,C,T,G of DNA with Moo and space and just posting genome of cow ?

»
9 years ago, # |
  Vote: I like it -26 Vote: I do not like it

MoOoOOOOMoooOoOoMoooOoOO MoooOoOOMooOoOOOMooOoOOoMoooOOooMoooOOoOOoooOOOoOoOoOoOoOoOoOOoOO MooOooooMooOoooOMooOOoOo MooOooooMooOoooO MoooOoOOMooOoOOOMooOOoOo MoooOoooMooOOOOoMoooOoOOMooOOOooMooOoOOO MooOooOOMooOoOOoMoooOOooMoooOoOOMoOoOOOOMoooOoOoMoooOoOO MoooOoOOMooOoOOOMooOoOOoMoooOOooMoooOOoOOoooOOOoOoOoOoOoOoOoOOoOO MooOooooMooOoooOMooOOoOo MooOooooMooOoooO MoooOoOOMooOoOOOMooOOoOoMoOoOOOOMoooOoOoMoooOoOO MoooOoOOMooOoOOOMooOoOOoMoooOOooMoooOOoOOoooOOOoOoOoOoOoOoOoOOoOO MooOooooMooOoooOMooOOoOo MooOooooMooOoooO MoooOoOOMooOoOOOMooOOoOoMoOoOOOOMoooOoOoMoooOoOO MoooOoOOMooOoOOOMooOoOOoMoooOOooMoooOOoOOoooOOOoOoOoOoOoOoOoOOoOO MooOooooMooOoooOMooOOoOo MooOooooMooOoooO MoooOoOOMooOoOOOMooOOoOo

»
9 years ago, # |
  Vote: I like it +27 Vote: I do not like it

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

I am sure if rpeng was bellow than a yellow, he would get lots of downvotes. But it was funny

»
9 years ago, # |
  Vote: I like it +21 Vote: I do not like it

cowforces !! =D

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

wanna be blooooooooooooooooooo

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

After removing all the fur on the cow, will we get a black one or a white one?

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

Me after reading all the comments to this post.

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

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

      You could have formed an M on the left from the boundary between black and white above the legs!

      • »
        »
        »
        »
        9 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Nice idea, I wasn't creative enough at that moment :P

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I think it has been a long time since Delinur translates English problem statements to Russian.

»
9 years ago, # |
  Vote: I like it +22 Vote: I do not like it

moo! :))

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

it reminds me Ben (in Barnyard).

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

An attractive post.. It's really tempting to register.

»
9 years ago, # |
  Vote: I like it +4 Vote: I do not like it

The comment is hidden because of too many cows, click here to view it

»
9 years ago, # |
  Vote: I like it -34 Vote: I do not like it

MoOOooOoMooOooooMoOOooooMoOOooooMooOooooMooOooooMooOooooMoOOooooMoOOooOoMooOooooMooOooooMoOOooooMoOOooooMooOooooMoOOooooMooOooooMoOOooOoMooOooooMooOooooMooOooooMoOOooooMoOOooooMooOooooMooOooooMoOOooOoMooOooooMooOooooMooOooooMoOOooooMooOooooMoOOooooMoOOooooMoOOooOoMooOooooMooOooooMoOOooooMoOOooooMooOooooMoOOooooMooOooooMoOOooOoMooOooooMooOooooMoOOooooMoOOooooMooOooooMoOOooooMoOOoooo MoOOooOoMooOooooMooOooooMoOOooooMoOOooooMoOOooooMooOooooMooOooooMoOOooOoMooOooooMooOooooMoOOooooMooOooooMooOooooMooOooooMooOooooMoOOooOoMooOooooMooOooooMooOooooMoOOooooMooOooooMooOooooMooOooooMoOOooOoMooOooooMooOooooMooOooooMoOOooooMoOOooooMooOooooMooOoooo!

»
9 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Happy Anniversary Codeforces Round!!

Why "Anniversary"? Because 334 is a very famous number in Japan!!

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

    Kinda strange to see a comment here that doesn't mention cows :)

»
9 years ago, # |
  Vote: I like it -14 Vote: I do not like it

»
9 years ago, # |
  Vote: I like it -21 Vote: I do not like it

Where am I?!

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Damn it. Came 4 min before the start. Forgot about registration.

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by desert97 (previous revision, new revision, compare).

»
9 years ago, # |
  Vote: I like it -101 Vote: I do not like it

I want to participate but the light will be switched off in 1.5 hours because of Ukraine’s blockade of Crimea :(

Won't it be fair to cancel all Ukrainians registrations to CF rounds until Crimea gets the light? CF admins should be more patriotic, I think.

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

    I'm sure that if you take any arbitrary moment of time, there will be at least one town without light in our homeland. Any way, the contest is prepared by Americans.

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

      I suggested only to temporary ban Ukrainians because they are to blame for the blackout. CF admins live in Russia and CF is hosted in Russia. As one American said: "By uniting we stand, by dividing we fall!".

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

        Ukrainian CF users are not "to blame for the blackout".

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

          As far as I know Ukraine is a democratic country, so Ukrainians should share the responsibility for the actions of their state. Am I wrong?

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

    I can't speak on the part of the whole Codeforces community, but I think we should stay as far from politics as possible.

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

I thought it start at half a hour later.LoL

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I thought it was going to start an hour later... I guess I'll check the time more carefully next week =/

»
9 years ago, # |
  Vote: I like it +13 Vote: I do not like it

Today is the ****ing #WA6 day!

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Fuck! Didn't wade through Div2B again...

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve Div2E,if for odd k?

  • »
    »
    9 years ago, # ^ |
    Rev. 2   Vote: I like it +5 Vote: I do not like it

    Grundy function. if k is odd it's same as k=1. If 2n is even, {2n} -> {n, n, ... ,n} (odd k times), so f(n) xor f(n) xor f(n) xor ... xor f(n) = f(n)

»
9 years ago, # |
  Vote: I like it +134 Vote: I do not like it

Very nice problemset!

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

    Thanks rng_58! Glad you enjoyed it! :)

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

    Same for Div2! A very nice distribution of number of rank/number of solved problems. And extremely well-written indeed. Kudos to problem setters

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

First 2 problems are OK. 3rd problem too easy. 4th problem too hard.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    care to give an explanation for 3rd problem Div2?

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

      Maximum sequence is greedily calculated -> number of alternations between 0 and 1.

      There are 3 possibilities -> you can't increase it, you can increase it by 1, you can increase it by 2.

      If you have more than 2 same chars in a row -> you can increase sequence by 2. For example 01110 -> can increase to 01010. Or 101000010 -> 101011010.

      If you have 2 same chars in a row in more than 1 place -> can increase by 2. Example: 001010110 -> 101010101

      If only 1 sequence of 2 same chars -> can increase only by 1. Example: 010101011010

      No duplicates found? Can't increase

      • »
        »
        »
        »
        9 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        solution with your idea 14606578 solution own idea 14592698

      • »
        »
        »
        »
        9 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        In other words take min(n, len + 2) where len — is the maximum sequence calculated for original string.

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

hacked 3 submissions of problem B div2 with the same testcase. looks like the pretests are weak and lots of people are gonna fail system test.

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What's the idea for Div2b? Tried to solve it during all the contest

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Binary search?

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      How to check the ability to feet size less then for n^2?

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      It's not binary search, you can solve at O(n) this is my solution for div#2 B: 14607361

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    i think in binary search but i dont know apply here, please some help me!!

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

      Suppose with K boxes of size S you can pack all your cowbells, using the optimal way of packing. Then, you can binary search on size S to find the first S such that you can pack all your bells.

      Now, the optimal way of packing given K boxes of size S is pack as many pairs of biggest and smallest bells together if that fits within size S. otherwise you need to pack the bigger ones individually.

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

    Greedy solution seems to work. Try to put the smallest bell with a big bell so that you minimize the number of boxes, as well as minimize total size.

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

    The idea is that first we put the first k cowbells of NON-INCREASING size into different boxes, then if the boxes are over and there are still leftover cowbells, then we combine the leftover cowbells with the ones already present in the boxes by taking the leftover cowbell with the maximum size and adding it to the box having the cowbell of minimum size(box has just 1 cowbell), and continue this until all the cowbells get a box.

    Then, the maximum size can be found easily from all the boxes.

    Update : 14604784

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

Coding in cow style :P

14591309 14595399

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

div2 D was a pure math :)

»
9 years ago, # |
  Vote: I like it +6 Vote: I do not like it

hacked a solution for the very first time today!! :D

and actually 4 of them(Div 2 B)! :P and then realised even I'm gonna fail system tests because of a very silly mistake :/

lol I wish I could hack my own solution and get at least +100 :P

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Maybe someone can help me to find mistake in my solution of Div2 B 604B - More Cowbell?

Submission (on C++): 14597269

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Try this case?

    5 3 2 9 9 9 11

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thanks a lot! As usual very simple... My bad.

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

        '5 3 2 9 9 9 11' case is not valid. Because '5 3 2' is descending.

»
9 years ago, # |
  Vote: I like it +19 Vote: I do not like it

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by desert97 (previous revision, new revision, compare).

»
9 years ago, # |
  Vote: I like it +53 Vote: I do not like it
»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Could anyone please explain, why this solution of Div2B fails on test 10?

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

    try this test case:
    you'll understand what's wrong with your program.

    4 2
    1 2 3 4

    the answer for this test should be 5 but your program outputs 7.

»
9 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Eh, at least now I have a cool color :D

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Pupil forever. ._.

»
9 years ago, # |
  Vote: I like it +12 Vote: I do not like it

Petr : bye bye top 2 :|

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Чему радуешся сам сначала дотянись до такого уровня а потом говори

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

    How long does he need to NOT participate in order to get to div2 back again? ;)

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

      He won't unless CF changes its criteria of participating in Div 1 to something more then 2964. His rating will be stuck at 2964 if he doesn't participate which is way more then the current limit/cap for Div 1 contests (1700??)

»
9 years ago, # |
  Vote: I like it +2 Vote: I do not like it

damn! I made such a silly mistake in B. instead of 2k-n, I did k-n/2. -_-

  • »
    »
    9 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Can someone please articulate why 2k-n is correct while k-n/2 is wrong?

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

      Test these cases:

      int n = 3; // 4 4 5 5...
      int k = 3; // 3 4 4 5...
      
      int res1 = k + k - n;
      int res2 = k - n / 2;
      
      cout << res1 << ' ' << res2;
      

      You see, k - n always has to be equal to - n / 2. Now let's invert the sign and we get the equation n - k = n / 2 (read this as: subtracting k from n is the same as halving n). In order for these two computations to be equal we should demand k to be always the half of n.

      Sometimes you get lucky, when n / 2 rounds to n - k, e.g. when n = 5 and k = 3, but only sometimes ;)

»
9 years ago, # |
  Vote: I like it +70 Vote: I do not like it
»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Why my submission div2 D had verdict Accepted, but now has verdict Skipped? 14603287

»
9 years ago, # |
  Vote: I like it +26 Vote: I do not like it

Hi everyone,

I'm currently developing a new Elo-based rating algorithm for large ranked matches such as programming contests, hopefully with a firmer statistical basis. Some goals are: faster convergence, no inflation, reduced sensitivity to unusual performances, and simplicity. The paper writeup is incomplete, but I've made the code available at https://github.com/EbTech/EloR

CFratings.txt contains everyone's Codeforces rating as computed by the algorithm, as well as the performance and delta of your most recent match. I assumed all events except the Educational rounds are rated, since I don't know where to find that information.

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

    It says I'm barely yellow, with a rating and position which I haven't held for 15 months. Srsly?

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      The scales are not directly comparable. My list has fewer reds, and you are still more than half-way from orange to red.

      But actually now that I look more closely, the data shows a significant rating drop on your last contest, whereas real CF data says your last contest went great. The most likely explanation is that my program unfairly penalized you for an unrated contest. Do you remember if that was the case? If I could have the list of all rated events, the issue would be fixed.

      Btw this algorithm also does a decent job of outlier reduction. For instance, Swistakk was understandably upset that he lost 140 points last round. My program gave him -57 instead. On the other hand, if you do very poorly (or very well) several times within a short span, the rating change accelerates as these data points cease to be treated as outliers.

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

        I did the round 330 (which was unrated due to a fail in div1A) and yes, it went pretty bad for me. Seems like unrated rounds can't be neglected — but they can be added manually.

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

          I removed round 330 and a few others, but I'll need help to get a complete list of unrated and team events. CFratings.txt now shows 3 alternative sets of title bounds; my preference is the middle one.

          For some reason, my automatically mined list has almost 2000 more users than http://codeforces.me/ratings/all/true. If a user changes their handle, do old scoreboards continue to show the old handle?

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

            If a user changes their handle, do old scoreboards continue to show the old handle?

            I checked, apparently not.

            In order to avoid uncertainty about colours, focus on ranks instead. (Colours should just be set so that at least a fixed number of people has at least a certain colour.)

            • »
              »
              »
              »
              »
              »
              »
              9 years ago, # ^ |
              Rev. 5   Vote: I like it 0 Vote: I do not like it

              For now the assumption is we keep the same mappings between colour and title. So the division boundary is 1750, and 2300+ (currently 150 users) are red. Although my system has less inflation, the number of GMs still more than doubled compared to CFratings2013.txt and will continue to increase as site activity grows.

              Edit: oh I see what you mean. Yes my focus is on the rating algorithm; titles and colours just help to frame the picture.

            • »
              »
              »
              »
              »
              »
              »
              9 years ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              Hm my top 10 list right now differs considerably from the official one...

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

    Great job! I have several several users to compare and your numbers make more sense to me.

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anyone tell what's wrong with this submission (problem 3 div2)

submission

It gives a wrong answer on pretest 2:

Input: 2 01

Output: 4

But on multiple local machines is outputs 2 (the correct answer).

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

I have a nice solution for C

lets define a block a maximal interval [L , R] such that for each L <= i < j <= R : a[i] = a[j]

for example 112 has 2 blocks .

now just print min(n , number of blocks + 2)

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

I don't understand how solution 14586181 of FreeMoneyCity can be solved and implemented in 3 minutes. It is very strange.

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

    Yeah, that also amazed me :). However I wouldn't be dubious about that, for an experienced competitor problem is straightforward and all of those pows etc. were in his template. 3 mins is a really great time, however not an impossible one.

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

      However, I looked at other his codes, and templates were different, even were solutions on different languages. It's like that this account is used by different people, or it's big trolling made by one man.