Google Code Jam 2011

All non-Go discussions should go here.
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Google Code Jam 2011

Post by Kirby »

Google code jam will commence shortly:
http://code.google.com/codejam/

If you're interested in programming, these competitions are sometimes fun.
be immersed
User avatar
daniel_the_smith
Gosei
Posts: 2116
Joined: Wed Apr 21, 2010 8:51 am
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
Location: Silicon Valley
Has thanked: 152 times
Been thanked: 330 times
Contact:

Re: Google Code Jam 2011

Post by daniel_the_smith »

Thanks, I think I'll give it a shot...
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com
User avatar
Li Kao
Lives in gote
Posts: 643
Joined: Wed Apr 21, 2010 10:37 am
Rank: KGS 3k
GD Posts: 0
KGS: LiKao / Loki
Location: Munich, Germany
Has thanked: 115 times
Been thanked: 102 times

Re: Google Code Jam 2011

Post by Li Kao »

The two sample programs for the qualification round looked very easy to me. Parsing the input file is probably harder than solving the actual problem. So I guess I'll put in a few minutes tomorrow to solve them. No idea if I have the time/brain for the later rounds :P
Sanity is for the weak.
User avatar
Sevis
Lives with ko
Posts: 155
Joined: Wed Feb 16, 2011 9:14 am
Rank: KGS 6 kyu
GD Posts: 0
KGS: Sevis
Location: The Netherlands
Has thanked: 11 times

Re: Google Code Jam 2011

Post by Sevis »

I'm going to be participating, but seeing as my algorithms' complexity is usually best represented with up arrow notation, I doubt I'll get through the qualification rounds.
User avatar
Li Kao
Lives in gote
Posts: 643
Joined: Wed Apr 21, 2010 10:37 am
Rank: KGS 3k
GD Posts: 0
KGS: LiKao / Loki
Location: Munich, Germany
Has thanked: 115 times
Been thanked: 102 times

Re: Google Code Jam 2011

Post by Li Kao »

The round 2 problems on the other hand are evil. I just tried last year's bacteria problem. Wrote by program, and it worked. The limits said that the initial configuration has at max 1M bacteria on a 1Mx1M field.
What they didn't say that the number of bacteria grows far beyond 100M in some of their testcases. Out of memory :( And once you have that testcase you just have 8 minutes to submit the solution.
Sanity is for the weak.
hyperpape
Tengen
Posts: 4382
Joined: Thu May 06, 2010 3:24 pm
Rank: AGA 3k
GD Posts: 65
OGS: Hyperpape 4k
Location: Caldas da Rainha, Portugal
Has thanked: 499 times
Been thanked: 727 times

Re: Google Code Jam 2011

Post by hyperpape »

The qualification problems did look remarkably easy. Which is a way of saying that I think I might have had a chance at solving them.
User avatar
SpongeBob
Lives in gote
Posts: 499
Joined: Sat Apr 24, 2010 3:18 pm
Rank: Fox 3D
GD Posts: 325
Location: Germany
Has thanked: 213 times
Been thanked: 96 times

Re: Google Code Jam 2011

Post by SpongeBob »

Is it only possible to see the problems via registering?
Stay out of my territory! (W. White, aka Heisenberg)
User avatar
daniel_the_smith
Gosei
Posts: 2116
Joined: Wed Apr 21, 2010 8:51 am
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
Location: Silicon Valley
Has thanked: 152 times
Been thanked: 330 times
Contact:

Re: Google Code Jam 2011

Post by daniel_the_smith »

Yes, but you can see problems from prior events.

What are people's handles there? I'm lavalamp if you want to add me to your scoreboard. :mrgreen:
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com
User avatar
Li Kao
Lives in gote
Posts: 643
Joined: Wed Apr 21, 2010 10:37 am
Rank: KGS 3k
GD Posts: 0
KGS: LiKao / Loki
Location: Munich, Germany
Has thanked: 115 times
Been thanked: 102 times

Re: Google Code Jam 2011

Post by Li Kao »

Finally done. nick: CodeInChaos

My thoughts about Problem D:

Google = Image
I probably put more work into Problem D than into the rest together. F**ing trolled.
Sanity is for the weak.
User avatar
daniel_the_smith
Gosei
Posts: 2116
Joined: Wed Apr 21, 2010 8:51 am
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
Location: Silicon Valley
Has thanked: 152 times
Been thanked: 330 times
Contact:

Re: Google Code Jam 2011

Post by daniel_the_smith »

In two hours when it closes, please please please explain to me what rabbit trail you were following, it's driving me nuts. I was super extra careful on D, but only because I could see half the people were getting it wrong-- figured it was a trick question... What are people so commonly doing that is wrong? C was way harder, I thought.

...plus the large input for C triggered a condition in my parsing code that I didn't handle initially... that was fun, having to fix it with the clock running...

I looked at some of the questions for earlier round 1's-- I don't expect to make it to round two. Some people were submitting answers in the time it takes me just to read the problems... :/
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: Google Code Jam 2011

Post by Kirby »

I thought C was harder than D, as well. I actually ran out of memory on C :-p.
be immersed
User avatar
daniel_the_smith
Gosei
Posts: 2116
Joined: Wed Apr 21, 2010 8:51 am
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
Location: Silicon Valley
Has thanked: 152 times
Been thanked: 330 times
Contact:

Re: Google Code Jam 2011

Post by daniel_the_smith »

Kirby wrote:I thought C was harder than D, as well. I actually ran out of memory on C :-p.


Really? Wow, we must have had completely different solutions...
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com
Kirby
Honinbo
Posts: 9553
Joined: Wed Feb 24, 2010 6:04 pm
GD Posts: 0
KGS: Kirby
Tygem: 커비라고해
Has thanked: 1583 times
Been thanked: 1707 times

Re: Google Code Jam 2011

Post by Kirby »

My algorithm was kind of basic. I got a list of all permutations of the candy values for a particular set. Then, for each of those permutations, I split the set of candy values into two sets, drawing the line at (1, n-1), (2, n-2), etc.

For each of these set divisions, I took the bitwise XOR of the values in the sets, and saw if they were equal. If they were equal, I grabbed the real sum of the set, and kept track of the maximum.

This seemed to work for the sample input I used before trying to submit, but when I got a larger dataset, I had some memory errors due to some arraylist cloning that I was doing. I'm assuming there's either a bug in the code i wrote to get all of the permutations, or I'm doing something inefficient in that method.

I guess I could still work on the problem, as there's still time to investigate it, but I'm not too worried about it since you only need 25 points this round to qualify.
be immersed
User avatar
Li Kao
Lives in gote
Posts: 643
Joined: Wed Apr 21, 2010 10:37 am
Rank: KGS 3k
GD Posts: 0
KGS: LiKao / Loki
Location: Munich, Germany
Has thanked: 115 times
Been thanked: 102 times

Re: Google Code Jam 2011

Post by Li Kao »

Kirby what's your nick there?

The majority seems to agree that ProbD is hardest. At least it has by far the least correct solutions.
Last edited by Li Kao on Sat May 07, 2011 3:53 pm, edited 1 time in total.
Sanity is for the weak.
User avatar
daniel_the_smith
Gosei
Posts: 2116
Joined: Wed Apr 21, 2010 8:51 am
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
Location: Silicon Valley
Has thanked: 152 times
Been thanked: 330 times
Contact:

Re: Google Code Jam 2011

Post by daniel_the_smith »

Lol, after reading Kirby's description I realized that anyone reading my code for that problem is going to have a major WTF moment.
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com
Post Reply