I did it by using a regular expression to find a node in the tree
which is one level higher than a leaf node
i.e. ( 0.5 ) is a leaf node
( 0.5 fluffy (1.0) (0.25) ) is the next simplest tree node. The key
to identifying this tree is the ( () () ) pattern of brackets.
I then used string
HI,
I am not able to understand the solution for Problem C in Round 1B .
Can anybody simplify the solution a little bit.
On Sep 15, 9:00 am, benetin gou...@gmail.com wrote:
Enjoy.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
A minor glitch in 1C-C: // Start the computation. int r = 0;
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
google-codejam group.
To post to this group, send email to google-code@googlegroups.com
To unsubscribe
Anything to 7 decimal places is still within a precision of 10^-6, so
the analysis is correct, and it won't be a typo. It is common to allow
for much higher precision than asked for just in case you had an off-
by-one error somewhere.
On Sep 15, 9:01 pm, Matteo Landi landima...@gmail.com wrote:
Ok, i thought the checker would validate only results with that
precision. My fault!
On Tue, Sep 15, 2009 at 12:54 PM, TripleM stephenmerri...@gmail.com wrote:
Anything to 7 decimal places is still within a precision of 10^-6, so
the analysis is correct, and it won't be a typo. It is common
Google Code Jam allows standard scientific notations also, doesn't
it? The grader is fairly sophisticated. You usually don't need to
worry about decimal format unless it's the point of the problem.
-Brian
On Sep 15, 5:54 am, TripleM stephenmerri...@gmail.com wrote:
Anything to 7 decimal
Relating to the contest analysis for Decision Tree:
The hard part here was parsing the tree. The easiest way to do this is by
using a technique called recursive descent.
In (especially, but certainly not limited to) dynamic languages,
there's an even easier technique, which is to use regular
Guess we should provide the links.:)
1A: http://code.google.com/codejam/contest/dashboard?c=188266#s=a
1B: http://code.google.com/codejam/contest/dashboard?c=186264#s=a
1C: http://code.google.com/codejam/contest/dashboard?c=189252#s=a
On Sep 15, 12:00 am, benetin gou...@gmail.com wrote:
Enjoy.