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

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

Hello everyone!

Another year has gone by. The last Codeforces contest of this year will be tomorrow, 29 Dec, 15:35 UTC.

The round details:

  • combined div1+div2
  • 8 problems
  • 2.5 hours
  • rated!!!

I'd like to thank the following people for helping with the round: KAN, winger, AlexFetisov, zemen, xiaowuc1, MikeMirzayanov. Without them, this round would not have been possible.

Scoring distribution will be posted later. Make sure to read ahead on the problems, since there may be some later problems that are easier for you. I hope to see you all at the contest, and good luck on the last chance to increase your rating this year!

EDIT1: The scoring distribution is 500-750-1000-1750-1750-2000-2750-3500

EDIT2: There will be a five minute delay for starting.

EDIT3: Editorial is here: http://codeforces.com/blog/entry/56713

EDIT4: Congratulations to the winners!

  1. Petr
  2. dotorya
  3. V--o_o--V
  4. Radewoosh
  5. Endagorion
  6. rng_58
  7. PavelKunyavskiy
  8. jqdai0815
  9. mmaxio
  10. Reyna
Анонс Good Bye 2017
  • Проголосовать: нравится
  • +1310
  • Проголосовать: не нравится

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

Is it rated or not?

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

Be careful, you wrote "17:35 UTC" instead of "15:35 UTC".

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

Expert this contest!! Good luck to all and have fun, hopefully 7k will participate. Thanks Mike for everything this year.

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

Mathematically speaking, would the ratings of Div2 participants be affected in any way in a Div1 + Div2 contest as opposed to only Div2 contests?

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

"Make sure to read ahead on the problems, since there may be some later problems that are easier for you." — smelling something fishy. Hoping it will a be memorable contest.

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

What does the Good Bye contest say: "Long time no C"

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

"Make sure to read ahead on the problems, since there may be some later problems that are easier for you"

Love the suspense! Can't wait!

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

Can't wait to participate the contest, if I don't drop to div2 I can then finally propose a CodeForces contest. :D

Note to self: Don't stay overnight for a programming contest ever again.... ZzzzzZZZZzzzz

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

Wish everybody high rating in the last contest in this year and good holiday mood!

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

Happy new year codeforces !

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

Will the ratings be calculated separately for div 1 and div2 even though we are in the same contest? I feel that, unless rating changes are calculated differently, div 2 participants will be less likely to gain rating if they are in the same pool as div 1 participants.

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

    that just means div1 people gain more rating!

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

    I think otherwise. As the cf rating formula uses rank/(expected rank) as rating change coefficient, Div. 2 participant's are expected to be after div1 ones, so if they do a bit well they could get way bigger change that normal div.2. But if div1 gets beaten by few div2 people he'll farther from first place whereas expected ranks stays the same.

    PS. Out of my experience I do get biggest changes on combined rounds.

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

I hope 2017 ends making me a Specialist.

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

I bet for 10K+ Registrants! <3

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

So what's your New Year's Resolution ?

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

Are both div1 and div2 participants taken into consideration while calculating the rating change of a div2 guy?

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

Editorial right after the contest will be great, hope you will work on it.

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

If this contest goes unrated MikeMirzayanov will give 100 + rating to everyone , Happy coding guys and girls !

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

How to solve D ? Update: I have mistakenly commented here. :p :p

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

Restrations.. :p 2015  2016  2017 Pending.....

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

educational round rating update and goodbye 2017 will overlap :|

PS: For the first time you can enter a round with a rating and end it with another one!

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

Probably Lewin is thinking of a script such:

if(comment.writer == "metsuka"){
    GetRidOfThisComment(comment);
}

P.S. : baw bekesh biroooon!

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

LoL there is already another div2 contest in the new year!

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

Why still do not turn on New Year's magic?

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

Codeforces is reliable, as usual...

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

Considering that educational round's system-testing will happen during this contest , wouldn't it be too much of a load for the server since this contest is anyways going to have much more traffic that average?

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

Good luck everyone on the contest and in new 2018 year!

I want to believe that codeforces will have less lags in next year then in this year!

And also thanks to the guys who created an anime-contests, they was really good. I want more anime-contests in the future, does anyone else want it too?

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

Will we be able to change our handles this year?

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

