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

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

Round 2 of the 2020 Facebook Hacker Cup is less than 48 hours away!

The round will begin on August 29th, 2020 at 10am PDT and will last for 3 hours. The contest can be found here.

You're eligible to compete in Round 2 if you scored at least 25 points in Round 1.

Everyone who solves at least one problem will receive a Facebook Hacker Cup t-shirt, and shirts for the top 200 contestants will include a “Top 200” badge! We'll begin shipping out t-shirts by early 2021 or earlier, at which point the winners will receive emails with tracking information.

The top 200 contestants will also advance to Round 3, taking place on Sept. 12th. Please note that all submission judgments will only be revealed after the round end, and that time penalty will be used to break score ties. More details about rules and other information can be found in the FAQ.

We wish you the best of luck, and hope that you enjoy the contest!

The Facebook post can be found here.


Update: The round has ended, thank you for participating! The scoreboard can be found here, and the solutions here.

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

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

How to increase stack size in windows 10? (I am using c++ in sublime text 3)

Was solving https://www.facebook.com/codingcompetitions/hacker-cup/2018/round-2/problems/B

I used g++ -Wl,--stack,268435456 -o setup.exe setup.cpp in command prompt

But still this error pops up:

terminate called after throwing an instance of 'std::ios_base::failure' what(): basic_filebuf::underflow error reading the file

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
  1. LoneFox Can you please share the file size for each problem? It'll help me decide if I'm going to use file I/O and what I should prepare for.

  2. Will the input have the exact same formula as last time (or if there is a new formula, is it possible for you to share it with us)? I'll template, if possible, as the last thing I want to be debugging is input reading.

