The approach of greedy assigning out-of-order fails in this case:
J1: 0 2 (Assigns to C)
J2: 1 4 (Assigns to J)
J3: 8 10 (Assigns to C)
J4: 3 10 (Now Impossible because C is busy 8-10, and J is busy 3-4.)
However swapping J1 and J2 so that J is busy 0-2 and C is busy 1-4, now J
is free to do
Hmmm. These solutions are correct? I thought a and b had to be positive.
Thought for sure zero was not allowed based on the description.
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To unsubscribe from this group and stop receiving
I solved all problems in Scala. There were some annoyances compared to when you
can run test sets on your own, but it did work. Do share your code!
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To unsubscribe from this group and stop
That sounds fair!
And if there's enough of you crying for Scala, we'll work on it :)
How do you measure the crying level? If it's the volume of tears (you tyrant!)
I kid I kid =).
--
You received this message because you are subscribed to the Google Groups
Google Code Jam group.
To
On Thursday, June 4, 2015 at 5:42:25 PM UTC-4, Nate Bauernfeind wrote:
It's fantastic to see that distributed codejam supports C++, C, Python,
Pascal, and Java!
Is there any chance that you/google would consider adding Scala to the list?
You can get away with the same integration as Java
It's fantastic to see that distributed codejam supports C++, C, Python, Pascal,
and Java!
Is there any chance that you/google would consider adding Scala to the list?
You can get away with the same integration as Java except when compiling. When
compiling you would execute 'scalac' instead of
I solved this with binary search on the time 't' that I start my haircut.
For a given time 't' it is easy to calculate the number of haircuts that have
been started (i.e. for each barber it's (t + m - 1) / m). Binary search until
you find the time that your haircut must have started. It is then
Yes I'm quite sure that binary search works; I got large and small correct. I
just read the analysis and I'm surprised to see this is not the intended
solution. =) My code is scala and, though terse, should be pretty clear. I've
made minor improvements over my submitted solution (user
My approach doesn't put the pancakes on a new plate, but rather increased the
number of people eating off that plate. Then you never need to calculate how
many pancakes to put where. Division and modulo was all I then needed to figure
out how many minutes were needed to eat the pancakes
and not BigInt, It is conceivable there was a simple numeric overflow.
On Monday, April 29, 2013 4:37:09 AM UTC+3, Nate Bauernfeind wrote:
A correct answer I read through was very similar and I tried rewriting it
in a way that was more intuitive to me.
I tried to build a probability
Hey, be nice! These guys are already giving us tons of their free time. If you
want to know how to solve the problems use go-hero to find a solution in a
language you can read: http://www.go-hero.net/jam/13/solutions
On Sunday, April 28, 2013 6:28:29 PM UTC-5, Alex Polozov wrote:
In the
A correct answer I read through was very similar and I tried rewriting it in a
way that was more intuitive to me.
I tried to build a probability of the choices by multiplying the probability of
the chance you saw k for each k and the probability it was that combination of
numbers (taking into
I think wrong answer is cause you forget to check if the lingerie is
sexy before putting it in the map, no?
On Oct 2, 5:02 pm, gustavo pacianotto gouveia
gustavo.paciano...@gmail.com wrote:
Yep, i don't know, but i think this exercise can be done in O(n(Logn)²),
cause first you need to check
Given that you have a 2 cores, you could've run the program twice in
parallel in about 3.5 minutes. Of course, if you don't plan ahead then
you're pushing your luck hoping it'll work.
On Sep 12, 1:00 am, cyberfish cyberf...@wecheer.com wrote:
Just thought I should point out that, for the large
FYI for a solution that runs in less than 20 seconds you need to
memoize using a simple int[11][MAX_V] kind of array.
(Another FYI: hash maps have way too much overhead... Changing the
hash maps in my solution to a simple array drops the run time from 23m
to 18s. Doh!)
Nate
On Sep 12, 1:34 am,
FYI for a solution that runs in less than 20 seconds you need to
memoize using a simple int[11][MAX_V] kind of array.
(Another FYI: hash maps have way too much overhead... Changing the
hash maps in my solution to a simple array drops the run time from 23m
to 18s. Doh!)
Nate
On Sep 12, 1:34 am,
16 matches
Mail list logo