My rating changes at Good bye contest:

  • Good bye 2014: -114
  • Good bye 2015: -28
  • Good bye 2016: -71
  • Good bye 2017: -???
»
6 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Won't the questions sorted by difficulty like in regular contests?

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

Good luck to all the participants! I hope all the participants will get high rating! Happy New Year 2018!!!

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

 I guess there must be a question on tree(Christmas tree)

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

Good luck. Have fun!

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

I wonder if there are T-shirts for the well-performed?
I'm looking forward to that!

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

We are waiting for Scoring distribution

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

The contest is combined for both divisions The red contestants:

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

4500 registrations and 8.5 hours left. I think we'll have at least 8.000 participants. I hope that the site will work

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

祝大家元旦快乐!

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

Happy new year Codeforces!!!

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

scoring distribution will be 500-750-1000-1500-2250-3000-3250-3500.

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

а во время раунда фаза взломов на эдакейшене будет открыта получаеться во время раунда будут начисляться рейтинг для тех кто участвовал на эдакейшене ? или после ?

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

Let's hope we can see the fight between tourist and jqdai0815

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

Will magic color effect be activated this year ?

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

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░██░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░██████░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░█████████░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░████████░███░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░█████████░░███░░░░░░░░░░░░░░ ░░░░░░░░░░░░░███████████░░░██░░░░░░░░░░░░░ ░░░░░░░░░░░░██████████░░░░░░██░░░░░░░░░░░░ ░░░░░░░░░░██████████░░░░░░░░░██░░░░░░░░░░░ ░░░░░░░░░░█████████░░░░░░░░░░░██░░░░░░░░░░ ░░░░░░░░░█████░░░░░░░░░░░░░░░░░██░░░░░░░░░ ░░░░░░░░████████░░░░░░░░░█████░██░░░░░░░░░ ░░░░░░░░░░░███████████████████░░░░░░░░░░░░ ░░░░░░░░░░░████████████████████░░░░░░░░░░░ ░░░░░░░░░░██████████████████████░░░░░░░░░░ ░░░░░░░░░████████████████████░░██░░░░░░░░░ ░░░░░░░░████████████████████░░░░██░░░░░░░░ ░░░░░░░████████████████░░░░░░░░░░██░░░░░░░ ░░░░░░████████████░░░░░░░░░░░░░░░░██░░░░░░ ░░░░░████░░██░░░░░░░░░░░░░░░░░░░░░░██░░░░░ ░░░░███████░░░░░░█████░░░░░░█████████░░░░░ ░░░░██░░████████████████████████░░░░░░░░░░ ░░░░░░░█████████████████████░░░██░░░░░░░░░ ░░░░░░███████████████████░████░░░██░░░░░░░ ░░░░██████████████████████░░░░░░░░░██░░░░░ ░░██████████████████████░░░░░░░░░░░░███░░░ ░███████████████░█░░░░░░░░░░░░░░░░░░░░██░░ █████████░█░░░░░░░░░░░░░░░░░░░░░░░███████░ ░░░░░░░███░░░░░░░███████░░░░░░██████░░░░░░ ░░░░░░░░███████████████████████████░░░░░░░ ░░░░░░███████████████████████████░██░░░░░░ ░░░░██████████████████████████████░███░░░░ ░░░█████████████████████████████░░░░░██░░░ ░░█████████████████████████░░░░░░░░░░░██░░ ░█████████████████████░█░░░░░░░░░░░░░░░██░ █████████████████░█░░░░░░░░░░░░░░░░░░░████ ░░░░░███████████░░░░░░░░███░░░░████████░░░ ░░░░░░░░░░░░░░░░███░█████░█████░░░░░░░░░░░ ░░░░░░░░░░░░░░░░████████░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░██████░█░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░██████░█░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░█████░░█░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░████░░░█░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░████████░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░███████░░████████░░██░░███████░░░░░░ ░░░░░░░░░░░██░░██░░░░██░░██░░██░░░██░░░░░░ ░░░░░░░░░░░██░░██░░░░██░░██░░██░░░██░░░░░░ ░░░░░░███████░░██░░░░██░░██░░███████░░░░░░ ░░░░░░██░░░░░░░██░░░░██░░██░░██░░░██░░░░░░ ░░░░░░██░░░░░░░██░░░░██░░██░░██░░░██░░░░░░ ░░░░░░███████░░████████░░██░░███████░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ONE MORE TIME HAPPY NEW YEAR !!!!!!!!!!!!!!!!

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

