Блог пользователя Radewoosh

Автор Radewoosh, история, 5 лет назад, По-английски

Hello coders! I hope that you are enjoying the New Year as much as me. To make its beginning even greater, Codeforces is going to host a contest and I will be an author of all tasks. Hello 2019 will take place on Friday.

Using the opportunity, I want to thank to:

  • Lewin and mnbvmar for testing the round.
  • mnbvmar for indescribably helpful discussions about problems.
  • cdkrot and KAN for round coordination and help with preparation.
  • MikeMirzayanov for such great platforms (you know which ones :P).

The round will consist of 8 problems and you will be given two and a half three hours to solve them. Yes, the round will be rated.

There will be no interactive problems, but if you want you can read this document anyway, it's always good to learn new things.

Good luck and see you during the contest!

UPD1: Editorial

UPD2: I'll be on the Discord channel after the contest, so you will be able to ask me about the problems.

UPD3: You're probably wondering what the statements will be about. I hope that it will be another great year for Codeforces. As it's the community that creates it, I decided to write statements about the people who already have or had their part in Codeforces' history. As I wanted to be objective, the statements will be about 8 people who triumphed the most times in CF rounds. Using the opportunity, I want to invite these 8 people to take part in the contest. Let's say that the first person who will guess the set in the comments wins some free contribution. Good luck!

UPD4: The round will be 3 hours long.

UPD5: The drain will be adjusted and the scoring will be 500-1000-1500-2000-2750-3000-3500-4000.

UPD6: The round is over, congratulations to the winners!

  1. V--o_o--V
  2. ecnerwala
  3. tourist
  4. lych_cys
  5. Petr

And to the first-to-solvers!

UPD7: Editorial

Анонс Hello 2019
  • Проголосовать: нравится
  • +1910
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится +550 Проголосовать: не нравится

You accidentally uploaded the ediotiral, but i am honest and don't look there

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +453 Проголосовать: не нравится

    Well, thanks for that, but you shouldn't worry so much :P

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится -12 Проголосовать: не нравится

    you changed your handle from numb. So many quora links are gonna be dead now

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I have seen a new name in my friend list and wondering about who is this guy... Finally I understood...

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +17 Проголосовать: не нравится

      If you change your handle the links refered to the lastwill redirect to the new profile page

»
5 лет назад, # |
  Проголосовать: нравится +22 Проголосовать: не нравится

Nice editorial tho.

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится +1 Проголосовать: не нравится

I can neither confirm nor deny that editorial without Radewoosh's approval

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится -225 Проголосовать: не нравится

lol

»
5 лет назад, # |
  Проголосовать: нравится +44 Проголосовать: не нравится

That editorial, haha, so funny!

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится +70 Проголосовать: не нравится

this.handle+" 2019!";

»
5 лет назад, # |
  Проголосовать: нравится +239 Проголосовать: не нравится

Thanks for fast editorial.

»
5 лет назад, # |
  Проголосовать: нравится +90 Проголосовать: не нравится

I really hope noone is enjoying the New Year as much as you.

»
5 лет назад, # |
  Проголосовать: нравится +228 Проголосовать: не нравится

Can you please reupload the editorial? It is not available in my country and now I feel at disadvantage.

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится -24 Проголосовать: не нравится

One of the best editorials ever seen. Nice one.. Haha:P

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится -10 Проголосовать: не нравится

Why aren't you blue anymore? Also, what is the blog gonna look like when you upload the real editorial?

»
5 лет назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

too excited about the first contest in this year and as well as a contest by Radewoosh.

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

Awesome editorial! :P

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится -27 Проголосовать: не нравится

-

»
5 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

By the way, why isn't the Rating of the problems in Goodbye 2018 shown yet?

»
5 лет назад, # |
  Проголосовать: нравится +24 Проголосовать: не нравится

could you explain in more detail div2a? including official solutions also helps.

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Nice editorial :P

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится -30 Проголосовать: не нравится

LOL HAHABA SHIT JOKE=))))

»
5 лет назад, # |
  Проголосовать: нравится +184 Проголосовать: не нравится

Me: Oh, an editorial... let's to see!

(wild video appears...)

Me:

