Meta Hacker Cup Qualification Round
Good morning! The Meta Hacker Cup Qualification Round starts on Friday, August 26th in under 48 hours! If you haven’t yet, be sure to register on the Meta Coding Contests page.
Important info:
- In order to qualify for Round 1, you’ll need to solve at least one problem in this round.
- Once you've registered, you may wish to confirm that the information in your competition profile is up to date, including your display handle and which country you’d like to represent.
- In Hacker Cup, you run your own submissions on your computer, and upload your source code and the output of your source code to be graded. You’ll have 6 minutes to run your code locally and upload your solution, and whether you got the problem correct will be revealed at the end of the contest. Check out the FAQ for more details.
As a reminder, unlike some other multi-round coding contests, you may not share ideas or solutions about the problems with anyone until after the round has ended. We will be disqualifying contestants we believe to have participated illegitimately or shared their solutions or ideas online in any form before the end of the contest.
As usual, the 2022 season will have some great prizes, including 2,000 t-shirts, and cash prizes for all 25 finalists, including a $20,000 grand prize.
We’ve put a lot of work into these problems, and we hope you enjoy the contest. Good luck, and see you on the scoreboard!
Update: Editorial
Hi,
What is the criteria for a t-shirt this year?
From Link :
What prizes can I win?
The top 2,000 competitors who solve at least one problem in Round 2 will receive a Meta Hacker Cup T-shirt. The top 200 competitors from Round 3 will have a "Top 200" badge on their shirt.
What a difference if it doesn't guarantee that you will get it
It may be obvious but the official submission can be done only once per problem.
You may submit as many times as you want, but you only have a 6 minute window to submit your solution. You won't be told whether your submission is correct or not after submitting it until the end of the contest.
ohhh shit Means there is no way to check that our submission is accepted or not
You'll be given a small "validation" test before you can make the real submission. Think of it as pretests.
Also, when in doubt, stress-testing may help.
Brother it is reset in every 6 min ??
Friendly reminder to check and increase your compiler's stack size for this contest.
Why does my solution crash on large inputs? A common pitfall is stack overflow, where your recursive solution recurses deep enough that you run out of stack space. Most languages have a small default stack size, but also have a way to increase the stack size. Search online for the best way to increase the stack size for your preferred language.
To whom it may concern: my workaround (linux, C++) is to add
#include <sys/resource.h>
to the list of includes and also addto the beginning of
main()
. One may probably want to replace512L
with something smaller.People also say that on Linux it is sufficient to run
ulimit -s unlimited
, on MacOS it should work to add-Wl,-stack_size=0x10000000
to the compile line (or probably for any clang distribution?), for windows it seems that adding-Wl,--stack,SIZE
to the compile line does the trick, or even adding#pragma comment(linker, "/STACK:268435456");
at the beginning of the file (afair, visual studio only). I didn't check all of this by myself, but it will probably be better if this is collected in one comment.Note that on WSL1,
ulimit -s unlimited
won't work.Do I need to have a Facebook account to participate?
Yes
hey second thread , as my facebook account is getting suspended again and again even though I had created it one month ago and I am not even using it . If that happens on the same day of the contest is there some other way to login in hackercup ?
Hi, unfortunately there's no way to log in without a facebook account at least this year. I'm working with some of the people who manage accounts getting disabled in order to try to shield current/previous hacker cup participants' accounts from being marked as spam, but we might not be able to figure it out by tomorrow.
If during the contest your account gets disabled and you have no way of getting access to it, you can email your solutions to [email protected] and we'll upload them manually for you and try to get your account re-enabled by round 1.
quagmire and others: If your Facebook account was disabled because you only use it for Hacker Cup and not as a social network, please send me a DM over Codeforces with the following:
You might have to verify your identity if our AI thinks your account looks like a bot, but once you do, that should fix the problem at least for the foreseeable future.
ok will send you details Thanks
Still haven't received a T-shirt from last year
How to see validation input file. When i download it that is in .html file which doesn't show anything like Input how can I see that? Please help someone.
Do you guys by any chance plan to switch to more modern submission system in the near future?
Seconding this, but admittedly for incredibly selfish reasons XD.
im on a school chromebook and i cant download any software or whatever; none of the online ides i found were actually able to run (or even load) large inputs.
Not in the 2022 season, but we're looking into doing it for next year.
That's actually really nice to hear. I'll look forward to it :)
Noo, please keep the unique format...
By "unique format" do you mean the heavily outdated format that literally no other competitions want to use to my knowledge for reasons we're experiencing at every single FBHC/MHC?
You mean the same format that GCJ used for ten years without any major problems?
I didn't know about CP at that time so that still is out of my knowledge. Regardless, I'm guessing that they switched to the current format for a reason as well?
This is a lot of reds.
I didn't realize recognizing red coders implied so many downvotes...
I didn't realize recognizing I recognized red coders implied so many downvotes...
This is a lot of downvotes.
There probably was a reason, but I don't know it. Maybe they desperately wanted to give interactive problems or to make some major changes for the sake of major changes, I can only guess. Even if they had some valid reasons to switch to the boring standard, it doesn't cancel the fact that they used this format for 10 years, and people seemed to like it.
Any format can be implemented well or poorly. That is a property of the contest system, not the contest format. There's no reason to expect that things would be better if Facebook was using the "submit code, code runs on server" model.
I want to defend the current format. It is great! Please don't remove it.
This format allows to use any language and tool of your choice. With online judging, there will be at most 5-10 languages, and people will always complain about a compiler being already half a year old. And you will not be able to use any tool to e. g. debug your solution after it crashes, or make a quick fix after you realise there's a mistake somewhere.
Also, online judging will most probably have the queue issue once in a while. It always comes unexpectedly, especially on judges that hold only a few contests per year, GCJ being an example.
However the most important advantage in the current system, in my opinion, is that it requires a contestant to bridge the gap between developing code and running it. I know some people who are pretty good at algorithms, but they've never run their code outside of an IDE and do not know how to get an executable. I think it's an important yet not too hard a skill to actually be able to make your code do something useful on your computer, rather than submitting it to a judge that does magic and returns the verdict. One also gets to know the real-world aspects of running a program: you get TL not because something that people call complexity (which can be a magic word for newbies) is too large, but because your code actually runs slow. You can't allocate 100 GB of memory not because of stupid limits in the problem, but because you really don't have that much. And so on with some other less important details.
There's definitely an issue that people also want to compete from mobile devices (tablets, mobile phones, chromebooks, etc) instead of a proper computer. I'm very skeptical about that, you don't do pole jumping without a pole. However if we really want to include them, as a compromise maybe we can have a hybrid system? With a much stricter limits in server-side runs, obviously, given that it doesn't really matter in first rounds.
It is possible to participate from a tablet, by the way
While I do know how to create an executable, it is definitely possible (even for Hackercup) and much easier to run the code from an IDE during a contest. So, I don't see how continuing with this format forces anyone to learn how to create 'something useful' rather than just use file I/O or copy a build file for their favorite IDE that pipes stdin and stdout.
Ahh, the stink of privilege. So, in your opinion, society should try to reward athletes with more resources than those more talented/hardworking? (This is effectively what you are suggesting given that other online judges reduce the gap between those programming from mobile devices and those from a 'proper computer.')
Not everyone has equal resources even when using a 'proper computer', in terms of computing power, RAM, etc. Even running the intended program on large inputs can slow down/ crash a computer (it happened to me 2 years back). I have since then been lucky enough to upgrade the hardware, but I suspect many people don't have the same access to resources.
It doesn't make sense to unnecessarily make the field uneven when there exist working solutions for the issue. Especially when they can't be bothered to test whether their server can even handle the large output files
I do like your suggestion for the possibility of a hybrid setup (to allow programmers to use whatever local tools they'd like or get the benefits of a normal online judge) — but given their incompetence in managing a single system, it seems very likely to me that they will screw this up and somehow have a worse judging system.
Well if it's easier for you to run code from IDE, it's fine. You still learned how to put together your code and some arbitrary data larger than a few example lines to get some output. You've probably also learned what kind of compilation settings you need to plug in to make your code run at suitable speed, etc.
I think there are all kinds of competitions and it's ok that some of them require some tools to be used. It's not like FBHC is the only programming competition a person can take part in.
I think getting a proper judge running untrusted code is a bit more difficult task than just handle a large file with a checker, so I'm not sure which is better given that they have limited resources.
Well, there are people who really can't produce a large output file from a large input file and need to learn that. If you think that anyone can do it and it is trivial, search for comments like "how to get file input in vs code" and "how to increase stack size in sublime text" from this very thread.
If there are people who can't produce a large output file from a large input file, I doubt Hackercup is a place to learn that. I was on a very crappy laptop last year and that cost me in one of the rounds. Having a submit system like GCJ will not hurt anyone.
Theory:
Reality:
That's why we have a generous 6 minute window, while correct solutions run in a few seconds. Yes, some computers are a bit faster than others, but the difference is not that big. I haven't heard about anyone with an intended solution complaining that the code took too long to run.
You can use AWS/Google cloud/etc. You can even run tests in parallel on a cluster of free tier micro instances (in case of AWS).
Yeah, it's easier with one good computer/one good cloud instance, but you can actually get a decent setup for free. It is a programming competition afterwards.
More like:
Theory: you can't solve the problem in time not because of something people call complexity but because your code actually runs slow.
Reality: you can't solve the problem in time because with your very average internet service plan you can't upload a 34MB output file in the 20s window before the client apparently times out.
More like:
Theory:
Reality:
One of the big benefits of the FHC format is that as long as the program is fast enough, you're good. The 6 minute time limit ensures that there is more emphasis on finding the right algorithm and getting the implementation in the ballpark and less on brainless optimization. I can just bang out a short and neat program instead of wasting time replacing stuff with gp_hash_table or thinking about how to stop creating so many vectors. I've definitely used this to my advantage; some of my solutions take 30+ seconds to run and 10+ seconds on a single case. I think it's very nice and I appreciate putting more emphasis on brain and less on implementation.
This discussion is going nowhere--it's essentially devolved into the two sides disagreeing on whether there are some people with slower computers who cannot run their correct code within six minutes and thus are excluded from the competition, but nobody has provided clear evidence for or against this claim. (There are some other ways in which this system may be marginally unfair, but this clearly would be the most significant problem with the existing grading system.)
A few thoughts on this:
1: I agree that requiring contestants to deal with very large output files (i.e., more than a couple megabytes) is not good and that there do exist competitors who are unable to submit such problems because they don't have access to fast enough internet connections. These problems should be excluded or reformatted in ways that will reduce the size of the output.
2: There are a number of people downvoting every post claiming that even people with slow computers can run their (correct) code within six minutes. Can one of those users please provide a concrete example of a time when you or someone else missed a problem because your computer was too slow to run your code, which had the intended asymptotic complexity and a not-absurdly-bad constant factor, in six minutes? Examples where your code ran fast enough but uploading the output took too long don't count (since I'm already convinced that the large output sizes are an issue and need to change, which could be done without changing the grading system entirely). Obviously, if your example relates to the current round, please wait to post it until after the contest ends tomorrow.
I'm not using this as a rhetorical question to claim that such an example does not exist--I'm genuinely curious whether this is something that could happen (since it would imply that some competitors are competing on hardware that's at least ~30x slower than what a typical successful competitor uses). I think giving such an example would be a much better way to prove that the system would change than downvoting every post claiming that these examples don't exist.
This happened with me (I think 2-3 years back) in FBHC. It was not the case that my solution was asymptotically worse than the intended solution. I was considerably weaker then so it could be possible that my program had a bad constant factor that I wasn't aware of — but I ran some of the solutions of the top programmers after the contest and they hung up my pc too. I don't think that the hardware necessarily has to be 30x slower — the program just has to hog up enough resources to make the pc crash.
Thanks for the reply! Is there any chance you'd be willing to share an example of one of the submissions you're referring to? It'd be interesting to see how resource-intensive such a solution might be.
Would like to second your first point. Just failed to submit the output file to the last problem in the Qualification round. The file size is 37MB. I don't think my connection is much poor, and I'd expect it to take around 10-15secs to upload the complete file. But FB was failing for some reason (maybe a timeout or a cap on the upload size to my best guess). I kept trying throughout the whole submit window, but it just wouldn't accept the file. Things should be much worse if someone had a terrible network connection, which is common in my country. 6 minutes wouldn't be nearly enough time to upload ~40MB, considering you also need to unzip and produce the output, and possibly need to try multiple times in case the upload breaks for some reason.
This is not to do with the internet connection that people are talking about, this is just a Facebook issue, probably no one could submit D the intended way.
It's partially an internet connection issue and partially that we were doing uploads in a way that wasn't scalable to super large files; with sufficiently fast internet connection it works reliably for both D and B2. The issue is that if the upload was slow, the request times out, and then the judgement would fail.
I definitely have a fast enough connection, I successfully submitted D the intended way and clarification for B2 both almost instantly and first try. But normal submission for B2 didn't work at all, even though I tried it about 5-10 times.
I had trouble submitting B2 and D, and I definitely have pretty good internet connection. So I think there is more to the issue than just upload speed.
eh, FBHC seems to be the only major contest these days where you run your code locally so you can use whatever fancy libraries you want...
So I'd suggest to try https://github.com/cppfastio/fast_io, there's much more than just input and output (by some very passionate developer from China btw). Also https://github.com/taskflow/taskflow to paralellize tests
Hey my timer runs out but not able to submit Is there is only one chance to submit the code
I just wanted to thank you for adding the feature of filtering the scoreboard by country this year.
Have anyone faced an technical issue with submitting output to the last problem? I tried several times to attach my output and code but all the attempts failed. I send a clarification with source code in last minute, will they help?
I had the same issue. Try checking the "My submissions" tab, in my case all my submissions appeared there (probably not instantly), despite the error starting with "Oops".
Can you tell me after how many minutes did it reflect in your submissions. It's been a while but I don't see any submission even though I submitted it twice.
I recommend you to wait for the news regarding these issues and solve other problems while you wait. If there are no news in, say, a day, then I'd suggest you to request a clarification. You can do it right now, but this may create an unnecessary load on the guys responding to the clarification requests.
In any case, it is probably better to save the output file somewhere just in case if you are about to overwrite it.
I keep getting "oops, an error occur on our side" while trying to submit B2 and timer ran out. SecondThread please see into it.
Did you read the clarification at the top of B2? They are aware of the problems.
I love when I participate in a CP contest and a full 50% of the problems work correctly and allow me to submit a solution. Thank you Meta, very cool <3
Also, presentation error hits hard when your submission is correct..
Here's an idea, how about compressing outputs client-side before submitting them to judge? This way maybe we won't get errors while submitting...
What to do in case of "oops" error in Problem D? I tried making a clarification request but it shows "Something went wrong".
Giving big inputs -> which generating big outputs -> server being unable to handle them -> :ragingsmile:
Can someone explain the logic behind that? Why not make inputs-outputs smaller? For B2 for instance, why not make restrictions $$$W, H \leq 1000$$$, why do you make $$$W, H \leq 3000$$$ and then suffer from it?
Yeah, so we didn't expect the -> "server takes over 30 seconds to handle them and the request times out" part to be a thing. We would have done smaller grids for B and printed like the xor of query answers for D if we anticipated the speed performance issues causing things to fail.
Decent answer from a SE of the biggest social network in the world.
Not able to submit D after B2. Cannot even create a clarification for D with the zipped output (8MB after zipping) because that too keeps stating "Something went wrong". Any other way to get the issue resolved? SecondThread
The same thing happened to me just now. I also couldn’t create a clarification for D with the zipped output. Didn’t expect this from HackerCup :(.
If you can't upload your output to the clarification request either, just upload your source code and we'll try to run it for you this time. @tamajitbuba @_Enigma__
Done.
Done.
Done
Can't upload problem D output and the timer expired. Can I do anything else?
I was not able to send my output file through clarifications either(8mb after zipping).I have sent the output file and code on email and sent my source code in clarifications.
Same! My zipped output for D is 8MB. I sent it over email :) Thanks for the interesting problems though! Enjoyed them.
I was not able to send my output file through clarifications either(8mb after zipping).I have sent the output file and code on email
I have solved the second problem and according the problem output may contain multiple answers. But it is not accepting my output file.
why?
Lol "the second problem"
In all seriousness, there may be different correct answers, but there are also incorrect answers, and you need to print exactly one correct answer per test case. For specific information, please submit a clarification request if the contest is ongoing.
sir, my sublime text editor is not able to process large test cases so is there any alternatives where i can run my c++ code efficiently and get the output file?
use freopen to read and write from files directly.I was having same issue and it worked for me.
Bro the test cases successfully ran on my system but while submitting , it showed oops there is something wrong from our end. So i send them the clarification with source code and output file. So will they consider my solution and will i get score for that problem?
yes ask in clarification section.If they donot respond within few hours then u can dm your issue to secondThread in his cf account.
UPD:- I also got same issue asked in clarification and it got resolved within minutes.
Finally understood why the criteria for qualification is just 1 problem.
They know you won't be able to run the rest 5 on your machine :-)
my sublime text editor is not able to process large test cases so is there any alternatives where i can run my code efficiently and get the output file?
Could you elaborate on what you're having trouble with? Sublime text is a text editor and has nothing to do with running tests.
Why did I get Presentation Error on submitting B2? Passing Validation tests should mean that formatting is fine, right?
I had some Bus error / Broken Pipe when running on the large input. Not sure what the cause is. Anyway it leads to incomplete output, hence presentation error.
@yohackaboi69 Hi, check if your output file covers all test cases on full test case. Code might stop half way on B2 full test case because of large inputs which might lead to Presentation Error. If this is the case, you can fix it by increasing the stack size.
Thanks. You're right.
Is your issue solved? I am also facing the same issue.
I checked my submission and it indeed had some missing test cases. I asked for a clarification but I don't think they will allow for another submission.
No i am not talking about another submission, how you have run all testcases.
Tbh I have no idea. I reran my code and the output was complete. Although you can check out some other comments mentioning that we need to increase stack size.
n
i
a
how to get the output in vs code of large testcases file, I am not able to get the outputs of all inputs.
./A < input.txt > output.txt
Take input from files instead of command line.
Refer this to increase stack size
how to get input file in vs code?
Genius problem naming scheme btw.
Thanks <3
Yes. "Second Thoughts" is missing. Maybe for the next round.
It won't let me download the validation input for problem B1, also I'm not able to submit the problem without that validation so im stuck:(
is this a reference to tourist's nutella nickname?
Is it taking anyone else forever to output case#2 for Problem D for the final test case? I'm running in my vscode since 10 mins and the 6 min window expired :(
We recommend using file input and output rather than relying on the console of your IDE, which may have a limited buffer size.
You should not publicly discuss the tasks before the contest's end.
I agree, but I doesn't mention much that isn't already in the assignment. And, we need somewhere to discuss clarification to the assignment.
You have a place to discuss clarifications to the assignment. It's on the bottom left of the contest page, called "My Clarifications".
My output window crashed on b2 now what to do ?
Does someone else also getting presentation error in B2?
Yes. After increase the stack size, problem solved.
how to increase stack size
Add this in top of your code:
#pragma comment(linker, "/STACK:1073741824")
Was unable to submit code in 6 mins due to "something wrong on our side" error, also got "something went wrong" bunch of times in clarifications so couldn't submit a clarification.
for submission problem in B2 submit zip file containing output and source code in your clarification for Problem B2
Oh that worked, thanks! Ig it is about 15 minutes late so they won't accept but might be helpful for others
My friend made a clarification after 24 hrs. It was still accepted.
yes, was accepted for me as well
How the checker works in problem C ?
Great question, it's much trickier than the solution actually. Here's the algorithm we use.
So how/when is B2 gonna be judged by submitting through clarification. The contest is end now but my B2 status remains "Submission Timer Expired".
Good job Meta, uploading my code for D to a different account then disqualifying both of us for having the same code.
No hard feelings though (as long as I get un-disqualified). Currently communicating via Clarifications to get this sorted. I can see how hard it is to juggle manual uploads.
Update: Issue resolved! Thanks Meta!
How did you know you're disqualified? Does the disqualified person not have a country rank assigned to him?
All checkmarks (if any) turn into Xs, and hovering over the X gives "This submission was disqualified due to a failure to follow the rules of the competition."
Oh. I was being paranoid as my case was one such that I was not assigned a country rank.Thank you for the information. <3
Why is B2 not available for practice?
Bumping this up as B2 is still not available for practice.
Hi, may I know when will problem D be available to be submitted for practice? Seems like I cannot submit it for now: https://www.facebook.com/codingcompetitions/hacker-cup/2022/qualification-round/problems/D .
I missed QR :(
Here is a suggestion: Is this could be a problem if there is a bye to R1 or R2 for previous R3 advancers or finalists? (Not this year, next year or later)
No
"ACCOUNT_FOR_BAD_ROUNDS". is Master
I just noticed there's a ceritificate for qualifying. Can I get in digital form instead of printing it physically?