Can i change my handle?

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

So, all the 8 problems are set by Lewin and the others who are mentioned in the post just helped to prepare the round, not setters, right? WOW ! Great !!

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

Wish a color-change round!

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

Rush to purple or higher :)

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

    is that possible in codeforces rules? i mean going two levels up using one contest

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

      I think a lot of people jumped from candidate master straight to international master by getting around top 50 in a div1 contest.

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

Is it advisable for a contestant who gets around 1000 rank in Div2 contests to participate in combined (Div1 + Div2) rounds?

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

another goodbye contest , great =)

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

This is such a big contest! Feel a little nervous:)

Try my best to get a good ending of 2018.

Hope everyone will have a good ending in 2017 and get a higher rating in 2018.

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

Can every contestant get +50 without reason as a new year motivation gift? :D MikeMirzayanov

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

for CF-Predictor users:

Rating prediction for Good Bye 2017 wouldn't be as accurate as always, because previous educational round not judged yet, so div2 users that participate in it have unknown rating. I decided to use predicted ratings from educational contest as initial for Good Bye 2017.

===================================================================

Good luck & high rating and Happy New Year!

===================================================================

Предсказание рейтинга для Good Bye 2017 к сожалению будет не таким точным, как обычно, потомучто до сих не проведена финальная проверка последнего educational раунда. Таким образом у участников educational раунда (из второго дивизиона) не известный рейтинг на момент начала Good Bye 2017. Я решил, в качестве апроксимации начального рейтинга перед сегодняшним контестом взять предсказания по educational раунду. Надеюсь, что расхождение будет не очень значительным:)

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

If the sys test process is programmed to start automatically right after the educational round end, don't forget to disable it, or we will be getting 2 hours queue.

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

Can i cancel registration?

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

Is 2.5 hours enough for 8 problems to solve? Thanks!

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

I lost a girl recently ,so I hope I could do better in codeforces....

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

I'm anticipating a lot of math problems. Everytime Lewin organizes a round, there are plenty of beautiful math problems that I always fail on :(

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

But... it's not even december 31st..

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

Hope for shorter statements :)

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

Happy new year !!! In this 2018 I hope that we will be better than last year, and of course I wish good luck to the all contests in 2018.

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

After a long time contest=(Div1 + Div2)! :p

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

CF new winner jqdai0815 !!!

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

Goodbye Div 1 Contest. :|

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

are we going to see first 10k participation :D

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

Waiting for around 15 minutes to post this. Have Fun

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

Goodbye Candidate Master. Hello Expert. :P

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

in queue :| right before contest :|

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

Will there be a delay to reach 10K?

UPD: as expected the first 5 mins delay :"D

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

Good luck, everyone!

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

It is Delayed to reach 10K :D

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

Have been while to see delays...

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

"you may click the link to enter the contest area"

