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

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

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

The round will begin on June 14th, 2019 at 10am PDT and will last for 72 hours (3 days). You can check the start time in your local timezone here.

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

Everyone who solves at least one problem correctly will advance to Round 1, which will take place on June 29th. 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.

Registration will remain open until the end of the Qualification Round, so make sure to register if you haven't already, or confirm that your information is up to date if you have.

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

The corresponding Facebook post can be found here.

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

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

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

Here we go again, that would be nice if you had sent an email regarding the start of registration/upcoming qualification beforehand.

Anyway thanks for posting this here, at least now I know there is something I shouldn't miss this weekend.

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

Is there a way to collapse the top bar of the Facebook interface that shows the search bar and notifications for friend requests, Messenger, and posts in your feed? It would be nice to not have social media alerts directly next to the contest environment.

GLHF!

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

    I guess you could probably Adblock/Ublock it somehow. (I think there's some functionality to block webpage elements given their ID or class.) Of course, you'd have to unblock the bar after the round, so it's a pretty rough solution.

    AFAIK, there's never been any way to disable the notifications. And then imagine receiving a message from your friend that's like "um, you aren't doing well on the contest right now :(".

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

    lol imagine waving to your friend while he's doing fhc

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

I deleted my facebook account last year and have been trying to make a new account so that I can participate for the past week. However, my efforts mostly seem to be wasted, I've tried different birthdays, different emails, different names (after failing with my default details). I keep getting a suspicious activity error, following which I give my Phone number and Photo (I've tried changing this too), however, I never heard back after this.

