Skip to Content

Facebook Hacker Cup 2012

2 posts / 0 new
Last post
Brianiac
Brianiac's picture
Offline
Joined: 01/06/2012
Facebook Hacker Cup 2012

As requested by Thor, I'll tell you my experience with the Facebook Hacker Cup 2012 Qualification Round, which started this weekend.

http://www.facebook.com/hackercup

(I'm sorry I'm writing this too late for you to participate if you didn't know about it.)

The puzzle pages should still be available if anyone wants to do them for fun.

 

2012 Qualification Round Problems

http://www.facebook.com/hackercup/problems.php?round=146094915502528

2011 Qualification Round Problems

https://www.facebook.com/hackercup/problems.php?round=4

2011 Round 1 Problems

https://www.facebook.com/hackercup/problems.php?round=144428782277390

 

I don't like fb - I avoid it as much as I can. But I like to do programming puzzles and figured it would give me some stuff to put on my new github account.

They call this a Hacker contest but it's really a programming contest. It's a tiny pet peeve of mine - don't tell me you are a hacker unless you are illegally hacking into top secret shit. But Hacker sounds so much cooler than programmer so it is the Hacker Cup. 

The potential prizes they offer (other than the unmentioned job offer(s)) are a pittance for a multi-billion dollar company, but I am not expecting to get even to the t-shirt prize level.

My goal was to get past the qualification round.

They give you 3 puzzles. You write programs to solve them and then when your program is working you press a button to get the real input data file. Once you click the button you have 6 minutes to have your program run on that input, produce an output file, and upload it. After 6 minutes you are screwed and lose the point for that puzzle.

When the contest went live Friday evening the puzzle pages weren't showing content. I read a couple rage cartoons on reddit and a minute later I came back and the puzzles were there. I clicked the scoreboard and there were already 5 or 6 people that had completed a puzzle. I saw they did the 3rd one (Alphabet Soup) so I started with that once also. I used Python and it wasn't too bad.

The next puzzle that people were completing was the first one (Billboards). Again used Python.

*This text censored.* It was as close to Hacking as I could get.

The 2nd puzzle (Auction) was where I got stuck. I had my python program all ready to go. I got cocky and didn't use my hacking skills *this text censored* and I paid for it. When I ran it it produced errors based on the hugeness of the numbers involved. My 6 minute clock ran out. I think that means I can't get any credit for it but I still wanted to figure it out - and it still had a button on the page to accept answers so maybe I would get some kind of points for it.

I drew upon my hacker skills to google for any discussion of the problem but only found one blog, which fed out tiny bits of information. I worked on it all weekend but was not able to get it solved. Well, I got a program working that solves for certain sized numbers - but it won't solve for huge 10^18 input numbers and do it in less than 6 minutes. Actually I don't think it will complete at all, 6 minutes or 6 hours, I imagine something fills up too much space somewhere on my computer eventually and then it just hangs. 

Even after rewriting the code in c++ it can't tackle the huge number input in a reasonable time, even with some tricks.

Still, I did well enough with the other 2 questions (and enough people did not get all 3 correct) to get into the next round (Round 1). I think they give 24 hours for that round so I might have a small chance to get to Round 2.

 

 

thor
thor's picture
Offline
Joined: 01/03/2010
Re: Facebook Hacker Cup 2012

That's pretty cool. I will have to work through those and see what it's all about. It's too bad I didn't get to do it but I'll have to prep for next year. Thanks for the lowdown; I'd definitely be interested in knowing how it goes from here.

How to SEO and SEM | forum