never been so deceived in my life :(

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

Did anyone else get 0:00 on timer and contest not yet started message??

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

What will the rating change base on? My current rating or my rating after edu. round?

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

HOpE there will be no problem like site not available :/

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

Codeforces is slow right now. :(

UPD - Seems fine now :)

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

the server is acting up again

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

dafuq is this contest :(

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

seems like it's DIV 1 + DIV 1.52017

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

I hate this contest so much. First three problems are as easy as it could be, they are just stupid, not for the codeforces, and then just wtf.

I mean, usually people easily make a smooth transition from simple problems to hard problems, what the hell happened to the authors this time? There is even nothing to hack.

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

    Third one is easy if you have any idea about geometry, which I don't.

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

      If you don't know geometry, use a binary search by answer :)

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

        that gave me 3 TLE's

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

          When you do binary search on doubles, you might want to consider stopping after a certain number of steps instead of when left and right are (almost) equal. i.e. do for(int step=0; step<50; ++step) { ... } instead of while(right - left > eps) { ... }. I modified this in your code and "upgraded" it (if you can call it that) from a TL on test 4 to a WA on test 7.

          quick EDIT: I looked over your code a little bit more and fixed this line: return (one * one + two * two) < (twoR * twoR + EPS); to this: return (one * one + two * two) <= (twoR * twoR);

          ... and got accepted. (In general) Don't use eps for comparisons, only for checking equality. So in principle binary search works, you just need to know how to work with doubles :P

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

    You know what to do, do you?

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

    Have you read F?

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

The problem provider use Math f**k me.

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

If I submit 2 solutions and both clear the pretest will I still face a penalty of 50 points During this contest me second solution which I submitted after 4 min of the first sol my score was approximately 50 less

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

    Resubmission gets you penalty every time except compilation error or wrong answer on sample 1.

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

      even if both sol are correct and accepted? Thanks

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

        Yes. Even more: if you got accepted and then WA, your WA will be scored (I'm not sure if that's true if the WA fails pretests, but it definitely is true if both solutions passed the pretests: in that case, your last submission is considered to be your choice).

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

    In the score table, you can see each resubmission is -50. Only the last submission that passes pretests will be judged. Everything else will be ignored.

    So, yes, you still get a penalty.

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

    Yes, you will face a penalty of 50 points, similar thing happened with me.

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

I don't understand why my submission for 2C fails pretest#1 even though it matches the output in the problem statement :S

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

Am I alone who's hating this fucking "Expected number" ? :/

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

    I usually like this kind of problems, though, I suppose, many of contestants never solved this problems, but this time it's something beyond common sense.

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

good bye 2017 && rating

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

What’s up dotorya, I am ko_osaga from South Korea. I’m a huge fan of you. You were 2nd in Facebook Hacker Cup 2017, your team was a Grand Champion at ICPC Daejeon 2017, you and your team continued to amaze Petr for a long time. It is unbelievable. I think your team will be a champion at ICPC WF 2018. I’m doing CP for 4 years and still I’m not like you. I want to improve my skill and be a great competitive programmer like you. How can I be a great competitive programmer like you? What is your training method?? Do you have any secret tips???? Please answer my question. Thanks in advance.

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

    (+ I was writing this 15 minutes before the contest ends, and I'm so sad that Petr got first place — no personal feelings, but it's more fun to troll dotorya when he is in first place)

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

      I have same questions for you :) . How can I be a great competitive programmer like you? What is your training method?? Do you have any secret tips???? Please answer my question. Thanks in advance.

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

      Yep me too(I have been recently following dotorya and he's awessome). But I was sadder before for that Petr would be losing his place for the silliest reason possible. And actually that last minute manoeuvre by Petr made the contest twice as much fun to watch.

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

        I didn't thought that he will lose his first place, but it really happened. Amazing piece of sports :D

        However, I don't know why Petr gained +250 from the Hack. AFAIK He should only gain +200. (3 * 100 — 2 * 50) (UPD : It was fixed somehow)

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

          The last hack happened 1 second after the end of the contest.

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

            Yup I thought you should get +3 -2, but somehow it was written like +3 -1 (-1) and the one from 147:02 didn't count. That was what happened when I took screenshot, but it was resolved right after I wrote the reply. Sorry for the confusion :/

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

            for Petr even time slows down. and a black hole is created,

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

    r, x даны в условии целыми, первые операции сравнения (нужно ли обновлять y у круга через другой нужно проводить в целочисленных операциях)

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

What is the solution for F?

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

Is F an analysis of various cases ?

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

    what is test case 4 of F?!

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

    i have a pretty simple greedy.
    Claim1: Answer is a spanning tree in most cases.(I Will describe corner case later)
    Claim2: Green component is connected by itself
    Now its pretty easy to see that after connecting Green with a chain , we need to connect reds and blues between 2 greens in a block with a chain sort of thing(We leave out the biggest gap here) Corner case (instead of connected 2 consecutive greens with a chain and reds and blues with spanning tree , we can instead make a cycle , ie connected green -> red -> red -> ... -> red -> green and green -> blue -> blue -> ... -> blue -> green).

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

    Yes it is, and it is the worst type of question for a sleepy programmer to pick up in a contest. :/

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

Hack for C.

5 2
1 10 7 3 6

Output: 2.000000000 2.000000000 4.645751311 5.464101615 8.518734657

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

edit since I've calmed down slightly

If you are going to write problems, PLEASE make sure that if you find the optimal solution, you will get the problem right instead of having to fiddle around forever with random implementation details. There is no purpose in having contestants sit around trying to reimplement standard data types or come up with increasingly "creative" (re: sketchy) ways to get around overflow or try to shave off constant factors, at least in a purportedly algorithms-based contest. Whether you implement this by increasing the time limit or setting the problems limits to something more reasonable (k=1000 is just unnecessary considering the normal Python implementation runs fine with k=500 or so) doesn't really matter, but shifting the focus away from algorithms and onto constant time improvements really defeats the purpose.

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

    I don't believe the problem is intended for you to implement fractions, but work with modular arithmetic by calculating the modular inverses by means of FLT or Euclidean algorithm.

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

      Well, official solution reimplements fraction data type, so I think this was intended. Of course modular inverses are a very easy solved problem that is used only at the end.

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

        I read the solutions, and it has no mention of implementing fraction data type. What I mean by working with modular inverses is you don't ever need to work with fractions at all. Instead of a / b use and you obtain the same result, not just the last calculation. With the number of prime factors you can include as part of your input, overflow is bound to happen.

        See for yourself : 33784912

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

          Ok, it is possible that I'm misreading the official solution and there is some graceful way of handling overflow. This isn't really my main point though; I don't care much about whether overflow exists supposing there is a simple way of dealing with it. My main concern/complaint is that doing this problem in Python is evidently practically impossible even with the optimal solution (there are no accepted solutions in Python), and considering that this could have been remedied with a trivial tweak to the limits (that wouldn't allow solutions of suboptimal time complexity), it seems that this was done intentionally which I cannot understand the purpose of.

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

            Well then I don't understand you. The reason your Python solution probably failed is because you allowed the size of your factors to become so large they consume too much time per multiplication, addition, etc. You obviously should have evaluated the time and realised this solution is not practical. I was unaware Python does not support modulo calculations (sarcasm).

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

              I suppose we will have to agree to disagree then -- in my view the implementation is essentially just a means of proving one's solution, and choosing limits so that implementations in some languages are essentially not possible (at least without a lot of constant time twiddling) seems to me to place the focus off of problem solving, which in theory is what these contests aim at. But as I said, I can understand that others will have different interests and will prefer these types of constant-optimization challenges. Of course thanks for your opinion.

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

                So to summarise your point, you believe big-Num multiplication is "constant time twiddling"? Because I doubt your solution fails by only a constant factor.

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

    I see now official solution is to give wrong fraction but one which gives same final answer. Ok, I guess it is possible to figure out this "trick" during contest, but IMO solving the problem should be the important part of the problem and if limits are chosen so that the official solution cannot be implemented (basically word for word) in Python then something is fundamentally wrong with the writing approach. Of course I understand that everyone's taste is different and some people prefer to optimize constant factors, but IMO this isn't really what these kinds of contests are for.

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

    "come up with increasingly "creative" (re: sketchy) ways to get around overflow" : that's basically half of number-theoretic problems.

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

how to solve D?

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

So I was reading problem E and I wondered if the intended solution used any kind of knowledge on algebraic structures, did anyone solve it like that?

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

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

How to solve H ? I have a idea based on minimum clique partition in the graph of AND-components of size

Unable to parse markup [type=CF_TEX]

, with edges corresponding to XOR constraints, but couldn't debug it in time.
»
6 лет назад, # |
Rev. 2   Проголосовать: нравится +14 Проголосовать: не нравится

What is an 'unsuccessful open hacking attempt', showing for Petr in the scoreboard?

edit: now it doesn't show anymore

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

How to Solve D ?

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

    Notice that every time you place 'b' amount of subsequences "ab" increases by the current number of 'a' in the string. So dp[x][y] — answer if we have x 'a' in our string and y subsequences 'ab'. If x = 0, y = 0 then dp[x][y] = dp[x + 1][y] ('b' in the beginning of the string don't influence on the answer and we will place 'a' in one moment. The thing is that we can place many of 'a'. If x > k, then we will finish our process after first symbol 'b' will appear. So in this case we can add to dp[x][y] x + y(it will be in answer) and then add the expected amount of 'a' untill we will place 'b'. Denote the last one by E, so find it from the equation: .

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

The series for G seemed very 'fractal like'. How do you solve it?

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

How to solve D,E,F?

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

goodbye rating 2017

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

I made 9 successful hacks during the contest. Let me explain what I found...

For problem B, some implementations don't consider the last step. An example of hack is...

2 2

SE

##

0

For problem C, some consider that the intersection will occur between the droping disk and the disk with max index (and, a disk with max y). Examples to both of them...

3 10

10 30 19

5 10

10 10 50 49 30

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

Happy New Year!

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

This Year Gift From CF " No one will lose rating from this contest " (Please) :P

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

double system-test!

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

first of all how the expected value for the 1st example problem of D is 2, as the expected value is 1/4(ab) + 1/8(bab) + 1/16(bbab) +.... which is 1/2. so how it came to be 2 ?

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

Time to back div2. A_A

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

maths too hard~~

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

Codeforces aesthetics

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

Nice upvote :D

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

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

Did anyone see anything like this when trying to hack a solution?

When will MikeMirzayanov finally understand that Flash's place is in a museum, not on a live website?

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

i cant hack any solutions. i have flash player enabled and i locked the problem.

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

Я пытался взломать решение http://codeforces.com/contest/908/submission/33778362

Взлом №390103. http://codeforces.com/contest/908/hacks/390103/test — тест, https://pastebin.com/7Rjq44Xv — полный тест. Последнее число выведенное решением 33778362 это 1693131.02, В этом можно удостовериться, запустив это решение во вкладке "Запуск" с соответствующим компилятором.

Запустив аналогично любое правильное решение таким же образом с тем же тестом, например это http://codeforces.com/contest/908/submission/33768250, можно получить последнее число атпута порядка 1693131.02033480466343462467

В условии написано, что ответ должен отличаться от ответа жюри не более чем на 10^-6, а различие ответов рассмотренных решений больше чем 0.0003, что больше чем 2 * 10^-6.

Из этого я могу сделать вывод, что чекер некорректный. Или я где-то напутал. Что делать?

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

    Ответ засчитывается, если абсолютная или относительная ошибка не превосходит 10 - 6. В данном случае относительная ошибка меньше 10 - 6.

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

What's wrong with trigonometry for C? My trig solution failed systests.

Is it because c++ trig functions break on obtuse angle? (this is my guess from playing around with the code, not sure though)

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

My solution for problem C failed test case 7: "wrong output format Expected double, but "nan" found" . What went wrong here ? My Solution: http://codeforces.com/contest/908/submission/33782812 Thanks.

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

    Your solution could output something like 14.000000000e88, you should use cout << std::fixed for this to work properly.

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

    sqrt of negative numbers returns nan. I don't see in your submission checks for B^2 < 4AC. (If it's always false, ignore this message)

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

Thanks C++ for x + NaN > y being always false.

In task C, I didn't even consider that sqr(2r) may be larger than sqr(x[i] - x[j]). I was just mislead by a picture, that I drew, with two circles touching each other. I identified 2r as hypotenuse length and |x[i] - x[j]| as cathetus length, and c'mon, how a hypotenuse can be shorter than a cathetus? But when |x[i] - x[j]| > 2r, these values clearly have nothing to do with a right triangle sides, so (without realizing this) I got a negative "cathetus length" under the square root in my solution. Lucky me, NaN arithmetics works in C++ as needed to make my code work properly.

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

does the graph have to be connected in F? or does it only need to be connected from the point of view of red / blue?.

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

Can someone explain why the C++17 compiler made my code TLE while C++14 was accepted? During the contest I did not notice that my default compiler was changed to C++17 and simply thought my solution was too slow, but after I resubmitted the same code after the contest and it was AC...

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

    It's strange to see "GNU C++17 Diagnostics" shouldn't it be "GNU C++17" ?

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

EDIT: Found the conceptual error in my code. It would fail systest anyways. Thank you for the help :)

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

    On my accepted solution, the answer on that test case is:

    4.0000000000 4.0000000000 11.4161984871

    Whereas the answer using your code is:

    4.0000000000 4.0000000000 10.2449979984

    I haven't read your code thoroughly (it's a bit messy :P) but from what I can see, when checking what disk touches the one you put in, you only consider the disk with the highest y, but there might be a disk with lower (or equal) y that causes the intersection point with your new disk to be higher :)

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

    Got this from AC code:

    4.000000 4.000000 11.416198

    your code gives 10.x at last position.

    Anyway, you have one of the same bug I had: Don't check max_y. Its possible that even lower y stops the ball at higher position.

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

    Thank you, all of you. I got the bug. I am grateful :)

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