Thanks!

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

    We'll keep the size of each input file under 8MB (generally much smaller), and some problems will feature expressions for input generation similar (not necessarily identical) to those present in Round 1.

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

      But why keep changing the input method?

      I assumed the input method would be the same as round 1 (on the premise that you'd want competitors to spend their time solving problems and not dealing with input idiosyncrasies), only to be met with an extremely subtle and completely unannounced change, forcing me to debug for 10 minutes. In a competition where penalty is sum of times, this was extremely costly.

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

        Problems may have different requirements for how to reasonably generate input for them.

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

          Not the case here. The shift from 1-indexing to 0-indexing from round 1 to round 2 was unnecessary -- I don't see how having tables with 0 people changes problem A in any way.

          And for the different modulos in problem C, you could have simply supplied the modulos in the input file, and then we would have been able to read all input arrays with the same code.

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

As a tester, I very much enjoyed the problems. GLHF to everyone competing!

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

shirts for the top 200 contestants will include a “Top 200” badge!

That's a pretty cool idea NGL, my only concern being that now it looks less cool to laymen since they'd imagine there's less than 200 ppl with this shirt.

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

Asian coders starting their round at midnight be like:

Nothing's gonna stop me from going straight to bed after 1AC

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

If someone solves only a subtask, can he get a tshirt?

Assuming subtasks exist

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

Input format is so disgusting(except second problem), statements are so long and hard to understand, problems(at least first 2, that I read) are so boring, so I decided not to participate in this round.

I hoped that the problems would be somehow more interesting than in round 1 and qualification round, but I was wrong.

Very upset and demotivated.

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

Why can't I see Petr, Gennady or Mikhail in the standings? Are they already advancing to the finals?

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

I wonder if Tourist, Petr, Errichto, neal and ksun are not submitting just because they know something that people who have completed the set don't? Like, they're thinking about something bigger

Also, ecnerwala made his final submission first, and yet he is shown to be behind Benq Can anyone clarify how are rankings calculated?

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

Penalty as sum of times is stupid.

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

    Why? ICPC does the same thing

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

      But ICPC is a team competition and in my opinion that mitigates some problems that arise compared to individual competition. I agree that sum of times is stupid for individual. You have no way of catching up if you were 5 mins slower on first two problems.

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

      I think it's different because:

      • ICPC has a lot more problems; you don't expect to have solved all problems when the time ends; a problem set is (in my opinion) bad for a contest, if there are at least two teams that have solved all problems
      • ICPC has a penalty for wrong submissions (which, to be fair, I'm not sure it even exists in FHC; if it does, then it's definitely redundant);
      • in ICPC there are three teams, which hedges the risk of potentially solving the easiest problem 5 minutes after other people; in FHC it's devastating to spend 10 minutes instead of 5 minutes on A, because you effectively "lose" 20 minutes of penalty on D;
      • in ICPC you aren't allowed with pre-written code; here, it makes all the difference in top 80; I'm not saying that in other contest it doesn't, but that here it's much too significant;
      • ICPC problem statements don't have a convoluted input parsing scheme.

      Overall I think the ICPC experience is incomparable with this contest, and I've never had the experience of finishing an ICPC contest in 100 minutes without any wrong submissions just to wait for another 30 minutes for people to surpass me, with literally nothing to do but blame myself for not having pre-written templates and triple-checking the input parsing. It might sound arrogant, but I'm sure I'm not the only one in this situation, to feel like the contest was very poorly thought through, with this penalty system.

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

I hope you have good plagiarism detector because i participated in this contest lolololo...

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

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

The input format is getting more and more ridiculous (eg Problem C).

Suggestion: Provide an optional helper script that converts the downloaded input into a larger file with the decoded input. This would be similar to how GCJ provides a helper script for interactive problems see here.

This would simplify the input processing for everyone, and still keep the downloaded file size under control.

LoneFox SecondThread

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

    Thank you for the suggestion! We'll certainly consider alternatives such as scripts or encrypted zip files (at least for next year), bearing in mind that the addition of an extra step in the process and interaction with different software may add a different sort of confusion/complexity for competitors.

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

      It was common in IPSC to give a python script to generate the input, and removing all the hassle from contestants. Also an encrypted zip file looks good too!

      I think any of these strategies will improve the UX, and any new process/interaction/software will be easily learnt by contestants in a 72 hours qualification round.

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

How to solve D? I couldn't even solve an easier version where $$$h[ p[i] ] \gt h[i]$$$.

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

First time, in many years of competitive programming, that I boredom-quit a contest.

Problems B and C were already not the best, but problem D is on the highest level of boredom! What is the point of giving a problem about known techniques that is hard because:

  1. The said techniques are implementation-heavy.
  2. Everything is on a tree to make everything harder.
  3. The input is in an awful format.

A contestant who does not know the technique will never solve such a problem. A contestant who knows the technique reads the problem, sees the solution in half a minute, and then spends half-an-hour wondering what he did wrong in his life to deserve this...

To FHC organizers: Please find some better problem-setters/testers (maybe outside facebook). You are organizing one of the most important contests in competitive programming (and, I guess, you have a budget that is way bigger than the usual atcoder/codeforces contest). Don't waste this opportunity.

p.s. I agree with the replies that B, C were not "bad problems". I did not want to say that they are bad, just that they are not good enough to make me forget about D.

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

Curious to know more about B solution

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

My solution for problem D is successfully validated, but crashed on full input...

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

Rank 200 :P

LoneFox Please tell there won't be any changes in ranklist XD

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

Why you have to torture us with problem like C?

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

the video in problem D is more interesting than all the problems (:

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

Consistently bad after Round 1

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

The only creative thing about problem D is the pun "log-istics team".

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

Never thought I'd find myself as the 201st, with the difference between 200th and 201st place being only 1 second. :(

RIP Round 3

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

I made 6 bugs in reading input in D. SIX!!! Very glad that they show what is actually the valid input that we want to get.

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

https://www.facebook.com/codingcompetitions/fb-hack what is this competition? Is it a team-based CP competition or some other stuff? LoneFox

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

Everybody seems to use dynamic hull, but isn't this really easy with plain static hull? Process tree from bottom to up and build a segment tree over preorder and ech time you get a new node and want to know its value (and some queries for it) just ask about some base intervals and that's it. Only tricky thing you need to care about is that for each base interval all queries regarding it come after all insertions, so you need to build it from what you gathered up to this point first time you query it.

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

    With dynamic hull you don't need a segment tree — simply merge the hulls of children via small-to-large and answer queries at that node. This gets you extremely short extra code (excluding parsing and copy-pasting structure, a single DFS with ~15 lines).

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

Need help in finding error in my dp for problem B.

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

Am I the only one who cannot access the scoreboard? (for both "Everyone" and "Friends") It keeps loading forever.

Tried clearing the cookies, still getting the same result. But opening the scoreboard while in incognito (not logged in) works. Maybe something is wrong with my account.

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

My screencast, 7th place https://youtu.be/Gpsn2P5UY_A (very fast ABC then quite slow D because I didn't copy anything)

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

Can we expect very generous t-shirt distributions in future rounds too?

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

Did anyone receive the email saying that the Round 2 would last for 24 hours, instead of 3 hours?

I planned to compete the next day, as the round started late (1am) where I am living now, therefore I missed the round.

My mistake is not checking the time again in the announcement FB post and this post. But this inconsistency costs me a chance to participate.

Edit: I cannot add the image. Link to the image: https://pasteboard.co/JoGsyHj.png

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

The best thing about this round was free T shirts. I did really like problem A and B, not much implementation and stuff, but problem C was, at least in my opinion, a straight out implementation problem, with zero thinking needed (parse inputs, figure out which edge is where, repeated set operations, etc.). I thought it was just me, but even the editorial didn't offer a better approach. And from other comments, it seems the same goes for problem D. Not that I personally care as I wouldn't have made it into the top 200 either way, but its sad that in such a prestigious competition tougher problem implies implementation oriented problem.

PS :- I did like the effort in trying to make the problem statements funny.

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

Till which date can we expect the t-shirts to come. Really excited for it :P

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

why is tourist not participating in this? Just curious...

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

I have found a strange mail last night. I think this is fake. Is it from hacker cup official?

IMG_20201106_093833.jpg