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

Автор Errichto, 9 лет назад, По-английски

Hello everybody!

On December 30 at 14:05 UTC/17:05 MSK (check your time zone here) Codeforces will host the New Year's contest Good Bye 2016. The contest is combined for both divisions, lasts 2.5 hours and contains 8 problems. Thanks to Harbour.Space and Barcelona ACM-ICPC Programming Bootcamp 2017 sponsoring the contest, winners can expect really cool prizes:

  • 5 best participants (not ACM ICPC veterans) will win free participation in Hello Barcelona programming bootcamp.
  • 30 best participants (not ACM ICPC veterans) will receive a 30% discount for participation in Hello Barcelona programming bootcamp.
  • 100 best participants will receive t-shrits by organizers and Codeforces.

Hello Barcelona programming bootcamp in collaboration with Moscow Workshops ACM ICPC is a competitive programming training camp to be held between February 6-14, 2017 at Harbour.Space University in Barcelona. Note that lecturers and coaches are: GlebsHP, MikeMirzayanov, Endagorion, Michael, Jacob and snarknews, so the camp must be valuable. The registration is open up to January 20th, 2017.

More information can be found here: http://in.harbour.space/icpc/

I'm an author of problems. I want to thank several people. MikeMirzayanov for creating Codeforces and Polygon and for allowing me to prepare this contest. GlebsHP for his help in everything (hope to work with you again!). mareksom for testing (other testers TBA). My sister for drawing. I also want to thank the Hello Barcelona organizers for providing nice prizes for you.

I'm proud of the problem set and I think that everybody will find something interesting for themselves. I tried to keep statements shorter than usually so it may be a good idea for you to read more problems and choose one that fits you. Obviously, problems will be about the New Year and a little polar bear whom you might know. Since you will face one interactive problem, please read the Interactive Problem Guide in advance.

Don't forget to register. I wish you great fun and no frustrating bugs.

UPD1: The points drop will be adjusted to the round length. It means that for submitting e.g. at the end of the contest gives the same percent of points as in usual 2-hour rounds. Also, I remind you that there will be an interactive problem (as mentioned above).

UPD2: In 750F - New Year and Finding Roots the interactor was printing neibhours in format "k t1 ... tk" instead of "k\nt1 ... tk" (in one line instead of two lines). It's my fault and I'm sorry for the inconvenience. If you were heavily affected, please write to me or GlebsHP. And thanks for noticing/guessing, Gassa!

UPD3, WINNERS

  1. Petr
  2. tourist
  3. rng_58
  4. mnbvmar
  5. Kostroma
  6. Rafbill
  7. Egor
  8. ainta
  9. al13n
  10. molamola.

Congratulations!

Thanks for participating. If you want to know intended solutions, see the editorial (it isn't completely ready yet though). See you next time and have an awesome New Year!

Анонс Good Bye 2016
  • Проголосовать: нравится
  • +556
  • Проголосовать: не нравится

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

Thank you for the large number of problems. It's always more fun to have a choice in what I try to solve (instead of hitting a wall where everything afterwards is unrealistic for me to solve lol).

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

I tried to keep statements shorter than usually

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

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

challange: make your rating 2017!

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

Codeforces Say Goodbye Again! Have a good time! I want to change my username. And how to do that ? THX

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

What do you mean by ICPC veteran? Do you have to be a medal winner to be a veteran or are you a veteran even if you have participated in regionals.

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

I have a lot of games did not attend, in The hope that The contest Goodbye2016 would it be possible for me to rise!

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

8 problems in 150 minutes for a solo contest.

Geez this is going to be tough.

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

    Why? The problems are sorted by difficulty. You don't even have to read all the problems. If I will add three nearly unsolvable problems to the standard CF round, it become harder? Don't think so.

    Even if the problems were not sorted by difficulty, there are many coders who much stronger than you. You can read only problems which are solved by someone.

    And this is combined round, so first problems will be like AB in div.2.

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

      Wouldn't the duration be a bit too short for coming up with ideas? Even for someone (like you) who are able to solve all 8 questions in a competition, I believe that the last three hard questions are going to be challenging enough to worth some time of yours to come up with an approach and 150 minutes seem to be a bit short for top contestants who will sprint through as many questions as possible.

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

        I agree with you but many a times, it is not about trying to come up with ideas about the question but about selecting which problem suits you the best and code it up and get it accepted. Even in ICPC, never has a team (except once) solved all problems or tried to think about all the problems.

      • »
        »
        »
        »
        9 лет назад, скрыть # ^ |
         
        Проголосовать: нравится +31 Проголосовать: не нравится
        1. Your goal is to solve all the problems on the contest? I think you understood it wrong.

        2. Problems are different, you know? If the author (such experienced author as Errichto) thinks that 8 problems for 2,5 hours is good then maybe he is right?

        3. Let's take standard div.1 round and add div.2 AB to the problemset. It takes 5-15 minutes to solve them and it doesn't change hardness of the contest at all.

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

          I think you are right on the second and third point and I've evaluated the difficulty of the round incorrectly by my first impression.

          For the first point I think you are correct too, but I want to be an optimistic dreamer for now, especially when I am not sure how far can I push. =]

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

