pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 10 Apr 2012 07:15 AM |
Google Code Jam is a competition hosted by Google where you must write algorithms to solve problems. Your algorithm must complete the problem in a set amount of time (which on the early rounds is really large).
To see past problems, google it. Last year at least a few people from here entered, but I don't know how well people did. In the first round you need to just get enough points to qualify, then (I think?) you need to earn enough points to put you in the top x number of people. I know that someone (NXTgenthing?) lost on the round where you get the t-shirt if you get past it.
They give you the problem, and a file to take as input (and explain the input in the problem). Your program must solve the problem as produce it as output.
So, who's entering? How well did you do/how do you think you will do? |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 10 Apr 2012 07:26 AM |
>_Google_ Code Jam >>google it
Irony. I'm curious too. |
|
|
| Report Abuse |
|
|
| |
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 10 Apr 2012 07:40 AM |
| You have a choice of language. I spent ages trying to use C++ last time when I had only been using it for a week or so,a dn wasted half the day figuring out syntax. |
|
|
| Report Abuse |
|
|
HotThoth
|
  |
 |
| Joined: 24 Aug 2010 |
| Total Posts: 1176 |
|
|
| 10 Apr 2012 12:28 PM |
| It's very fun, but quite tricky. The rounds ramp up a lot, so somewhere in there is usually a good problem for whatever level of algorithms difficulty you're looking for. I tried it a few years back; there was a nasty but cool problem that year about sprinklers that I really wanted to solve, but couldn't get the large case in time :(. My friend figured out a way to do it, but it was pretty crazy-- I think it involved trinary seaching for something... |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 10 Apr 2012 12:35 PM |
| I couldn't even do the qualification round last time, mainly because I spent ~7 hours trying to get C++ to work because I had only been using it for a week or so. I then attempted it with Lua, but it was about 45 mins before the time was up, and I got the short case done but not the large because annoyingly my program couldn't handle longer numbers. Even more annoyingly, it just showed a blank cmd, so I thought it was just working out the answer, when in fact it had bugged and I fixed it after the time was up in about 30 secs. |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2012 12:50 PM |
| can you still pass if it uses lots of ugly hax and has slow execution time? lol |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 10 Apr 2012 01:33 PM |
@trapping
Yes, as long as it finishes within the set time. This isn't a problem in the early stages but I would imagine you need to write efficiently in the later ones.
FYI: The qualification starts in Friday at 23:00 UTC and lasts for 25 hours. |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2012 02:04 PM |
| give an example problem to solve? too lazy to look it up |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 10 Apr 2012 02:06 PM |
Since you are so lazy, I shall copy and paste one:
A company is located in two very tall buildings. The company intranet connecting the buildings consists of many wires, each connecting a window on the first building to a window on the second building.
You are looking at those buildings from the side, so that one of the buildings is to the left and one is to the right. The windows on the left building are seen as points on its right wall, and the windows on the right building are seen as points on its left wall. Wires are straight segments connecting a window on the left building to a window on the right building.
You've noticed that no two wires share an endpoint (in other words, there's at most one wire going out of each window). However, from your viewpoint, some of the wires intersect midway. You've also noticed that exactly two wires meet at each intersection point.
On the above picture, the intersection points are the black circles, while the windows are the white circles.
How many intersection points do you see?
Input
The first line of the input gives the number of test cases, T. T test cases follow. Each case begins with a line containing an integer N, denoting the number of wires you see.
The next N lines each describe one wire with two integers Ai and Bi. These describe the windows that this wire connects: Ai is the height of the window on the left building, and Bi is the height of the window on the right building.
Output
For each test case, output one line containing "Case #x: y", where x is the case number (starting from 1) and y is the number of intersection points you see.
Limits
1 ≤ T ≤ 15. 1 ≤ Ai ≤ 104. 1 ≤ Bi ≤ 104. Within each test case, all Ai are different. Within each test case, all Bi are different. No three wires intersect at the same point.
Small dataset
1 ≤ N ≤ 2.
Large dataset
1 ≤ N ≤ 1000. |
|
|
| Report Abuse |
|
|
| |
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 10 Apr 2012 02:17 PM |
That was an example from the first - i.e. easiest - round past the qualifiers. The qualifiers are easier - here is one:
Problem
Given a list of space separated words, reverse the order of the words. Each line of text contains L letters and W words. A line will only consist of letters and space characters. There will be exactly one space character between each pair of consecutive words.
Input
The first line of input gives the number of cases, N. N test cases follow. For each test case there will a line of letters and space characters indicating a list of space separated words. Spaces will not appear at the start or end of a line.
Output
For each test case, output one line containing "Case #x: " followed by the list of words in reverse order.
Limits
Small dataset
N = 5 1 ≤ L ≤ 25
Large dataset
N = 100 1 ≤ L ≤ 1000 |
|
|
| Report Abuse |
|
|
Tenal
|
  |
| Joined: 15 May 2011 |
| Total Posts: 18684 |
|
|
| 10 Apr 2012 02:36 PM |
| I joined, however I'm really not a big fan of math at all. Let's see how hard I'll fail. XD |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 10 Apr 2012 02:38 PM |
| The qualification rounds seem to be really varying degrees of difficulty - for example, that reverse words thing is extremely easy, whereas some other things are much more difficult. |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2012 03:33 PM |
| what do I win for being able to reverse words? |
|
|
| Report Abuse |
|
|
tomtomn00
|
  |
| Joined: 14 Apr 2010 |
| Total Posts: 27998 |
|
| |
|
HotThoth
|
  |
 |
| Joined: 24 Aug 2010 |
| Total Posts: 1176 |
|
|
| 13 Apr 2012 06:51 PM |
| For reference-- I believe the competition has started; the qualifying round is like 48 hours long though, so there's plenty of time to mess around. I wonder if they'll let me use RBX.Lua as my language, lol |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 13 Apr 2012 07:03 PM |
| I am participating. Doing the problem right now!! |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 13 Apr 2012 07:05 PM |
Goodluck! Succes! Bonne chance! Erfolg! |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 13 Apr 2012 07:13 PM |
| Right, you need 20 points to proceed to round one. Not too hard. I am hoping to stay until atleast round 2, hopefully round 3. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2012 07:29 PM |
| Oh god, I don't want to but I'm just giving up in the qualifying round. The first two problems are easy, and I solved the first one, but I don't have the patience to code up a solution for the second one. The third one confuses the hell out of me, and I haven't taken a look at the fourth one yet. |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 13 Apr 2012 07:40 PM |
| I am scared to submit my answers in. D; |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2012 07:42 PM |
| I would be too. I mean, just think about failing, not even making it far into the contest. It's going to be pretty sad. =/ |
|
|
| Report Abuse |
|
|
miloguy
|
  |
| Joined: 19 Dec 2009 |
| Total Posts: 7702 |
|
|
| 13 Apr 2012 07:55 PM |
"Given a list of space separated words, reverse the order of the words. Each line of text contains L letters and W words. A line will only consist of letters and space characters. There will be exactly one space character between each pair of consecutive words."
lines.split("\n").map(function(n){return n.split(" ").reverse().join(" ");}).join("\n")? |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2012 08:18 PM |
"I am scared to submit my answers in. D;"
You shouldn't be, I failed the first one twice. The first time I accidentally clicked the download before I was ready and my four minutes expired. The second time, I forgot to set a certain variable in my program, so the output was the input, and my fix came right as the four minutes expired. I got it right the third time though. |
|
|
| Report Abuse |
|
|