Reply to topic  [ 10 posts ] 
Google Code Jam 
Author Message
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
This looks very cool.

I know I'm not at a level capable of winning but it is open to all and worth a punt I think :D

It's an algorithm challenge programming competition.

The qulaification round is May 6th and last 24hours.

The subsequent rounds are 2.5 hours long.

Looking at the samples it looks quite achievable to get into the second or third round.

Will have a stab at some of these at home I think.

I've entered anyway.

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Mon Apr 11, 2011 12:46 pm
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 4876
Location: Newcastle
Reply with quote
link?

Edit:
http://code.google.com/codejam/contest/ ... 51101#s=p0

That is similar to the question they asked when they interviewed me, but mine went into more detail

_________________
Twitter
Charlie Brooker:
Macs are glorified Fisher-Price activity centres for adults; computers for scaredy cats too nervous to learn how proper computers work; computers for people who earnestly believe in feng shui.


Mon Apr 11, 2011 1:04 pm
Profile
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
Just having a looky at this one...

http://code.google.com/codejam/contest/ ... 89252#s=p0

I can't see how "cats" can return 75.

The way I see it...

cats uses 4 digits: c, a, t and s.

The smallest possible digits they could represent are 0, 1, 2 and 3.

If it can't begin with 0 then the smallest number is 1023 and the smallest base it can use is base 3.

i.e. 1 x 27 + 0 x 9 + 2 * 3 + 3 * 1 = 36.

So the lowest number represented by "cats" is 36 not 75.

Unless I'm missing the point?

::EDIT::
NVM... 0, 1, 2, 3 is base 4.

i.e. 1 * 64 + 0 * 16 + 2 * 4 + 3 * 1 = 75.

I was right and wrong at the same time :D

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Mon Apr 11, 2011 1:47 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:58 pm
Posts: 8767
Location: behind the sofa
Reply with quote
How many fingers do you have..? :P

_________________
jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly."

When you're feeling too silly for x404, youRwired.net


Mon Apr 11, 2011 3:40 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
I wish programming languages weren't so easy to forget.

I don't use C++ at work and I'd got reasonable at writing the odd program a few months ago.

Now I'm trying to get back into it and I'm having to go almost back to the beginning again!

GAH!

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Mon Apr 11, 2011 11:48 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
Fogmeister wrote:
I wish programming languages weren't so easy to forget.


Aye, I can pretty much launch into Java even though I've not properly used it for a few years. But if I don't write any Perl or complex Bash for a month or two I quickly forget their quirks.


Tue Apr 12, 2011 5:06 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
OK, this is really frustrating now.

I can do the algorithm bits no problem.

I know they work from typing in the samples.

I just can't get the fricking file input to work! It's fricking impossible.

If I was doing it in the language I use at work it would be no problem at all but the language isn't very good at doing algorithm type stuff... and I can only use it at work.

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Tue Apr 12, 2011 9:25 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
LOL!

Got it working now.

I was trying to get it to be too clever.

In the end I went char by char to build the strings and store them into a vector.

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Tue Apr 12, 2011 9:56 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
Right, well I'm through to round 1 of this now :D

Round 1 is the weekend after next and I've got 3 chances to get into the top 1000.

There is round 1A, 1B and 1C. If you get into the top 1000 of a round you are through to round 2 and are banned from entering any other round 1 rounds.

Depending on how hard/easy the puzzles are I MAY have an outside chance of getting into ruond 2.

Depends what comes up though.

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Wed May 11, 2011 2:16 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 9:40 pm
Posts: 5288
Location: ln -s /London ~
Reply with quote
Me too, but I don't think I'll be able to partake in Round 1.

_________________
timark_uk wrote:
Gay sex is better than no sex

timark_uk wrote:
Edward Armitage is Awesome. Yes, that's right. Awesome with a A.


Wed May 11, 2011 3:30 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.