How many problems in the contest? 8 or 7

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

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

Mike! +17 rating to everyone please!

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

Is the contest rated?

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

Goodbye 2016, Hello 2017 and higher rating :)

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

Is there a possibility that instead of getting funding to Barcelona camp we can get funding to Petrozavodsk camp xD? It is significantly cheaper, so that should be easier to give xD.

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

Nice id of contest : 750

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

The contest is combined for both divisions The red contestants:

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

Limak brings me good luck! :D Yeaaah!!

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

Another contest? Another ** ** ***** meme.

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

A brilliant way to end the year :D.

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

условии задач будут на русском или на английском?)

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

условии задач будут на русском или на английском?)

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

Hoping for expert from this, but now I'm probably jinxing it.

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

may I can also say GOODBYE for Div2

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

To be honest, the thing I care about most is how the gifts will be awarded lol. If winners are the top 100 contestants then I would cry for a moment leaning against the wall...

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

I know I will get lots of downvotes but we just can't forget this meme and specially for new year, let's all say ** ** *****? ***, ** ** *****.

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

Finally I will take part in a round again, after a long time :D

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

Is it rated?

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

codeforcces VS long queue . hope codeforces win :)

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

interesting ... Tourist vs Petr vs AnasAbbas

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

delay, delay, delay :(

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

I hate nothing more than getting ready and then finding the contest postponed xD

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

8.7 k registered users!)

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

10 mins delay

thanks to the delay 9k user registered

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

good bye 2016 with a delay! the last delay of this year :P

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

Contest Delayed. Can't even say I'm surprised!

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

Good to see people informing for the delay in the comments. I was right about to start solving but you reminded me, thanks!

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

Interactive Problem Guide is temporarily blocked by administrator?

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

almost 9000 registrations!! It's going to be furious!

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

I am 100% sure that Problem B is judged incorrectly. There is a difference between going towards the south and to continue moving in the direction that he specified from the start of movement if I am at some place on the earth and I specified that I will move INF kilometers to the right then I will be moving in circles around the earth and I will not stop !! It doesn't mean that I will leave the earth xS

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

worst problemset ever !

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

Tell me result at this test. (task B)

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

B is a shitty problem. sorry.

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

After reading problem setter is Errichto i was expecting a great contest :/

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

How to solve E?

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

please someone call PrinceOfPersia

I miss his problems' difficulty

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

I need to wait 2 minute at last 30 minutes of contest to look code of a participant, it's awful

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

Contest last 10 seconds, going to submit hack case. WiFi disconnected....

life

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

How to approach D?

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

Pretty hard but enjoyable contest I think. Can anyone explain how to solve D? I was looking for some kind of pattern but couldn't seem to find anything that worked.

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

    Hint: Notice that the farthest visited cell will have distance at most 5*30 = 150 (in x and y coordinate).

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

    I did a sort of BFS with memoization for repeated states. Since you could never shoot a firework more than 150 or so squares from the start, you can generously say that there is a 300 by 300 square area where fireworks can explode. Of course, there are 8 different directions the fireworks could be going, and 30 different possible states it could be at indicating how many splits that firework can do. I know this leaves out a lot of information, but you can see the main idea of how you memoize, you can figure the transitions out yourself.

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

      I started thinking along those lines but convinced myself that there'd be too many states to place into a queue but now that I think about it's not bad. Yeah the main idea is pretty clear, thanks for the help!

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

    Simulate the process, but remove fireworks that are in the same location and going in the same direction. There are not that many possible positions of the fireworks, they can be bounded by a 400x400 square, and each firework only has one of eight possible directions.

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

it's over 9000

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

How to solve D?

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

How to solve C?(ternary search?) I remember there was a blog asking for finding maximum value of x where f(x)=1 and where f(x) varies as 00....000....1111...11...00...00. There someone said it was impossible.

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

B was a hard problem at the way i understand:

he finishs in north pol with the same direction as first :|

.

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

I think D is such a great problem (Assuming that I pass system tests of course ;D)!

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

