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

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

Hi all,

Very soon the last elimination round of Google Code Jam will kick off.

The top 25 contestants, along with last year's champion tourist, will advance to the onsite final round.

Let's discuss the problems here after the round.

Good luck!

UPD: contest starts in less than one hour, you can load the dashboard now.

  • Проголосовать: нравится
  • +78
  • Проголосовать: не нравится

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

How many problems do you expect? 4 or 5?

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

Quite strange problemset.

During the contest I bet no C-large will pass (geometry with no example). Surprisingly 19 passes!

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

    But only one of them ranked in top 25.

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

    There is almost nothing from geometry in the solution. You only need to find a time interval in which two particular asteroids are closer than a particular distance, and that is just an inequality.

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

      Figuring out the coefficients from those asteroids and then solving quadratic inequality is something nobody likes and also not that straightforward for most people and it demands a slight part of geo3D library (however one that most people should be able to write during contest, but again not something people like). However when preparing to WF16 I coded problem A from WF12 about asteroids, so it was very tempting for me to solve that problem, because I simply copy-pasted all of the needed code for geometry part :P. I made a bet that D large will be sufficiently hard so that it won't be required to qualify and I have big advantage in problem C, so I will solve it significantly faster than others. Turned out both assumptions were very wrong...

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

        I didn't manage to solve C. But about that interval of times, I think that you can find the optimal t(which generates smallest distance) for each pair of asteroids through ternary search. Than, I thought that you may want to bynary search the answer so for a maxD, you can binary search the t in each of the two segments [0, t] and [t, inf) where t is that optimal time for those two fixed asteroids. Unfortunately, after determining these intervals of time, I was unable to solve the remaining problem (which I guess was the hard part).

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

    I needed just a few extra minutes to finish solving C-large. The problem is not very hard if solved the right way. My solution maintains a graph, where there is an edge between two asteroids if it is possible to jump between them. A list of events (edge added, edge removed) is generated and processed while maintaining the set of reachable asteroids. For isolated asteroids, there is also a "time limit", but it is only checked when this asteroid is connected again (if this is done too late, it is marked as unreachable). I think that the complexity is , because, while many asteroids may become reachable as the result of event, only at most two can stop becoming reachable. The only "geometric" part is to compute, for two asteroids, the time when they become within distance d from each other and when they stop being within such a distance.

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

I need 6 dropouts. Fat chance :(

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

    Too bad. :( The scoring was really weird; IMO solving C-large is a lot more impressive than solving D-large!

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

      If the points for C-large were >= than the points on D-large, then I would expect the contest to go the other way: almost everybody would try to get C-large, since that problem is difficult but it's clear in which direction to move and one can make progress, whereas with D-large one may get stuck for a long time and only then see the solution.

      As a result, most if not all people in top 25 would end up solving C-large, and there would be many people disappointed for two reasons: failing C-large because there are a few tiny implementation details that are easy to get wrong, and not advancing despite solving the difficult D-large.

      Also, I didn't expect so many people to solve D-large — it seemed harder to me.

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

        I see your reasoning: C-large was the only problem this GCJ where the Small input didn't help you at all with debugging the Large. But it seems worse to not go to the finals after getting C-large because you didn't realize D-large was mandatory. :) (I'm not bitter; I didn't solve either of them!)

        I agree D is a hard problem, but it's a math problem with no implementation, and there are a lot of reeeeeally clever people competing...

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

    You could get a WF ticket last year, and I also need 6 dropouts in this year. Wish me luck! :)

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

It turned to rather has no meaning, but "8+17" was a really strange partition of point for C. I would rather set 1+24.

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

Can someone please explain how to solve problem B?

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

Btw, why GCJ doesn't ignore additional whitespaces? I was struggling for a long time with B, because I put an additional endline after "Case" templated thingy, because I remembered empirically observed rule that if output is not of constant size then there used to be end of line there :.

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

    Yeah, I guess this is mostly for historical reasons (wow, it's our 9th Code Jam using this platform now!). We try to write the problem statement clearly (in this case it said "For each test case, output one line..."), but I agree that ideally we would not care about newlines in your output.

    Sorry you had to struggle with this.

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

Maybe points weren't adjusted properly but problems were very nice! I feel bad for my bad score because topics were perfect for me :/

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

Fun fact: There doesn't exist a person so that taking all his points he earned in C or giving him all points in C he didn't earn changes whether he qualified. Null. Zero. Nada. Nil. Zilch. Zippo.

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

How to solve A?

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

I get 7-th position, I'm very happy ^_^.

But there are the exam in my university in 8/5 (;_;).

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

Contest editorial is available at last.