;;;;;;;;;;;;::;,.,xOOOOOOOkdoc;,,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,'''',,,,,,,,,'',,:cloo:'.
;;;;;;;;;;:ccccc,'lOOOOOOOOOOOxoc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,''''''''''',;cloxkOOOOl..
;;;;;;;;;:cccccc:,;xOOOOOOOOOOOOOxoc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,''''''';:loxkOOOOOOOOk:..
;;;;;;;;;:cccccc::,ck0OOOOO0OO00OOOOxl:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,'',;codkO0OOOOOOOOOOOo'..
;;;;;;;;:cccccc:::;,ck0OOOOOOOOOOOOO0Okoc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:cloxOOOOOOOOOOOOOOOO0x;..'
;;;;;;;:ccccccc::;;,,:xOOOOO0OOOOOOOOOOOkdc;,;;;;;;;::::ccccccccc:::::cldkOOOOOOOOOOOOOOOOOOO0k:..''
;;;;;;;:cccccc::;;,,,';dO0OOOOO0OOOOOOOOOOkdodddxxxxkkkOOOOOOOOOOkkkxkkO0OOOOOOOOOOOOOOOOOOO0kc'''''
;;;;;;;::::::::;;,,,''',cxOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOxc,,,,''
;;;;;,;;;;;;;;;,,,,'''''',lkOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOko:;;;;,,,
;;;;,,,,,,,,,,,,''''''''''.,lkOOkxkOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOkoc:c:::;;,,
;;;;'''''''''''''''''''''''..;lodkO0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOkxk0Okxocccccc:::;,,
;;;,'............'''''''''''..;xOOOOOOOOOOOO0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOkxdol::::cccc:::;;,,
;;,'..............''''''''''';dOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOko;;::::::::;;;;,,
;;'................'''''','',dOOOO0OOOxdoccxOO0OOOOOOOOOOOOOOOOOOOOxdoclxOOOOOOOOOOOo;;;;;;;;;;;;,,'
;,'................'''''',,,lOOOOOOOOoo00c.;xOOOOOOOOOOOOOOOOOOOOOll0O:.:k0OOOOOOOOOOo,,;;;;;;,,,,''
,'..................''',,,,ckOOO0OO0Ol,::,.,d0OOOOOOOOOOOOOOOOOOOOc,::,.;x0OOOOOOOOOOkc',,,,,,,,,,''
,'..................''',,';dOOOOOOOO0kc,,,;oOOO0OO0OO0OOOOOOOOOOOOkc,,,:dOOOOOOOOOOOOOd,',,'''''''''
'...................''',,,lOOOOOOOOOOOOkxxkOOOOOOOOxdddkOOOOOOOOOOOOkxxOOOOOOOOOOOOOO0kc''''''''''''
'...................''',,;xOOOkkkOOOOOOOOOOOOOOOOOxo:;:dOOOOOOOOOOOOOOOOOOOOkkkkOOOOOOOd;'''''''''''
'.................'''',,,ckxollllldkOOOOOOOOOOOOOO0OkkOOOOOOOOOOOOOOOOOOOkdlllllodkOOOOOc'',''''''''
''''...........'''',,,,,;odccccccccokOOOOOOOOOOOOOOO0OOOOOOOOO0OOOOOOOOOxlcccccccclk0OOOd;,,,,,,,,''
'''''''',''',,,,,,,;;;;;;ddcccccccclxOOOOOOOOOOOOkxdddddooddkOOOOOOOOOOOdccccccccclx0OOOOl,;;;;,,,,'
',,,,,,;;;;;;;;;;;:::::;:xOdolclllokOOOOOOOOOOOOxllodddxdddllkOOOOOOOOOOkocccccccldOOOOOOd:;:;;;;;,,
,,,;;;;:::::::::::::::cc;lOOOkkkkOOOOOOOOOOOOOOOdlodxxdxddxdcdOOOOOOOOOOOOkxdoddxkOOOOOOOOl:::::;;,,
,,;;::::cccccccccccccccc::dOOOOOOOOOOOOOOOOOOOO0kolldxxxxxxoldOOOOOOOOOOOOOOOOOOOOOOOOOOOOd::c::;;,,
,,;;:::cccccccccccccccccc:cxOOOOOOOOOOOOOOOOOOOOOOkxoooooooodOOOOOOOOOOOOOOOOOOOOOOOOOOOOOkc:c:::;,,
,,;;::::cccccccccccccccc:c:cxOOOOOOOOOOOOOOOOOOOOOOOOOkkkkkOO0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOo;:::;;,,
,;;;;::::ccccccccccccccc:::;ck0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOx::::;;,,
»
5 лет назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

Your editorial sucks! The video isn't available in my country!

»
5 лет назад, # |
  Проголосовать: нравится +173 Проголосовать: не нравится

memerickcf

»
5 лет назад, # |
  Проголосовать: нравится +63 Проголосовать: не нравится

clicked on the Editorial

Really Radewoosh? Thanks for being the first one doing that to me in 2019 :D

»
5 лет назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

The most unique editorial I have ever seen. Hoping for a nice contest now (paradoxical I guess, waiting for the contest after editorial)

Also, Thanks a lot for suggesting us to learn about new things :)

»
5 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Looking forward to it, hopefully I will finally become green again :P

»
5 лет назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

Not gonna lie, I thought I badly missed the contest..

Until I swiped left my mobile screen..

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I've been looking forward to a round prepared by a single expert, but, however..

»
5 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

wulalalala is it rated?

»
5 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

what is the rating of the contest ?

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +11 Проголосовать: не нравится

    If the question is, Is it rated? then answer is YES. or, if the question is Rated for which division? then answer is Everyone who will attend the contest.

»
5 лет назад, # |
  Проголосовать: нравится +46 Проголосовать: не нравится

Fastest editorial in my codeforces history. Thanks Radewoosh

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Well-written editorial ^^ but I think you forgot to link the statements that go with it :\

»
5 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится
»
5 лет назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

I've already read so many editorials that I know this gXcQ by heart.

»
5 лет назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

Fastest editorial ever!!! Also that's one of my favorite songs to cheer me up too.

»
5 лет назад, # |
  Проголосовать: нравится +28 Проголосовать: не нравится

Is it just me, or does Radewoosh look really similar to Rick? o.O
Radewoosh vs Rick

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Never gonna give you uuuup! I like this editorial :)

»
5 лет назад, # |
  Проголосовать: нравится +20 Проголосовать: не нравится

How to solve D ?

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Exceptional Editorial :P

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Wow, early editorial. When are you gonna update the ratings?!.

»
5 лет назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

Goodbye 2017;Hello 2018.:D

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I'm gonna listen to this editorial everyday

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Thanks for the video editorial , really educational !

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Just hope, everyone has high ratings with this new year. Tough competition though :P

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

OMG, Radewoosh contribution +200. That`s so much!

»
5 лет назад, # |
  Проголосовать: нравится +45 Проголосовать: не нравится

Fuck U Radewoosh.My New Year Resolution was not to Open Youtube(Personal Reason).And Bcoz of u it is broken now.

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится +10 Проголосовать: не нравится

this will get me out of master :^D

»
5 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Everyone says that he hopes to be green, gray and other color. I hope to become Double Legendary Grandmaster SuperJava

»
5 лет назад, # |
  Проголосовать: нравится -21 Проголосовать: не нравится

Is it rated??

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

ArepitaDePernil will never tell a lie and hurt you!!

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hope to reach green this contest :)

»
5 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

it would be cool if pressing the downvote button would also redirect u to smth funny

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Lets see if this post gets more upvotes than Hello 2018. Radewoosh you are my favorite.

»
5 лет назад, # |
Rev. 5   Проголосовать: нравится +6 Проголосовать: не нравится

I think that the set of people will be: tourist Petr Radewoosh Um_nik rng_58 OO0OOO00O0OOO0O0…O PikMike Vovuh

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Challenge in UPD3 is pretty simple using Codeforces API but I'm too lazy so let me guess. Let me spare them these mentions: Petr, tourist, Radewoosh, OO0OOO00O0OOO0O00OOO0OO, Um_nik, rng_58, V--o_o--V, YuukaKazami

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I wonder what is the number of participants who won at least one rated(for div1) contest. Too lazy to check using API and/or by opening results, of course.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

UPD3 challenge: tourist, Radewoosh, OO0OOO00O0OOO0O00OOO0OO, Um_nik, V--o_o--V, LHiC, Petr, encerwala

»
5 лет назад, # |
  Проголосовать: нравится -24 Проголосовать: не нравится

UPD2: I'll be on the Discord channel after the contest, so you will be able to ask me about the problems
I can't enter the server ((

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится +302 Проголосовать: не нравится

Egor it was very tricky from you to hide on 158th place in overall standings with these 11 wins of yours :P

Petr tourist Radewoosh jqdai0815 Um_nik rng_58 V--o_o--V Egor — be aware that Radewoosh invites you to take part in this contest :)

»
5 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

I just want to tag dreamoon_love_AA sorry_dreamoon :P.

»
5 лет назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

In UPD 3 , I think they are (in sorted order from number of contests winning)

1 — tourist

2 — Petr

3 — OO0OOO00O0OOO0O00OOO0OO

4 — rng_58

5 — Egor

6 — Um_nik

7 — V--o_o--V

8 — Radewoosh

9 — YuukaKazami

and since you said that you invite first 8 to take part in contest...so I think that maybe you mean 9th which is YuukaKazami

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +52 Проголосовать: не нравится

    Unfortunately there are two persons on 9th place, so I'm also inviting myself to take part (and I will, but from the other side :P).

    And sorry, but our contributionboy was faster.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I cant understand the editorial, anybody can explain with more details? :D

»
5 лет назад, # |
  Проголосовать: нравится +42 Проголосовать: не нравится

It sure will be the best 2019 contest so far.

»
5 лет назад, # |
  Проголосовать: нравится +40 Проголосовать: не нравится

Change the start time to 20:19 ! :D

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +4 Проголосовать: не нравится

    Taking part in a contest begins at 22:35(UTC+8) is usual for me now, but if it lasts for 3 hours...

»
5 лет назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

I hope there won't be solutions in the problems.

»
5 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Even Problems In an Odd Year will Make My Day !!!

»
5 лет назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

One of the Best Editorial ever.

Thanks for the Motivation.

Another Editorial if you wanna take a look.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

finally.. someone generous. Three hours !

»
5 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Really enjoyed this editorial.

»
5 лет назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

If you can't see the editorial, you can try this. It's the same video.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

The 8 people will not includes OO0OOO00O0OOO0O00OOO0OO because it's too hard to write.

QAQ

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Outrageous editorial!

»
5 лет назад, # |
  Проголосовать: нравится -68 Проголосовать: не нравится

Why those stupid early contest times for this and Goodbye 2018? I'm not a shut-in with nothing to do except programming contests at any time!

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +7 Проголосовать: не нравится

    Actually it's a little too late for Asian. It's hard to meet everyone's need. So it's better to enjoy those you can participate in and stop complaining about everything.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +17 Проголосовать: не нравится

      It's hard to meet everyone's need.

      Yeah, which is what two consecutive big rounds with the same starting time don't do. If you look at the contest list, the last 8 rounds including this one (some div1) had an early starting time.

      There are countless things I'm not complaining about, so how about you don't try to dismiss a valid point? Which rounds can I enjoy if it's been almost a month since one didn't start in the early afternoon?

»
5 лет назад, # |
  Проголосовать: нравится +22 Проголосовать: не нравится

PM 11:30 to AM 02:30 in my country 8ㅅ8

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится +78 Проголосовать: не нравится

Adjusted drain, please. Nobody wants their C-D to be worth more than G-H.

@ MikeMirzayanov, cdkrot, KAN

»
5 лет назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

I Have a Farsi exam tomorrow, I know Im going to fail but F*** that, I waited a year for this.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Very exclusive tutorial.Following the tutorial most of the contestant including me become legendary grandmaster without participating any contest :D

»
5 лет назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

Never gonna give you up =))

»
5 лет назад, # |
  Проголосовать: нравится +88 Проголосовать: не нравится

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится +43 Проголосовать: не нравится

Score distribution? Updated Now

»
5 лет назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

Good luck to all! Wish you to see lot of "Happy New Year!" verdict!

»
5 лет назад, # |
Rev. 4   Проголосовать: нравится +1 Проголосовать: не нравится

Before start, delayed by 10 mins :|

»
5 лет назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

впрочем ничего нового

»
5 лет назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

why delay 10 min ?

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +29 Проголосовать: не нравится

    Finally my time travel machine worked, I moved everyone 10 minutes in the past

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

10 minutes delay means now I will skip the last 30 minutes of the round, not a good thing :(

»
5 лет назад, # |
  Проголосовать: нравится +22 Проголосовать: не нравится

PING : 600000ms

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

I'm confused because the contest was suddenly delayed a few seconds before the start of the competition.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

JEBAITED XD

»
5 лет назад, # |
  Проголосовать: нравится -6 Проголосовать: не нравится

Is it another DDOS attack???

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

What an Anti-Climax (Delayed by 10 mins)

»
5 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

There should be a notification when a contest is delayed. We press OK and suddenly get shocked to see delay :/

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится +34 Проголосовать: не нравится

Radewoosh, You want to crack the 12K record?

»
5 лет назад, # |
  Проголосовать: нравится -13 Проголосовать: не нравится

UDP5 : 10 min delay.

»
5 лет назад, # |
  Проголосовать: нравится +38 Проголосовать: не нравится

Trying to get 12k registrants and beat Goodbye 2018 with that delay? haha

»
5 лет назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

I think the delay was for beating the record for the most registered people in a contest.

»
5 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

About +600 participants. Good luck :)

»
5 лет назад, # |
  Проголосовать: нравится +16 Проголосовать: не нравится

It's great idea from you to put a link to your song in the blog, nice advertisement man

»
5 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Starting new year with 10 minutes delayed contest, it gonna be legen wait for it dary year.

»
5 лет назад, # |
  Проголосовать: нравится +46 Проголосовать: не нравится
»
5 лет назад, # |
Rev. 2   Проголосовать: нравится +118 Проголосовать: не нравится
Setters be like:
A: lets make an A-level problem
B: lets make a B-level problem
C: lets make a C-level problem
D: let them lose their mind :O
»
5 лет назад, # |
  Проголосовать: нравится -30 Проголосовать: не нравится

What is TC4 of Prob C?

»
5 лет назад, # |
  Проголосовать: нравится +129 Проголосовать: не нравится

Radewoosh unbalanced contest

»
5 лет назад, # |
  Проголосовать: нравится -31 Проголосовать: не нравится

еее говноконтест)))00))))))))))))000(()0(

»
5 лет назад, # |
  Проголосовать: нравится +97 Проголосовать: не нравится

Why does E have only 1 correct submission? Overkill or wrong official solution?

»
5 лет назад, # |
  Проголосовать: нравится +185 Проголосовать: не нравится

For Div-2 Coders, it was a 1/2 hour contest.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

very funny statements

»
5 лет назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

The test case 2 of D is killing me for past 1 hour. For some reason, I can't seem to figure it out (in fact n=6, k=3 provides me with the given output). However, as there has been nobody raising that issue, the only explanation is that I have forgotten all my maths.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    It was strange for me too The problem with me in this problem that I didn’t even understand what is the statement Also no explanation for the output of the second test . When i asked the author he repeated the statement for me I thought it is only my problem

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    Well I had the same problem at the beginning The problem is that you take into account the number of divisors of a divisor of N to calculate the probability for each k

»
5 лет назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

oh god I understood C wrongly wasted 1 hour until I read it again it's way easier than what I was trying to solve :/

I will never read problems quickly again

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится -80 Проголосовать: не нравится

[DELETED]

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится +23 Проголосовать: не нравится

Maybe, one day, Science will be able to answer why div2 coders like me keep on refereshing the standing page for 2+1/2 hours, even when they are done with the problems in 1/2 hour (-_-)

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

The strange thing that my rank keeps increasing if that i didn’t solve a problem after the first 40 min

»
5 лет назад, # |
  Проголосовать: нравится +215 Проголосовать: не нравится


Yeahhh!!!

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится +6 Проголосовать: не нравится

Please make me expert :|
UPD: I became! <3

»
5 лет назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

How to solve D?

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

Does D uses the fact that number of divisors are number of ways to select powers of its prime factorization?

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Well given that N is up to 10^15, you can check the divisors of N in O( sqrt(N) )

»
5 лет назад, # |
  Проголосовать: нравится +57 Проголосовать: не нравится

Hello 2̶0̶1̶9̶ depression.

»
5 лет назад, # |
  Проголосовать: нравится +88 Проголосовать: не нравится

People being unable to solve D (at any points during contest time) be like:

  • Got at least one failed submission -> damned.
  • Solved ABC too slow -> damned.
  • Cannot get proper hacks (mostly on B) -> damned.

And I got the first and third case. Won't really blame (for a master, this performance of mine was way disappointing), but still, my point still stands. This contest is too unbalanced.
I know, most Div.1+Div.2 combined recently look quite similar that way, but still, this one took the gap to the highest magnitude. Like, a single mistake is a suicidal sign.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

In E is just greedy O(n logn sqrt(n)) passing?

  • »
    »
    5 лет назад, # ^ |
    Rev. 3   Проголосовать: нравится +33 Проголосовать: не нравится

    If by greedy you mean remove the longest monotonic subsequence, then I got WA with this approach. It is known to achieve , but I can only construct cases in which I need , so there is something missing.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I found that N = k2 + k + 1 needs f(N) ≥ k + 1 and that f(6) = 3, so this is obviously not the exact bound, but it's very close to the other bound from Erdos-Szekeres.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Solution is either greedily pick largest subsequence or split the whole sequence into the minimum amount of increasing or decreasing sequences.

»
5 лет назад, # |
  Проголосовать: нравится +77 Проголосовать: не нравится

2o50s2

me.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

problem D , what maximum number of divisors n can have ? and if less than 1e3 can we use dp ?

»
5 лет назад, # |
  Проголосовать: нравится +42 Проголосовать: не нравится

How to solve F?

»
5 лет назад, # |
  Проголосовать: нравится +20 Проголосовать: не нравится

ok fellas, how do we solve D?

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +50 Проголосовать: не нравится

    There's a straightforeward dp solution. Compute all dp[i][j] = expected value if starting value is i and you have j turns. (i are all potential divisors of n).

    However this is too slow. You can speed it up, by realizing that this function is multiplicative. Therefore you compute dp[p^e][k] for each prime factor p of n and multiply the results.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      How to find prime factors of n? I mean n is big and I couldn't find out whether n is prime or n is pq for some p and q being prime numbers.

      • »
        »
        »
        »
        5 лет назад, # ^ |
        Rev. 2   Проголосовать: нравится +11 Проголосовать: не нравится

        n isn't that big. In my case I simply computed all primes <= 4*10^7 using a sieve (which runs in <0.1 sec), and tried dividing n with all primes. But I also expect that a simple for loop until sqrt(n) will also be fast enough.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +13 Проголосовать: не нравится

      Can you elaborate a bit on proofs of this function being multiplicative? I don't really getting it mathematically.

      • »
        »
        »
        »
        5 лет назад, # ^ |
        Rev. 3   Проголосовать: нравится +23 Проголосовать: не нравится

        Expected value of product of two independent random variables A and B is the product of their expected values.

        Proof for discrete A, B:

        (Here a and b are values that A and B can get.) P(A = a, B = b) = P(A = a)P(B = b) from definition of independence.

        At every step the power of every prime changes independently, since if our current number is y = x * pa

        , then the number of divisors of y where the power of p is a given value <= a is always just the number of divisors of x. Since all these probabilities are equal, they do not depend from x.

        Let A_{p,k} be a random variable indicating the value of the power of p after k steps. Our answer is since as we just saw Ap, k's are all independent

        • »
          »
          »
          »
          »
          5 лет назад, # ^ |
            Проголосовать: нравится +1 Проголосовать: не нравится

          sigh I'm just bad to not being able to draft this out.
          Thanks for the help, it's crystal clear to me! ;)

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
          Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

          This is beautiful! Thanks!!!! This was a completely new fact to learn.

      • »
        »
        »
        »
        5 лет назад, # ^ |
        Rev. 7   Проголосовать: нравится +46 Проголосовать: не нравится

        You can do a induction over k.

        For n = a·b and , and D(x) being the number of divisors of x.

        We have:

        Because of the induction hypothesis we know that

        dp(d1·d2, k - 1) = dp(d1, k - 1)·dp(d2, k - 1).

        Therefore:

         = dp(a, kdp(b, k)
      • »
        »
        »
        »
        5 лет назад, # ^ |
          Проголосовать: нравится +5 Проголосовать: не нравится

        It's also possible to prove it by noticing that performing one step on n is equivalent to calculate s / c where s is the sum of divisors and c is the number of divisors. These functions are known to be multiplicative. From there, you can use induction.

»
5 лет назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

What's the intended complexity of E/G?

I have O(Nsqrt(N)log(N)) in E (I hope it passes with some pruning) and a heavy O(NKlogK) in G (most probably it's too slow).

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I'm really curious about E. What's the threshold for f()?

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +85 Проголосовать: не нравится

      f(n) = 1 for [1, 2], 2 for [3, 5], [6, 9], [10, 14], [15, 20],  and so on.

      How to decompose a seqeunce of, for example, length [55, 65], into 10 parts? If the length of LIS is at least 11, remove it and repeat the process. Otherwise let dp[i] be the length of the LIS that ends at position i. Since there are at most 10 distinct values of dp[i] in this case we can decompose it into 10 parts (If we only look at elements with dp[i] = c for some constant c, this is decreasing.)

      • »
        »
        »
        »
        5 лет назад, # ^ |
          Проголосовать: нравится +44 Проголосовать: не нравится

        Yup. And we can consider the permutations of the following form:

        1, 3, 2, 6, 5, 4, 10, 9, 8, 7

        (concatenated decreasing sequences of lengths 1, 2, ..., k). It's possible to prove that this permutation needs k subsequences in any partition.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +10 Проголосовать: не нравится

    We have in E. We came up with plenty of LIS implementations and even the slowest ones fit in a second or so.

    G can be solved in O(NK).

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +10 Проголосовать: не нравится

      So what was the intended solution? Because greedily picking the longest sequence seems to be O(N1.5logN) but gives WA.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Apparently my LIS implementation is exceptionally slow then.

»
5 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

How to solve D? I could see that the expected value was a multiplicative function, but values for prime powers were not having a nice form either.

  • »
    »
    5 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    The expected value of f(n, k) is the product of f(aipi, k), where ai is a prime factor of n and pi is the maximum value such that aipi is the factor of n.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Yes, that is same as saying f is multiplicative. But how to compute f(a_i^p_i,k)?

      • »
        »
        »
        »
        5 лет назад, # ^ |
        Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

        Consider the naive DP approach to the original question. Denote dp[i][j] as the expected value when i replacements are done and the current value be j.

        Then for all t that is a factor of j, and n is the number of factors of j.

        The base case is dp[k][t] = t.

        Just use the same approach for each set of prime products, and of course you are not to use the values as indices.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    You can just DP the values for prime powers

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      You mean using the recurrence, (a+2)f(p^(a+1),k) — (a+1)*f(p^a,k) = f(p^(a+1),k-1)? Wouldn't that be too slow?

      • »
        »
        »
        »
        5 лет назад, # ^ |
        Rev. 2   Проголосовать: нравится +6 Проголосовать: не нравится

        EDIT: fix one-off in indexing

        Let DP[i][j] = f(pi, j). We can init DP[i][0] = pi. Then, For all j from 1 to k,

        Calculating the values is trivial in O(nk) by precalculating the mod. inverses, and looping i up, keeping track of the sum.

        Our answer for this prime is just DP[n][k].

        • »
          »
          »
          »
          »
          5 лет назад, # ^ |
            Проголосовать: нравится +10 Проголосовать: не нравится

          I think you mean DP[s][j-1] on the right. It is the same as I have written. (i+2)*dp[i+1][j] — (i+1)*dp[i][j] = dp[i+1][j-1], if we keep track of the sum in your formula.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +10 Проголосовать: не нравится

      Ok I see it may not be slow, since n has atmost log(n) prime factors, this will be done in less than log(n)*k*O(1) iterations

»
5 лет назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

Problem D, if n = 6 and k = 2 then why does 1 has 9 ways? I could just figure out 4 ways:

  • 6 6 1
  • 6 1 1
  • 6 3 1
  • 6 2 1
»
5 лет назад, # |
Rev. 3   Проголосовать: нравится -8 Проголосовать: не нравится

The system testing that's still pending but running at the same time and gives failed systest on A for everyone seems broken.

UPD: Now it gives AC, but the rest is still wrong.

UPD2: Now it's ok, but it said "system testing, standings frozen" for a while.

»
5 лет назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

сложно быть туристом — не занял первое место получай минусы :)

»
5 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Could someone please explain/provide a hint for solving D.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Great Hint: In this problem E(XY) = E(X)E(Y),  gcd(X, Y) = 1.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Not sure if this will get AC because I didn't manage to get it working in time but here goes:

    1. get divisors of n by looping from 1 to sqrt(n) (O(n^1/3) can be used for number of divisors) O(10^8)

    2. build directed graph with divisors as vertices and edges going from a number to its divisors O(10^10)

    3. use DP to calculate probabilities O(10^4*10^10)??

»
5 лет назад, # |
  Проголосовать: нравится +21 Проголосовать: не нравится

never expected that bitset.count() is so fast. is it supposed to be O(N/128) or its constant is low like everything else in stl?

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I thought it's supposed to be O(1)

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится -7 Проголосовать: не нравится

      In GCC it's O(N) (proof).

      • »
        »
        »
        »
        5 лет назад, # ^ |
        Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

        Depends on flags. With -Ofast -march=native, it's O(1): godbolt

        Bitset .count()'s "complexity" then of course is n / 64 * O(__builtin_popcount()) = O(n / 64) (probably even faster due to vectorization)

      • »
        »
        »
        »
        5 лет назад, # ^ |
          Проголосовать: нравится +18 Проголосовать: не нравится

        I am not care about contribution, but it's anyway annoying to get downvotes for the correct answer for non-trivial question. Dear green's and lower, do you understand that with such behavior you demotivate people to give answers for questions and to share their experience? Imagine that once your question can be ignored because of that and you will be left alone with your problems.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

What was wrong with the solutions to G that failed on test #4?

»
5 лет назад, # |
  Проголосовать: нравится +51 Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Was it possible to do D without using the prime decomposition of N ? With a DP over its divisors

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    But when you know divisors, you know the prime decomposition too.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I meant without the optimisation involving the prime decomposition but I just saw its impossible I'm still wondering why the fonction is multiplicative

»
5 лет назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

Cool C and F. Awesome intro-statement for Um_nik problem.

B bad for beginners, E with bad limits — it's terrible that many people come up with and thought it would be too slow (or: limits wouldn't be so tight then). G is quite standard, and H is tedious to implement.

7/10, the contest could be better, but it was fine.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +14 Проголосовать: не нравится

    why is B bad for beginners?

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится -7 Проголосовать: не нравится

      Implementation, zero thinking. And then there is a jump to much harder to solve problem C.

      It's very hard to choose good easy problems. I try to avoid bitmasks (or similar) for example, because some people might not know them. More or less, I remember times when I started programming and I try to invent such problems that are solvable by thinking for such a kid. In my easy problems, one of the best ones was: Given a graph with N, M <= 2000, count triangles (triples of pairwise connected vertices).

      • »
        »
        »
        »
        5 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Are you saying that it's too straightforward? Or that you need some knowledge to solve it?

        In my programming contest experience, iterating over subsets of a set (for example, using recursion or building the subsets iteratively) was one of the first things necessary for me to learn.

      • »
        »
        »
        »
        5 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Explicit bitmask is not required though: one can do the knapsack DP.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +31 Проголосовать: не нравится

    How do you solve F? I figured bitsets would easily do queries 1,2,4 but spent over an hour unsuccessfully trying to work out a bitset solution that works with query 3.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +76 Проголосовать: не нравится

      I stored bitset "is the number of elements divisible by x odd". The third operation is then just bitwise and.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +10 Проголосовать: не нравится

      Yeah, bitsets work.

      Set bit i of set j to 1, if there is an odd amount of elements in the set divisible by i. Then join is xor, multiplication is and.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +36 Проголосовать: не нравится

    I think E is very cool (Though I agree that constraints should be lowered. I see no bad polynomial solutions).

    Is G really standard? For me O(NK2) or KlogK with FFT was quite standard, but then got stuck for like an hour to improve it (and still I have no idea).

    I don't like H neither, sorry.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +10 Проголосовать: не нравится

      For G, I think you can improve the NK2 to NK + N / K * K2 by simply computing a subtree dp only up to the subtree size.

    • »
      »
      »
      5 лет назад, # ^ |
      Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

      Well, in E there are some heuristics which use randomization. After guessing the function you can erase random LIS or LDS and if you've ended with too many sequences — repeat. I wanted to cut it.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +3 Проголосовать: не нравится

      For G, you can get AC with O(NK2) solution. Example: 47935104.

      Polynomials multiplication is good for SIMD optimizations. And compiler can do all the work for you, if your code would be simple enough :)

      Check https://godbolt.org/z/2r_bdG for nice comparison of source and assembly codes. You may notice, that lines 95 and 90 (most nested part of source code) are assembled into operations with 256-bit registers (ymmD).

      • »
        »
        »
        »
        5 лет назад, # ^ |
          Проголосовать: нравится +3 Проголосовать: не нравится

        Yeah, but I don't like it when knowing how to write a fast solution to a contest problem, or knowing that some solution is fast, depends on knowledge of hardware features like SIMD or cache. It can even break problems where the author doesn't realise that some bruteforce can be very fast.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится -28 Проголосовать: не нравится

    E in ? Radewoosh, go fuck yourself with such limitations.

    I would spend less time on this problem if I would code it right after coming up with solution.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +89 Проголосовать: не нравится

      Hahaha, I really agree with you on expected complexity, however I think it would be great if he followed the footsteps of your iconic comment https://codeforces.com/blog/entry/49932?#comment-339270 and replied "Also, I've consciously chosen TL to fail people like Um_nik" or ""I would spend less time on this problem if I would code it right after coming up with solution." — that's exactly why you didn't get it accepted" :D

      • »
        »
        »
        »
        5 лет назад, # ^ |
          Проголосовать: нравится +4 Проголосовать: не нравится

        Goddamn, did you remember that comment for like 2 years? holy sheet.

        • »
          »
          »
          »
          »
          5 лет назад, # ^ |
            Проголосовать: нравится +18 Проголосовать: не нравится

          You would be surprised how my mind is capacious when it comes to anything related to competitive programming. We just really liked this comment so it stuck in our minds — probably many of you remember gags like sorry_dreamoon or notorious coincidence even though they were long ago as well.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How do you solve C? I tried my solution many times but it kept failing on test case 4.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

what is hack for problem B?

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

MikeMirzayanov During this contest I was unable to hack in Qutebrowser (version 1.1.1 based on Chromium 56.0.2924.122) and in Firefox (version 64.0). I was able to view the code, but when clicking Hack the input field for the hack didn't load and I only saw a spinning wheel. Only with my third browser, Chromium (version 71.0.3578.80), it worked.

»
5 лет назад, # |
  Проголосовать: нравится +119 Проголосовать: не нравится

I'm sorry if this is not the right place to do it, but during the contest there was a participant in my room who obfuscated his code (as you can see here: 47912509). I couldn't find any report button so here I am. Is there anything that can be done? Thanks in advance!

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

In problem C, what's the answer for the case:

4

(()

)

((

))

The pairs 1 — 2 and 3 — 4 form the same bracket sequence (()). So the answer is 1 or 2?

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    1 — 2 does not form a bracket sequence.

  • »
    »
    5 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    If second string is ")" answer is 1. If second string is "))" answer is 2. You don't care if some pairs form the same bracket sequence.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +1 Проголосовать: не нравится

      "The task is to connect some of them into ordered pairs so that each bracket sequence occurs in at most one pair"

      Reading this i think that each bracket (form by a pair) has to be unique. In this way the problem became significantly harde.

      • »
        »
        »
        »
        5 лет назад, # ^ |
          Проголосовать: нравится +3 Проголосовать: не нравится

        When it says "each bracket sequence occurs in at most one pair" does not mean that the result should appear once. Means that you can pick every element and add it to one unique pair and not to multiples.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    Ans:2 we need the highest number of pairs of correct sequence. No need for finding unique sequence of the pairs.

»
5 лет назад, # |
Rev. 6   Проголосовать: нравится 0 Проголосовать: не нравится

Problem D :
dp[n][k] = (1/x)*dp[divisor_1][k-1]
            + (1/x)*dp[divisor_2][k-1]
            + ..... + (1/x)*dp[divisor_x][k-1].

Here x = number of divisor of n.
dp[n][k] will be like this for example : dp[4][1] = {1*(1/4) , 2*(1/4) , 4*(1/4)}. and so on.

PS : Here one optimization is instead of taking divisor as dp state we can take divisor count as first dp state as only number of divisor matters for expectation.
For example 4 will have 3 divisor and so does 9.
dp[4][1] = {1*(1/3), 2*(1/3), 4*(1/3)}
dp[9][1] = {1*(1/3), 3*(1/3), 9*(1/3)}
We only need to count dp[3][k] -> here 3 is count of the divisor and not number it self.

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

for F its my solution of F 47939459 get MLE, but any other AC solution's memory (bitset <7001> bs[1e5+1]) just like my solution, whats wrong with my solution?

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    I assume you mean problem F (not G).

    Your int gc[7001][7001]; takes ~186.97 MiB, and bitset <7001> bs[100001] takes ~83.54 MiB (these figures are not exact). Summing up, they take ~270.52 MiB. Sorry to hear that.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

20 minutes delay on a problem --> 1000 positions in the standings. Gotta love this difficulty distribution.

»
5 лет назад, # |
  Проголосовать: нравится +34 Проголосовать: не нравится

When you solve A,B,C and your C get runtime because your vector size is 1e5, but need 5e5

»
5 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Can someone help me with the Problem C? my submission1 failed, I changed unordered_map to map, and instead of for(auto x: m), I used an iterator to loop, The solution is accepted. I couldn't figure out what was the issue I had?

Submission1

Submission2

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    int b = m[-1*x.first]; This one potentially changes the map (if key -1*x.first wasn't in the map). Which breaks iteration over it (if it's unordered_map).

    Spend 2 hours debugging same issue :(

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Thanks, I created a blog for this before checking your reply, btw it (unordered map) was passing with clang++17 diagnostics. Do you have any idea why is it so?

      • »
        »
        »
        »
        5 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Well, I don't think clang++17 diagnostics (or any automatic tool) can catch all possible bugs in the code.

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится +130 Проголосовать: не нравится

My screencast will be available here: https://youtu.be/UxtEMlc0sHM , including getting problem H correct 30 seconds after the end of the contest (just checked in upsolving), which would be just enough for the first place :) Oh well.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

So why THe function Expectation of D is Multiplicative ?

»
5 лет назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

What happened to CF-Predictor?

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Probably too many F5's.

    Apparently it runs in a free heroku instance, so it might have reached its maximum traffic allowance or something like that.

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится -7 Проголосовать: не нравится

That was a nice contest but i love that editorial.

»
5 лет назад, # |
  Проголосовать: нравится +32 Проголосовать: не нравится

and where is real editorials ?)

»
5 лет назад, # |
  Проголосовать: нравится -136 Проголосовать: не нравится

Probably the worst combined round in Codeforces history, imbalanced and not interesting problems, didnt expect it from Radewoosh

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +32 Проголосовать: не нравится

    At least problems E and F had really nice solutions, G and H looks interesting. Maybe balance wasn't the best, but it's really hard to balance contest correctly and it happens in 80% of contests.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Sorry, but I can't find "hack it!" button on anyone's solution. What it might be? Tried already in Chrome and Edge.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

how to solve c?

  • »
    »
    5 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

    There are 3 cases. The first one is when both of sequences are valid. They are valid, if stack is empty in the end(read about correct bracket sequence). To solve other two cases we have to calculate count of needed brackets in our invalid sequence. For example: (()( to "close" it we need two brackets like ")". Lets define it as need_right. It was the second case. The last one is need_left, i.e. count of brackets needed to "close" for example, this guy )(), need only one from left. It is easy to notice, it's impossible to make our sequence correct, if there is a sequence, that needs brackets from both sides, like )(. So, just push these values into two vectors, sort them and get your answer.

»
5 лет назад, # |
  Проголосовать: нравится +49 Проголосовать: не нравится

real editorial would be nice

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

problem F: bitset pleeeease

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

LOL

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hi. Can someone explain problem B? Is it well-known algorithm that everyone used?

  • »
    »
    5 лет назад, # ^ |
    Rev. 5   Проголосовать: нравится +5 Проголосовать: не нравится

    notice that n <= 15 if n = 15 you will have 2^15 combinations which is small. You can thus try all combinations (at each step, you can either rotate clockwise(add to the current angle) or counterclockwise(subtract from the current angle)). This is very similar to subset sum problem but here you don't have to use DP because n is small. That screams recursion.

    Recursive solution: https://pastebin.com/k6AwE2ur .

    It could be also solved without recursion like this: iterate over all 2^n combinations like this:

    for(int mask = 0 ; mask < 2 ^ n ; mask++){
    
    }
    

    For each mask, iterate over all elements in the array. The current mask describes the state. For example if mask's binary notation is 10111 means that try this combination: *rotate clockwise the 1st,3rd,4th, and 5th elements(clockwise) (positions with 1s). *rotate the second angle counterclockwise (positions with 0). At each state, compute the final angle(adding when bit is 1 subtracting when 0) and check if final angle % 360 = 0.

    iterative solution: https://pastebin.com/F9y9vM75

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

In problem D, how 15/8(mod 10^9+7) = 875000008 can anyone explain to me how to calculate this? thanks

  • »
    »
    5 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    According to Euler's theorem if p is prime and n is not a multiple of p then n^(p-1) = 1 [p] Thus n^-1=n^(p-2) and here 10^9+7 is a prime number

»
5 лет назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

Can we now have the actual editorial please?

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится +23 Проголосовать: не нравится

Where did my rating go?
Radewoosh?

»
5 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

What happend

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

how to solve B.i am new at programming.please help

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Just think in trying all versions (if you turn wheel by a[i] to the right (ans+a[i]) or to the left (ans-a[i]) ). Then check if any of final answers is divisible by 360 (because then it is on 0). Complexity is O(2^n) and on worst case n=15, so it passes time limit.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Does anyone here have successfully solved problem C??? I'm just a kiddo and I am new to coding please help meee I just can't have the faintest notio of it. T.T thanks if u can help

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    You can divide all the brackets sequence into 4 cases

    1. Perfect sequence
    2. Sequence that lack X leading '(' but no excess '('
    3. Sequence that has Y excess '(' but does not lack any leading '('
    4. Sequence that lack both Z opening '(' and ZZ following ')'

    For case 4 it's obvious that you can not make a 'pair' out of it because it needs at least 2 more sequence to complete it.

    For case 1 it must match with another case 1 sequence (Perfect+Perfect)

    For case 2 and 3 we just need to match the sequences that X = Y

    How to find the answer I'll left as exercise :p

    PS. Just a reminder(I think you know this already). To find the case you cannot just take number of '(' — number of ')'. For example, ')(' is not case 1 , but a case 4 because it lack 1 opening and have 1 excess. '(()' is case 3 with Y=1. '())' is case 2 with X=1.

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

[DELETED]

»
5 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

D/E is very cool. Thank you!

»
5 лет назад, # |
  Проголосовать: нравится +24 Проголосовать: не нравится

Suddenly screencast

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

After some searching on codeforces, I found who are Gennady, Petr, Makoto, Egor, Alex, Vladislav and Mateusz. But who on earth is Yuhao on problem C?

»
5 лет назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

A round with two editorials emmm

»
5 лет назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

Please remove the UPD1 editorial now as the contest is already over and so is the fun of the click-bait. Now it just creates confusion.

»
5 лет назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

Why are there two editorials and first one directs me to some singing guy?

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

В задаче D что значит "число 58 — сид этого генератора"?

What does this info in task D "as he always uses 58 as his generator seed" mean???

»
5 лет назад, # |
  Проголосовать: нравится -11 Проголосовать: не нравится

I got WR in problem C with this code using unordered_map 47928656 but I got AC After the contest using map in the same code 47970451 . what the different between them ?? Radewoosh MikeMirzayanov...

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +27 Проголосовать: не нравится

    I'm not really sure about it, but it seems that modifying the unordered map while iterating it is a bad idea and can lead to the undefined behavior.

    Why? Here: mp[it.first] = mp[it.first*-1] = 0; you can accidentally insert new keys to the hashmap (which can happen e.g. when key 5 exists in the map, but -5 does not). This can lead to the rehashing of the hashmap (the hashmap rebuilds from scratch if the number of elements in it is too large compared to its current capacity). Yet, the range loop in fact takes an iterator to the hashmap and advances it over and over again. Now the hashmap can be somewhere else in memory, and you're trying to iterate over the hashmap (which might be already gone...)

    Same story can happen with vectors: https://ideone.com/ds4Rkp. (WTF, why are there zeroes in the output?)

»
5 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

I wrote a tutorial of problem G. https://codeforces.com/blog/entry/64367