1.Petr

2.tourist

3.rng_58

reminds me of good old memories! ^_^

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

IN problem B, if Earth is sphere, how come he fall down from earth ? Errichto I was expecting to end my year happily :(

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

Apparently the solution for this test for B according to judge is NO :
2
25000 South
15000 North
The earth is a sphere. Why is this not allowed?

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

To be honest this contest was very confusing. I wish some things were worded differently or omitted to make problems clearer.

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

I wasn't able to submit last 20 seconds, the page was loading ... the site is very slow when there're a lot of people. I will be upset if problem will pass systest in practice. : ((

p.s very good problem set : ))

p.p.s HAPPY NEW YEAR.. !!!

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

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

Goodbye 2016. Goodbye rating.

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

Nice Set of problems :) Happy New Year In Advance :) Happy Coding :)

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

What is the answer for this test case for problem C?

20 -2 1 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2 -100 2

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

The 32 pages of people who were hacked on B probably hints at some unintentional ambiguities in the problem.

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

Is it just me, or difficulty increase between D and E is too big? I mean, I expect a lot of people have exactly 4 solved problems.

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

Statements weren't short :|

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

Can someone explain how to solve C? Thanks.

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

Everyone solved C except me.. I participate as an Expert and I solve at most 2, i participate as a Specialist and I solve 3-4, what is wrong with me.

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

Whats wrong with problem B ? Isn't it allowed to move along NS or SN arc on arrival on either of poles ?? It wasn't mentioned.

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

Can someone plz share any ideas to solve problem F?

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

    Find some path from leaf to leaf. For the middle vertex of it, you'll know for sure what depth it's on, and what its parent is. Use that information to find a longer path (you already have a half of it) etc. Some optimizations are needed on the low depths to fit under 16 queries.

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

When you do a good contest: The best problem-set ever When you don't : The worse Come on people!

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

What could be some initial ideas on E?

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

    The first thing I thought about after reading the statement was Mo's algorithm. But then contest ended :( I don't know whether it could be solved using this thing, It's just an idea.

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

    I was going to try using a segment tree to keep track of occurances of 2, 0, 1, 6, 2 followed by 0, 2 followed by 1, and so on until you have a count of all 12 possible combinations. You could easily query how many 2016s were in a range, and then I had a theory that if there was more than 1 2016, the answer would be the min of all vals in my seg tree within the given range. Of course you store a similar tree for 2017, but you only need to check if a single 2017 exists. Shouldn't be to big of a problem on memory, but I figured I didn't have enough time to code it.

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

Errichto, you are the best. I really loved problems from A to E, they are as much complicated as they need to be, the statements are clear and ideas are pretty interesting.

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

Very nice problemset! :)

I wish the duration was longer... The last three problems were really interesting, but I couldn't spend enough time on any of them during the contest. Even top-rated users didn't solve more than 6 (out of 8) problems!

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

Failed to submit solution for F... The connection is not good in china.

Anyway, we enjoyed this contest. Thank you.

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