What's wrong with my approach ? Getting WA on case 7. Please help. http://codeforces.com/contest/908/submission/33785962

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

    You are calculating the position of the center with respect to the upper most intersecting disk. But it's can be more lower for any other disk at lower position if the touching point is upper than that of the upper disk.

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

    You should calculate the y coordinate of center for every touching disk and keep the maximum of them.

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

Happy new year Codeforces :D

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

Hello:

Why were all successful hacks not added to the system test data?

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

    I think in general, only suspicious hacks get added (i.e. ones that fail a solution that would have otherwise passed systests).

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

Hopefully Codeforces simply rejudges all solutions with hack tests and does not make it unrated :/

Happy New Year everyone!

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

I think it's the last chance to drop my rating...

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

Even though the contest is over, why has not the new rate been calculated yet ?

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

Почему в задаче F на этот тест правильный ответ 1?

3

1 B

10 R

11 R

Ведь первое условие в задаче: "Рой и Бив хотят соединить все точки несколькими линиями". А последующие условия как бы не отменяют его а лишь дополняют.

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

Can anyone have a look at my solution for B and point out the mistake?

Link

Thank you in advance.

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

    Hint: What happens if you reach the destination exactly after processing the last instruction?

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

    On a quick glance, it seems like when following the instructions, you first make the checks and then take the step, but you should first take the step and then make the checks (otherwise you miss the checks for the last step).

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

