Re: [gcj] Re: Parenting Problem Returns more creative solution?

2020-04-10 Thread Nate Bauernfeind
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

[gcj] Re: Scala support is an illusion

2019-04-07 Thread Nate Bauernfeind
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

[gcj] Scala support is an illusion

2019-04-07 Thread Nate Bauernfeind
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

[gcj] Re: Distributed CodeJam: Scala please?

2015-06-09 Thread Nate Bauernfeind
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

[gcj] Re: Distributed CodeJam: Scala please?

2015-06-05 Thread Nate Bauernfeind
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

[gcj] Distributed CodeJam: Scala please?

2015-06-04 Thread Nate Bauernfeind
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

Re: [gcj] Round 1A : Problem B. Haircut

2015-04-19 Thread Nate Bauernfeind
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

Re: [gcj] Please help me with the Small B. Getting wrong.

2015-04-14 Thread Nate Bauernfeind
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

Re: [gcj] Please help me with the Small B. Getting wrong.

2015-04-13 Thread Nate Bauernfeind
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

[gcj] Re: Good Luck second input

2013-04-29 Thread Nate Bauernfeind
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

[gcj] Re: What happened with contests analyses?

2013-04-29 Thread Nate Bauernfeind
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

[gcj] Good Luck second input

2013-04-28 Thread Nate Bauernfeind
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

[gcj] Re: XNXX delivers free sex movies and flash porn videos (also called 'tube porn') ... online discreetly: spice up your sex life with SEX TOYS and Sexy Lingerie. ...XXX Porn · Free Porn · Free

2009-10-04 Thread Nate Bauernfeind
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

[gcj] Re: Hardware speed advantage

2009-09-12 Thread Nate Bauernfeind
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

[gcj] Re: Hardware speed advantage

2009-09-12 Thread Nate Bauernfeind
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,

[gcj] Re: Hardware speed advantage

2009-09-12 Thread Nate Bauernfeind
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,