Is there a way I could participate without a Facebook Account?

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

    Everybody must have a Facebook account to participate. Unfortunately, we're unable to expedite your request to open one — sorry!

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

      following which I give my Phone number and Photo (I've tried changing this too), however, I never heard back after this

      This looks like something Facebook can and should help with.

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

        Facebook has standard processes around account creation, which I'm afraid we're unable to personally circumvent.

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

          Having your new account locked by FB is a standard process of account creation at FB? Good to know.

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

            Hopefully you can believe that Facebook isn't trying to decrease its own user count for no particular reason.

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

              >for no particular reason

              No, just the opposite. I believe FB wants only users that actively interact with the cashcow: marketing, or bring other users that will. Accounts created solely for the purpose of competing once a year, with no indication of engaging in regular social media activity (or even worse, with adblocks) don't fit there, so they're promptly autoblocked as "suspected bots".

              Getting people to give FB extra private info to sell is just a bonus.

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

                I have my Facebook account solely to participate in Hacker Cup. I don't use it to engage in any social media activity (no friends, posts, messages, likes, or even an avatar). And I use an ad blocker. But I'm still not banned. What am I doing wrong?

                By the way, I've heard that Petr creates a new account before each year's Hacker Cup, and deletes it afterwards.

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

                  Haha, I obviously didn't mean "you will 100% be banned if", but that FB doesn't really need people like you who don't generate revenue, so there's a decent chance to end up b& and appeals will be met with "lol too bad". That doesn't mean there's a hunt for such accounts. There are plenty of false positives (and false negatives, it's possible to run a bot campaign if you know what to avoid).

                  I've experienced both — making new fake accounts to compete without trouble and getting new accounts blocked because... something. We also have multiple examples in this thread showing that it's a lottery even with accounts made for a legit purpose (competing).

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

    I've never had a Facebook account (I think), but it still asks me for this. No way they manage to get me an account before the first round starts.

    I didn't participate last year since I didn't want to create a Facebook account. It seems this year I cannot even if I want to :/

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

      wow you're so cool

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

      why not create an account just to do FBHC, that's what I did. And all my friends are people who do CP so it wont be detected as a fake profile

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

    Here’s an idea:

    1. set up virtual machine and use facebook through there (copy paste files back and forth)
    2. get residential proxy to your friend’s house or similar (NOT VPN!)
    3. all connection from VM goes thru residential proxy so your real ip doesn’t get leaked

    Then fb can’t use things like evercookie, browser fingerprint, ip address etc. to identify you as a bot/previously identified as bot user. Don’t use vpn or you’re probably flagged instantly for bot/hacker-like behavior. Also you probably shouldn’t submit real name and photos if they already have you in their blacklist of “bots”. Facebook will most likely think you’re a new user and you’ll be good to go!

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

During the contest, are the subs judged on pretests, or just sample?

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

    From the rules

    When will I know whether my answers were right?

    We will judge the submissions after the round has ended.

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

    The only live of evaluation of submissions is of their overall format — that is, if your submitted output file contains the wrong number of cases or if the required "Case #:" format itself isn't satisfied, you'll immediately receive a warning that it's formatted incorrectly.

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

What will it happen if my code is correct but my output is not correct (because I had copy pasted the input into vim and then all spaces were ignored and i didn't realise that in 6 minutes) ?

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

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

    I'm afraid that submission correctness is based on the submitted output file, so please be careful to upload the correct output file within the time limit!

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

      Does this mean that you won't actually try and run the code file.

      I ask this because I also did a silly mistake, and submitted code with file I/O ( with ONLINE_JUDGE flag ) and some cerr statement, which usually work fine, atleast on Codeforces. I also read in rules, that it's ok to do file I/O. So, I just wanted to confirm with you. Thanks a lot.

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

Why does the first problem have 2 outputs (and are 2 outputs for all others)? I mean when I pressed "download input", I had 2 buttons for output. I tried to put in one code and in the other output and also in one sample output and in the other big output. But, although my output is formatted "Case #x: Y/N", I got "formatting error".

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

    One is for your source code

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

      The first one or the second one? I tried actually only the first source code and the second output. But didn't help. The output I wrote like the following (the answers are random):

      Case #5: N
      Case #6: Y
      Case #7: N
      

      Might it be that they want windows' line endings?

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

        The first one is output, the second is code. When I submitted, they had labels saying what they are for.

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

    First button is for the output (i.e. a txt file), second button is for your source code (i.e. a cpp file)

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

Is there a polynomial solution for Trees as a Service? (I did a backtracking worked in 0.1)

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

My nightmare of Mr. X xD I had three two's in my output.

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

    That's because you change only variables. You can also change operators.

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

      Oh wow

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

      You can even change parentheses to variable or anything to anything.

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

      Can you give an example of a case where the answer is two if we are allowed to change only the variable names?

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

        My solution says ((x&x)|(x&x)) is one of them.

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

          So you change the '|' operator to '^' operator. Wonderful. I didn't notice this, I just took some examples and noticed that the answer is always 0 or 1 and I trusted my gut, and went ahead with this logic. Had I seen this example, I might have coded a dp solution with some 2s in it.

          Thank you very much.

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

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

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

Mr. X problem:

Am I only one who wrote dp solution, and only after seeing the output of code, get the answer only 1 or 0.

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

In the last problem, the solution posted here mentions that

If any of its subtrees fail to be constructed due to future constraints, however, we should terminate rather than backtracking and considering more possible roots r, as any other choice of root would not yield a meaningfully different partition of subtrees which would avoid violating those same future constraints — the same combination of conflicting constraints present together in that invalid subtree would still end up being present together at some point in the construction process.

Can anyone clarify why this is correct? Thanks in advance.

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

    For example, you are trying to choose root $$$r$$$ from the set of vertices $$$A$$$ and suddenly found such set $$$B \subseteq A$$$ that you can't build correct tree for $$$B$$$. (Correct = all conditions with $$$x,y,z \in B$$$ are true). Condition from set of vertices $$$V$$$ is such $$$(x,y,z)$$$ that $$$x,y,z\in V$$$.

    So, you want to prove that you can't build correct tree $$$T_A$$$ for $$$A$$$. Imagine you can. Consider $$$T_B'$$$ as the smallest subtree in a rooted tree $$$T_A$$$ which contains all vertices from $$$B$$$. First of all, root of $$$T_B'$$$ is one of $$$B$$$ vertices: imagine it is wrong. So, when we were building tree with root $$$root(T_B')$$$, we somehow split $$$B$$$ into two (or more) disjoint sets of vertices such that there is no condition from $$$B$$$ that contains vertices from different subsets of $$$B$$$. It means that we can split $$$B$$$ into same subsets right now, but we didn't do it. This contradiction means that $$$root(T_B') \in B$$$.

    Now let's build tree $$$T_B$$$: $$$root(T_B):=root(T_B')$$$ and for every $$$v \in B$$$, except $$$root(T_B')$$$, find it's first parent in $$$T_B'$$$ which is a vertex from $$$B$$$ (let it be $$$p_v$$$). It always exists (it is root($$$T_B'$$$) in the worst case). And now just say that $$$v$$$'s parent in $$$T_B$$$ is $$$p_v$$$. We only have to prove that if all conditions from $$$B$$$ were true in $$$T_B'$$$ then they remain true in $$$T_B$$$. But if $$$lca(x,y)=z$$$ in $$$T_B'$$$ for $$$x,y,z \in B$$$ then this is still true in $$$T_B$$$. We build $$$T_B$$$ but we couldn't do it. Again, it is contradiction and now it means that $$$T_A$$$ doesn't exist.

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

      Thank You for providing this formal argument! It makes things quite clear.

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

    For anyone interested, here's a solution based on the editorial: https://ideone.com/wc0Spl

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

hey, I score 15pts after the end of Qualification round but now in the scoreboard it will reflect 0pts any reason for this...are they check the source code for other test cases....Please Help!!

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

    Apologies for the issue, you have advanced to Round 1 and this will be reflected in the scoreboard shortly. For users who submitted exactly the same source code to multiple problems (as you did for Leapfrog Ch. 1 and 2), we intended to only send a warning that this indicates that you didn't provide your actual source code for one of those problems. However, we had inadvertently disqualified some of these submissions in the scoreboard, and are in the process of reversing that.

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

      So you are not do compile/run on codes but you do some crazy checks? Why?

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

        We perform a number of best-effort checks to help reduce cheating — we recognize that they're not thorough, as is the case in any online contest, but have found them to be helpful regardless.