In problem A, should I have tried to hack this submission? 33778092

The string size limit is 50 and the char array have size 50. It loop until reach a '\0' character... It have failed sometimes in my computer.

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

    In principle, this code produces undefined behavior which might mean that sometimes it will work and otherwise will not.

    In practice, the array a is allocated on the stack since it is declared locally. a[49] is the last element of a, a[50] references the first address on the stack after the space allocated to a. That element might sometimes be \0, sometimes not, but it is very likely that there will be SOME null byte somewhere on the stack after the space allocated to a.

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

      I think you're wrong. The idea here is that on the stack after a[49] comes variable c, which has the first byte always 0 (because of the constrains) and the loop stops as expected.

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

        (On most systems) things on the stack are pushed towards lower addresses. In other words if you have int a; int b; declared locally, b will be at a LOWER address (even though a is pushed first).

        To test this, you can add this line printf("%08X %08X %08X\n", &a, &c, &a[50]); after the variable declarations and you'll see something like 00B5FA04 00B5F9F8 00B5FA36. As you can see, the address of c is lower than the address of a (and obviously different than the address of a[50]). You can test this with both VS and GCC.

        EDIT: P.S. I've tested the code and on my machine, with VS2017, about 1 in 5 times it will give Wrong Answer. As I've said, the program will keep reading bytes from the stack until it will eventually read a null byte, but in the meantime it might also read other bytes and those other bytes might contain vowels or odd digits (therefore wrongly increasing the counter). Here is an example of this happening (the program prints 1 when the answer should be 0).

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

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

Why the hell is Educational round System Tsting So

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

    As every hack will be appended into the system tests, in some cases/problems the judging process for a submission can be freaking long.

    (As I've seen, there are 140 test cases in total for problem A of this Educational. Not really paying attention of others, but they are surely pretty large as well.)

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

When will the ratings be updated?

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

Finally, blue. :-D

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

A new year with a new color <3'

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

Goodbye 2017. So close to the purple dream, but I believe I'll get it next year.

To anyone reading this: wish you have a lot of "Accepted"s in the new year ;)

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

OMG I became 1599... Not expert T_T

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

Saying goodbye to 2017 is as hard as solving problems of "Good Bye 2017".

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

Nice contest! Anyway, the problem statements have nothing to do with New Year.. :P

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

MikeMirzayanov it seems the rating changes for this round don't appear in the RATING page ,for example Petr's rating changed from 3173 to 3298 ,yet it still shows 3173 in the rating page ,same with me and everyone I know/follow

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

Liked the Problem D. Thanks Lewin

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

-555 in task D is Good Bye 2017