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

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

Round 1 of the 2019 Facebook Hacker Cup is less than 48 hours away!

The round will begin on June 29th, 2019 at 10am PDT and will last for 24 hours. You can check the start time in your local timezone here.

The contest will be available here shortly before the round begins.

You're eligible to compete in Round 1 if you solved at least one problem correctly in the Qualification Round.

Everyone who scores at least 30 points (regardless of time penalty) will advance to Round 2, which will take place on July 13th. Please note that all submission judgments will only be revealed after the round ends. More details about rules and other information can be found here.

Good luck!

The corresponding Facebook post can be found here.

Update: The round has ended, and solutions have been posted here. Thanks for participating!

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

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

Does the problems visible to the members who haven't attempted the qualification round??

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

Hi, I had commented on the FB post but no reply. I did not received the confirmation mail for the advancement to Round-1 though I had scored 30 pts. Please check that out.

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

This starts in under 1 hour! Good luck to all!

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

Which online compilers should I use for such large input and outputs..

Ideone doesn't seem to work for that

plz help...

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

plz help plz.... fast

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

LoneFox, What is the time limit of problem B.

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

Great and interesting problems, thanks.

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

I first submitted the correct code and the correct output for the 2nd problem, but then I bymistakenly resubmitted the code and the output, but for the output I submitted the wrong file. What do I do? The code I submitted is correct. 6 min timer has expired.

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

What's wrong with this solution for 1'st problem- Add edges as given. Calculate all pair shortest distance using floyd-warshall and then check if it matches with the given information.

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

I came up with a max flow solution for C, but didn't have time to code it. Did anyone else take this approach?

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

    I think it is the only solution.

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

    I also solved it with max flow.

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

    Am I the only one who solved C with DP?. To whom it may concern, link to my code: https://pastebin.com/ziQz0hAp.

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

      I also used DP, but only had $$$N^2$$$ states compared to what seems like $$$N^4$$$ in your code.

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

      Can you please explain your approach?

»
7 лет назад, скрыть # |
← Rev. 4  
Проголосовать: нравится -63 Проголосовать: не нравится

I think I have been judged incorrectly for problem A, I have checked my output by running someone else's code whose code got accepted. Both the outputs match.

LoneFox

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

A solution for problem D.

First, if V = number of points, then every line might be a vertical line, so consider this as an alternative.

Otherwise, at least one line must be horizontal. Sort the points by X and then by Y. Now for each point we think about the solution if this point is the last one with an horizontal line. If it has an horizontal line, all the points that are upper and to the left must have horizontal lines. The points that appear later have vertical lines. Finally, the points that are at the left and lower, might be vertical or horizontal. If some of them can have horizontal lines (based on the value of H), it is good for us (because the additional cost is 0), so we put horizontal lines in those that have a larger Y. This can be implemented efficiently with binary search trees (for instance using the ones in the STL). Of course, if the number of horizontal lines or vertical lines results in a too large value, this option is discarded.

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

Auto comment: topic has been updated by LoneFox (previous revision, new revision, compare).

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

The contest is in Codeforces::Gym: 2019 Facebook Hacker Cup, Round 1

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

Why solutions are not checked even on sample test?

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

Gym's Testcases for Problem A are weak