But we expected nice problemset from Errichto.
:(:(:(

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

Ok, just finished writing D. Here is my approach: Assume starting point is (0;0). Build the first firework and add passed points to the set. Now, instead of running 2 recursive functions for left and right subtree, run only one for the left. Add points to the set. After that it is possible to find all points from the right subtree using symmetry around last point of previous firework ending. Does it make any sense? Will it pass system tests? :D

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

    I think you'll get tle...

    My approach: you can consider a grid of size 300x300, because 30*5 = 150 so if you start at center (pos (150,150)) you won't ever leave any border. You can simulate the steps recursively with this cut: if position (x,y) was visited going on direction d on step i, return.

    if(dp[x][y][i][d]) return;

    And this cuts off a lot because you have just 300*300*30*8 possibilities for these... You go from 5*2^30 complexity to just 5*8*2700000.

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

      Well, actually my solution passed with 139 ms time which is pretty solid. Shame I didn't manage to finish writing it during contest.

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

        Just saw your code... amazing job! :D I said I thought it would be TLE bcause I thought something similar but the way I'd code it (a "dumber" way) it would be TLE... nice

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

        How are you exactly calculating the reflection of a point on the line ? I know that there is a standard formula from coordinate geometry but the problem with that is that the resultant coordinates may not be integers.

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

          Let's say firework is going straight up. In some point P it splits into two. Then one child goes left by 45 degree and another right by 45 degree. For each point from left subtree we can find corresponding one from the right like this:
          rightX = P.x + P.x — leftX;
          rightY = leftY.

          The same way coordinates can be calculated if firework is going straight down. If it is going left or right rightX will be equal leftX and rightY = P.y + P.y — leftY.

          If firework is going diagonally then new coordinates:
          rightX = P.x — P.y + leftY;
          rightY = P.x — leftX + P.y.

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

      Can you tell me why those overlapping state(same depth and direction) won't give any new cells?

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

Flat Earth believers' reaction when reading this problem statement : In this problem we assume the Earth to be a completely round ball and its surface a perfect sphere.

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

What was the idea behind F?

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

    "I didn't participate in contest but I hope this is true.

    After making 11 random guesses, the probability of not to find any leave is 1/2048. After finding a leave, just ask h-2 question to go root."

    I thought it's the solution but when I was writing I realised we can't go to root that simple :P So what is the solution?

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

      Each testcase has 500 inputs, so I don't think a probabilistic method would work. I'm also curious.

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

      of course it's not that simple :D

      I have an idea but I'm not sure if it's correct and it seems it's not the intended one.

      first ask question on any node S, then walk in a random path starting from S you will end up in a leaf, now return to S and walk in a random path too but in other direction, merging the two paths you get a path that starts at leaf and end at a leaf.

      no it's easy to know which node of this path have maximum height (it's middle node in the path), and you also know its exact height (number of nodes in the path)/2, let's call this node V, now go to parent of V and go into a random path until you reach a leaf again you can know which node have maximum height make this node the new V and repeat until you reach a node that is direct child of the root

      the worse case to reach direct child of the root is 1+2+3+4+5 = 15 questions most probably you will ask less

      if you have asked less than 15 questions then you can ask about the direct child of the root and you have two candidates to be root, ask about on of them if its degree is 2 then the node you asked is the root otherwise it's the other node. in this case you you can at most 16 questions.

      but what if you asked exactly 15 questions? then you have to guess the root (1/2) chance of correctness, however if you shuffled to adjacency list of all nodes that you asked then this case will rarely happen. (**UPD**: fruwajacybyk's comment is fixing the this issue in my solution )

      I was going to add shuffle line but time was up before I submit so I don't if this idea will pass

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

      If you have a vertex v with depth d, and a known children u at depth d+1, you can find the parent by doing a walk of length (h-d) from v, not going through u. The walk ends at a leaf if and only if the first edge is not an edge to the parent of v. When close to the root (d <= 2), it is possible to find the root with a search at depth at most d. (It is needed to get under 16 queries). To find the initial vertex, use two disjoints paths to a leaf from a starting node, as the depth of all nodes in the paths are then known.

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

    Search for a long path connecting two leaves, using DFS. When you have a path of length at least 7 then the root is at distance at most 2 from the middle of that path.

    In worst case scenario you need 1 + 2 + 3 + 4=10 questions to get path of length 7. Then there are 7 possibilities for the root. So in 6 questions you can choose among them.

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

    Here's a solution, completely deterministic.

    Start at vertex 1. Choose 2 of its neighbors and ask questions and dfs along those paths until you reach a leaf.

    Now you know which direction is to the root. If you are distance <= 2 to the root, BFS. Else, dfs from this vertex until you find a leaf. Then move back to the top of this path (you can do this because you know the length of the path AND what the depth of the vertex you started at is).

    Now repeat, if you are distance <= 2, BFS. You can check that in all cases this takes at most 16 queries.

    Very ugly to implement though :(

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

Nice quality problems, hard statement for me though. :(

Am I the only one who logged out two times automatically during this contest? Maybe its because of the internet disconnection issue, but is it a feature?

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

The best gift for the new year is a new division!

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

What was the hack in Problem:B ??

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

I think tourist lost first place because comunodi hacked 7 solutions in his room .

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

ААА

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

How to solve E?

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

 system testing__

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

a

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

For problem F my program reads k in a line, but then the real format turns out to be k and ti in the same line

So sad :(

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

Problem B was asking for a solution which was contrary to logic . If the earth is round, even in the South Pole one can go West or East. Goodbye 2016, goodbye rating :( .

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

DELETED

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

Пётр Первый

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

is it rated?

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

can anyone help me with 3rd question of contest http://mirror.codeforces.com/contest/750/submission/23442653 in my above code it shows wrong answer on pretest 1 but when i am running it on my pc i am getting right answer

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

Contest not yet open for practice? I'm unable to submit code now.

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

Problem C: my solution failed on test # 32

What I missed?

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

Solution my solution for B FST at this test case: 2 15072 South 15072 North The system says the solution outputs a "NO" and expected "YES". I use the custom test and paste my solution and the input correctly. But it outputs an "YES" after running..... Sad story... FLOAT TRAP?

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

Please tell how can we clarify a question in ongoing contest?

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

Please tell how can we clarify a problem statement in ongoing contest if we have doubt in it?

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

I wonder when I can submit my code...

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

Tourist lost the first place by just 44 points and was way clear of everyone else. Still got a negative rating change. Such harsh is life once you are on the absolute top. :/

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

why practice submission is closed ?? :(

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

when the round will be opened for practice ?

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

When I can change my nickname ?

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

Symmetry

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

Moral from today's problem D :| If you have choice between bfs and dfs, always choose bfs.

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

Saddest round of the year , I always fail the Goodbye Round(3 years straight)

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

Good Bye 2014, 3rd place, 2894 -> 2898 (+4)

Good Bye 2016, 3rd place, 2895 -> 3030 (+135)

The inflation is surprisingly fast.

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

Ignorance

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

Actually, a straight line from West to East on normal global map curves to across the equater on the Earth. For example, half line towards West from England hits around Mexico.

So I though problem B was very difficult geometric problem at first (><)

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

That moment when you lose the first place because of a newbie.

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

Errichto, GlebsHP and all who helped, thank you a lot! The problems were great. It was the most popular round in the history of Codeforces.

Errichto, looking forward to see you as a problem writer again! I'm really happy to see Limak on the contest :-)

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

IDK why F is not working for me. My solution: http://mirror.codeforces.com/contest/750/submission/23459842 Infinite random tests variant: http://pastebin.com/jE98nJyH At that moments, I always suspicious about author's bug, but for all such situations it was bug on my side.

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

    Found all bugs, when Infinite random starting to find mistakes after adding shuffle of links. It had first link always pointing towards to root, so... simple asking of first link was eventualy leading to root.

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

Can anyone explain problem D?

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

    You can observe that the maximum ends from the starting point, the particle can go is 150 Up,Down,Left,Right. So easily this is a 300*300 grid which our particle than cover. Now, at a given time, our particle can occupy 8 different positions at a cell(The 8 different directions namely). So you can easily simulate this. Think about the memoization states. You'll find there are 300*300*8*30 states at max(row*col*directions*particle_index). Transitions are of O(1) only in between these states as at one states, you can only go to the next two states.

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

Were there anyone who got AC problems C by binary search?

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

I have to say that problem F is ... Wow

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

AC on only B and C, failed systest on A, didn't have time to submit D. Still rating increase????????

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

**LET ME SURPRISE YOU

1.) LOOK AT COLOR AND RATING szawinis

2.) LOOK AT SUBMISSION AND HACKING ATTEMPTS OF P_Nyagolov**

MikeMirzayanov Errichto

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

I'AM SORRY FOR THIS.

Can we change our handle today as its last day of year and it use to happen on codeforces ?

I know this is not right place to ask but , after sending mails and messages to codeforces and Mike i didn't got any reply this was the only option.

P.S post added by Mike we can change handles now :)

Thanks sir, Happy New Year all.

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

Problem D:my solution failed on test 15 and don't know what did I missed........

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

I think something is wrong with the interactor in 750F. In particular, the statement says

In any moment if the program reads h = 0 or k = 0 it should immediately terminate normally (for example, calling exit(0)). It means that the system detected incorrect request/output from your program and printed 0 because if can't process your requests anymore. In this case you'll receive verdict "Wrong Answer"

Yet, compare these two submissions: 23457950 and 23457959 (sorry for the weird indentation idk why). I assert against querying out of bounds and get RTE, while without it I get TLE even with the exit(0), rather than WA.

I spent the last 40 or so minutes trying to debug and find the infinite loop — but it doesn't exist and only in the final couple minutes did I realize the issue was simply a flaw in my algorithm. This is partially why I had 20 incorrect submissions — verdicts weren't making any sense. Am I missing something here?

Anyway, I thought it was overall a nice contest (although I have some qualms with the higher problems) so thanks for giving us all a fun way to end the year!

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

Errichto For problem B Div2 if a person is at the south pole will he not always move towards the north pole regardless of any given direction and therefore while passing through the poles the person would always move towards the other pole?

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

А будет Dratuti 2к17?

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

Limak after he read problem B

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

There is another way to solve C using binary search. I can't understand why it works, but it passed all tests.

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

Will there be any news about discounts?

I don't want to go to the Barcelona camp so I am curious if my prize can be given to someone else.

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

Congratulations to Petr for beating tourist at Good Bye 2016 contest.

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

I'm curious about how the top 100 t-shirts are going on...

Anybody received it?