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

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

Today (January 30th) at 10:00 AM PST / 21:00 MSK there will be the last online round for FHC. Don't miss the round!

As you remember, top-25 contestants will go to the onsite round in London.

Good luck to everybody!

UPD: UP! The round is in 30 minutes.

Обсуждение 2016 Facebook Hacker Cup, Round 3
  • Проголосовать: нравится
  • +124
  • Проголосовать: не нравится

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

So many contests recently, I think I'm overloaded...

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

Image and video hosting by TinyPic

HYPERHYPERHYPERCUBELOVER is so strong :(

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

Suspense

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

How to solve third problem?

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

    On the coordinate plane (k, x) your task is to cover as many points as possible with a geometric shape that looks like a horizontal segment with two symmetrical rays flying from its ends to infinity (both up or both down).

    This can be done with bottom-up line sweeping + interval maximum tree to store how many points are below (or above) the current horizontal on each slope.

    Incidentally, this shape has quite a resemblance to an actual umbrella (and to a boomerang too!) so thumbs up to the writers for choosing this problem name and story.

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

      Could you please provide some details on the line sweeping part?

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

        So you are searching among this kind of shapes (the other case is solved by reflection):

          ___p1____p2__
         /             \
        /               \
        

        It is safe to assume that at least one point lies on the horizontal segment (otherwise move this segment up or down) but in general no such guarantees can be made for the other two segments (see Example 5). Maximize the value left[p] + right[p] over the points p lying on the horizontal segment where left[p] is the maximum number of points that can lie on the part of shape that is to the left (and below) of p and right[p] is defined analogously. When moving from p1 to p2 (see the picture) you need to find a maximum among all the lines between these points and also add +1 for all the lines that are to the left of p1.

        And when moving from a horizontal to another, add this horizontal's points to all the non-horizontal lines:

        ___ p1___p2___p3___p4___
           /    /    /    /
        

        and

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

Well, that went terrible! At least I got a T-shirt :)

In all seriousness, I think after getting A I spent too much time on getting CDE (D in particular), and only in the end realised that B was quite doable. Unfortunately I had only 10 minutes left to write it, and with a minute left to go my code printed 0 for all samples.

As for D, does anyone have any good ideas on how to solve it? I first thought of sorting the (D_i, W_i) in (ascending, descending) order and picking an arbitrary element plus a prefix of the remaining sorted sequence, but this failed already on the fourth sample. I'm curious to hear what others came up with.

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

    Same thing here, I was so sure you needed D to qualify (because it looked so simple), and it never occurred to me that it was actually the most difficult of the contest...

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

In E can one actually fit Karatsuba into TL?

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

My reaction after I see that I jumped to 24th from 60+:

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

l * l. Should be (long)l * l. Oh well, seems like me and Hacker Cup are just not compatible

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

Not a single AC in D. Does anyone have ideas on how to correctly solve it?

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

Added the problems to the Gym: 2016 Facebook Hacker Cup, Round 3.

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

Let me tell you my story.

It was 3 minutes till the end of the contest when I finally figured out how exactly to apply FFT in the last problem. Everything else was ready and FFT code was already copy-pasted. I enter those last formulas, and suddenly they pass pretests on the first try!

One minute left... My heart is beating and my hands are shaking, but I'm still hitting the right button to download the input and to upload the solution. And it passes!!! I can't believe it!

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

Could someone open FHC from mobile? Link: https://m.facebook.com/hackercup/round/704267919677819/

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

    Error 500, I believe they acknowleadged it and said it won't be fixed this year

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

      Yeah, it's certainly something for next year though. I was surprised by the amount of people that wanted to view the rounds on mobile because

      1. You presumably aren't going to submit any solutions on mobile
      2. I don't think I heard of anybody wanting to use mobile last year

      But in retrospect, the use cases are pretty obvious. In untimed rounds you might want to read the problems on the bus or something before you're at a computer and ready to code. In any round you might want to use a mobile device as a separate screen to show the problems while you're coding on a main screen. Etc.

      So certainly we'll work on this for next year.

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

Anyone know the solution to D? The link provided in the solutions doesn't work and the solution in Gym doesn't seem to be correct. (It outputs 3 12 when $$$L=12$$$ and $$$W=[1,2,3], D=[1,4,6]$$$ but I think it should be 2 7).

(EDIT: Solution was added.)