[gcj] Re: Subrounds: you have been assigned to all of them

2009-09-08 Thread ++imanshu

Hurray!

On Sep 9, 9:50 am, Bartholomew Furrow  wrote:
> We've decided to allow all contestants to compete in all subrounds of Round
> 1 -- unless they qualified for Round 2 in an earlier subround.  Good luck to
> everyone in Round 1!
> *FAQ*
>
> Q: Where is my qualification email!?
> A: We haven't sent them yet, because we're still dealing with cheaters.
>  Sorry for the delay!  We realize it's inconvenient, and we'll work faster
> next time.
>
> Q: How do I know if I qualified?
> A: If you have at least 33 points and you didn't cheat, then you qualified.
>
> Q: Which subrounds of Round 1 can I participate in?
> A: All of them.  You can compete in Round 1A, Round 1B and Round 1C (until
> you qualify for Round 2).
>
> Q: Can I still change my subround preferences?
> A: ...I guess so, but it won't do anything.
>
> Cheers,
> Bartholomew
>
> P.S. This isn't the official announcement of your subround assignment; that
> will come out in the emails.  I just wanted to give you guys a heads-up.
--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Water Shed

2009-09-08 Thread Bartholomew Furrow
>
> Ultimately, as per your definition, is memoization a DP technique or
> not?
> I could not understand that.


Forgetting the definition -- which has a few holes, I'll admit
-- memoization is basically another way of expressing DP.  It's rare that
you have a DP algorithm that can't be expressed as memoization or
vice-versa.  There are some cases of each, but they're the exception rather
than the rule.

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Кто решил задачу С на квалифике йшн раунде?

2009-09-08 Thread Misha Marchenko
Решал на жаве в лоб, без кеширования. Что к данной задаче будет
кешированием?

8 сентября 2009 г. 21:49 пользователь romanr  написал:

>  Решай "в лоб" с кешированием - это называется "динамическое
> программирование".
>
>
> Misha Marchenko wrote:
>
> Смотрел. Мне интереснее какой алгоритм был использован, какого его
> название? В том году я узнал, например, про венгерский алгоритм
>
> 7 сентября 2009 г. 22:08 пользователь Satyajit Malugu <
> malugu.satya...@gmail.com> написал:
>
>> Last year the contest was won by a chinese. Though the questions are given
>> in English and we'd be interested in knowing what all the talking, we can't
>> force anyone to communicate with rest of us :)
>
>
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Subrounds: you have been assigned to all of them

2009-09-08 Thread Igor Naverniouk
The top 1000 contestants from round 1A will advance to round 2. They will
not be allowed to participate in rounds 1B or 1C.

Then, the top 1000 contestants from round 1B will advance to round 2. They
will also not be allowed to participate in round 1C.

Finally, the top 1000 contestants from round 1C will advance to round 2.

In total, 3000 contestants will advance to round 2. (Plus or minus a few in
case or ties or cheating.)

igor



On Tue, Sep 8, 2009 at 10:13 PM, Mustafa Acer  wrote:

>
> So what will happen to the top 1000 scorers of each round? Since the
> competitors will not be distributed equally, will this mean that some
> rounds will be better than others in terms of qualifying? Or will the
> 3000 top scorers qualify?
>
> On Sep 8, 8:50 pm, Bartholomew Furrow  wrote:
> > We've decided to allow all contestants to compete in all subrounds of
> Round
> > 1 -- unless they qualified for Round 2 in an earlier subround.  Good luck
> to
> > everyone in Round 1!
> > *FAQ*
> >
> > Q: Where is my qualification email!?
> > A: We haven't sent them yet, because we're still dealing with cheaters.
> >  Sorry for the delay!  We realize it's inconvenient, and we'll work
> faster
> > next time.
> >
> > Q: How do I know if I qualified?
> > A: If you have at least 33 points and you didn't cheat, then you
> qualified.
> >
> > Q: Which subrounds of Round 1 can I participate in?
> > A: All of them.  You can compete in Round 1A, Round 1B and Round 1C
> (until
> > you qualify for Round 2).
> >
> > Q: Can I still change my subround preferences?
> > A: ...I guess so, but it won't do anything.
> >
> > Cheers,
> > Bartholomew
> >
> > P.S. This isn't the official announcement of your subround assignment;
> that
> > will come out in the emails.  I just wanted to give you guys a heads-up.
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Subrounds: you have been assigned to all of them

2009-09-08 Thread Hawston LLH
I guess, the same rule applied in round 1 - top 1000 scorer from each sub
round advance to round 2, ie it is based on local score, not global score.
It would be hard to compare (score, penalty time) across subrounds, since
the statistics of different subrounds can be very different in term of score
and penalty time, so it is hard to do direct comparison.


On Wed, Sep 9, 2009 at 1:31 PM, Dhruva Sagar  wrote:

> Hi Mustafa,
> From what I understand, each of the rounds are not going to be considered
> separate anymore. We can participate in any of the rounds or all if we wish
> to or need to and we would compete with all the others.
>
> How many people will qualify for further rounds is something I can't
> comment on, but it will be based on the top scorers of all the rounds and
> not any of the individual rounds in particular.
>
> Thanks & Regards,
> Dhruva Sagar.
>
>
> Joan Crawford 
> - "I, Joan Crawford, I believe in the dollar. Everything I earn, I spend."
>
> On Wed, Sep 9, 2009 at 10:43 AM, Mustafa Acer  wrote:
>
>>
>> So what will happen to the top 1000 scorers of each round? Since the
>> competitors will not be distributed equally, will this mean that some
>> rounds will be better than others in terms of qualifying? Or will the
>> 3000 top scorers qualify?
>>
>> On Sep 8, 8:50 pm, Bartholomew Furrow  wrote:
>> > We've decided to allow all contestants to compete in all subrounds of
>> Round
>> > 1 -- unless they qualified for Round 2 in an earlier subround.  Good
>> luck to
>> > everyone in Round 1!
>> > *FAQ*
>> >
>> > Q: Where is my qualification email!?
>> > A: We haven't sent them yet, because we're still dealing with cheaters.
>> >  Sorry for the delay!  We realize it's inconvenient, and we'll work
>> faster
>> > next time.
>> >
>> > Q: How do I know if I qualified?
>> > A: If you have at least 33 points and you didn't cheat, then you
>> qualified.
>> >
>> > Q: Which subrounds of Round 1 can I participate in?
>> > A: All of them.  You can compete in Round 1A, Round 1B and Round 1C
>> (until
>> > you qualify for Round 2).
>> >
>> > Q: Can I still change my subround preferences?
>> > A: ...I guess so, but it won't do anything.
>> >
>> > Cheers,
>> > Bartholomew
>> >
>> > P.S. This isn't the official announcement of your subround assignment;
>> that
>> > will come out in the emails.  I just wanted to give you guys a heads-up.
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Subrounds: you have been assigned to all of them

2009-09-08 Thread Dhruva Sagar
Hi Mustafa,
>From what I understand, each of the rounds are not going to be considered
separate anymore. We can participate in any of the rounds or all if we wish
to or need to and we would compete with all the others.

How many people will qualify for further rounds is something I can't comment
on, but it will be based on the top scorers of all the rounds and not any of
the individual rounds in particular.

Thanks & Regards,
Dhruva Sagar.


Joan Crawford
- "I, Joan Crawford, I believe in the dollar. Everything I earn, I
spend."

On Wed, Sep 9, 2009 at 10:43 AM, Mustafa Acer  wrote:

>
> So what will happen to the top 1000 scorers of each round? Since the
> competitors will not be distributed equally, will this mean that some
> rounds will be better than others in terms of qualifying? Or will the
> 3000 top scorers qualify?
>
> On Sep 8, 8:50 pm, Bartholomew Furrow  wrote:
> > We've decided to allow all contestants to compete in all subrounds of
> Round
> > 1 -- unless they qualified for Round 2 in an earlier subround.  Good luck
> to
> > everyone in Round 1!
> > *FAQ*
> >
> > Q: Where is my qualification email!?
> > A: We haven't sent them yet, because we're still dealing with cheaters.
> >  Sorry for the delay!  We realize it's inconvenient, and we'll work
> faster
> > next time.
> >
> > Q: How do I know if I qualified?
> > A: If you have at least 33 points and you didn't cheat, then you
> qualified.
> >
> > Q: Which subrounds of Round 1 can I participate in?
> > A: All of them.  You can compete in Round 1A, Round 1B and Round 1C
> (until
> > you qualify for Round 2).
> >
> > Q: Can I still change my subround preferences?
> > A: ...I guess so, but it won't do anything.
> >
> > Cheers,
> > Bartholomew
> >
> > P.S. This isn't the official announcement of your subround assignment;
> that
> > will come out in the emails.  I just wanted to give you guys a heads-up.
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Water Shed

2009-09-08 Thread Eagle

Dear Furrow,

Ultimately, as per your definition, is memoization a DP technique or
not?
I could not understand that.

Thanks in advance!

Eagle


On Sep 6, 2:48 am, Bartholomew Furrow  wrote:
> > Why you said that?
> > Recursion is part of dynamic programming (top down approach), am i wrong?
>
> This is actually a matter of definition.  I'd argue that a simple recursion
> like that doesn't have any of the interesting properties of dynamic
> programming, but I suppose you could call it DP if you really wanted to.
>  Here's my definition for DP:
>
> - An algorithm acting on a directed, acyclic graph that is not a tree.
>
> You could argue away the "not a tree" part if you wanted to, in which case
> calculating the factorial (and pretty nearly anything else) is indeed DP.
>  Here's a less controversial example of dynamic programming, used to
> calculate the Fibonacci numbers:
>
> MEMOIZATION:
> cache = [-1] * 1000
> def fib(n):
>   if n in (0, 1):
> return 1
>   if cache[n] != -1:
> return cache[n]
>   cache[n] = fib(n-1) + fib(n-2)
>   return cache[n]
>
> RECURSION (not DP):
> def fib(n):
>   if n in (0, 1):
> return 1
>   return fib(n-1) + fib(n-2)
>
> Notice that the only difference between the memoization and recursion
> algorithms is that in the first case, we remember (memoize) the result of
> function calls.  What's the difference?  Well, the first one is O(n), and
> the second one is O(2**n).  Paste those into python and see what happens
> when you calculate fib(34).  The first one will return almost instantly,
> while the second one will take several seconds.
>
> "Classic" (non-memoized) DP:
> fib = [-1] * 1000
> fib[0] = fib[1] = 1
> for i in range(2, 1000):
>   fib[i] = fib[i-1] + fib[i-2]
>
> This is clearly linear.  It creates exactly the same array as the
> memoization approach, but it's philosophically the opposite approach: it
> builds up fib starting from 0, whereas memoization says "OK, what's fib(34)?
>  We need fib(33) and fib(32)."
>
> To tie this back to my original definition of dynamic programming: the
> directed, acyclic graph here has nodes at each integer, and node n has edges
> going to nodes n-1 and n-2.  This graph is directed (the edges go one way)
> and acyclic (n depends on n-1 and n-2, which don't ultimately depend on n).
>
> I hope this was at least a little helpful.
>
> Cheers,
> Bartholomew
--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Subrounds: you have been assigned to all of them

2009-09-08 Thread Mustafa Acer

So what will happen to the top 1000 scorers of each round? Since the
competitors will not be distributed equally, will this mean that some
rounds will be better than others in terms of qualifying? Or will the
3000 top scorers qualify?

On Sep 8, 8:50 pm, Bartholomew Furrow  wrote:
> We've decided to allow all contestants to compete in all subrounds of Round
> 1 -- unless they qualified for Round 2 in an earlier subround.  Good luck to
> everyone in Round 1!
> *FAQ*
>
> Q: Where is my qualification email!?
> A: We haven't sent them yet, because we're still dealing with cheaters.
>  Sorry for the delay!  We realize it's inconvenient, and we'll work faster
> next time.
>
> Q: How do I know if I qualified?
> A: If you have at least 33 points and you didn't cheat, then you qualified.
>
> Q: Which subrounds of Round 1 can I participate in?
> A: All of them.  You can compete in Round 1A, Round 1B and Round 1C (until
> you qualify for Round 2).
>
> Q: Can I still change my subround preferences?
> A: ...I guess so, but it won't do anything.
>
> Cheers,
> Bartholomew
>
> P.S. This isn't the official announcement of your subround assignment; that
> will come out in the emails.  I just wanted to give you guys a heads-up.
--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Subrounds: you have been assigned to all of them

2009-09-08 Thread Bartholomew Furrow
>
> can i change my programming language now?


When we asked you about programming languages, that was as an indication of
preference rather than locking you in to a language.  You can use whatever
language you like, as long as it falls within our rules.

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Subrounds: you have been assigned to all of them

2009-09-08 Thread amit jain
can i change my programming language now?

On Wed, Sep 9, 2009 at 9:20 AM, Bartholomew Furrow  wrote:

> We've decided to allow all contestants to compete in all subrounds of Round
> 1 -- unless they qualified for Round 2 in an earlier subround.  Good luck to
> everyone in Round 1!
> *FAQ*
>
> Q: Where is my qualification email!?
> A: We haven't sent them yet, because we're still dealing with cheaters.
>  Sorry for the delay!  We realize it's inconvenient, and we'll work faster
> next time.
>
> Q: How do I know if I qualified?
> A: If you have at least 33 points and you didn't cheat, then you qualified.
>
> Q: Which subrounds of Round 1 can I participate in?
> A: All of them.  You can compete in Round 1A, Round 1B and Round 1C (until
> you qualify for Round 2).
>
> Q: Can I still change my subround preferences?
> A: ...I guess so, but it won't do anything.
>
> Cheers,
> Bartholomew
>
> P.S. This isn't the official announcement of your subround assignment; that
> will come out in the emails.  I just wanted to give you guys a heads-up.
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Subrounds: you have been assigned to all of them

2009-09-08 Thread Bartholomew Furrow
We've decided to allow all contestants to compete in all subrounds of Round
1 -- unless they qualified for Round 2 in an earlier subround.  Good luck to
everyone in Round 1!
*FAQ*

Q: Where is my qualification email!?
A: We haven't sent them yet, because we're still dealing with cheaters.
 Sorry for the delay!  We realize it's inconvenient, and we'll work faster
next time.

Q: How do I know if I qualified?
A: If you have at least 33 points and you didn't cheat, then you qualified.

Q: Which subrounds of Round 1 can I participate in?
A: All of them.  You can compete in Round 1A, Round 1B and Round 1C (until
you qualify for Round 2).

Q: Can I still change my subround preferences?
A: ...I guess so, but it won't do anything.

Cheers,
Bartholomew

P.S. This isn't the official announcement of your subround assignment; that
will come out in the emails.  I just wanted to give you guys a heads-up.

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Still have no email

2009-09-08 Thread Bartholomew Furrow
We've decided to allow all contestants to compete in all subrounds (unless
they've previously qualified for Round 2).
The email will hopefully come out tomorrow (UTC -7), but hopefully now it
has no more useful information.

Regards,
Bartholomew

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: I'm in???

2009-09-08 Thread Bartholomew Furrow
I'm estimating tomorrow (Wednesday, UTC -7).  And, just so there's
absolutely nothing useful to you in that email:
All contestants will be able to compete in all subrounds (unless they've
previously qualified for Round 2).

Regards,
Bartholomew


On Tue, Sep 8, 2009 at 4:49 AM, Taichi  wrote:

>
> May I ask when the estimating date of sending the mail is ?
>
> On Sep 8, 4:11 am, Bartholomew Furrow  wrote:
> > > I make 33 points in the qualification round.. I can participate in the
> > > round 1?? Google don't send emails to notify this?
> >
> > Yes, with 33 points you qualified.  We will send out an email to people
> who
> > qualified, but we have a large number of reports of cheating that we'd
> like
> > to address first.  Sorry for the delay, and congratulations!
> >
> > Bartholomew
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Intuitive explanation of an efficient solution for problem C "Welcome to Code Jam"

2009-09-08 Thread Vitus

Scratch that, I actually tried again, and it was right.
Don't know what was wrong the first time...
-V

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Egg Drop

2009-09-08 Thread sajith varghese

will this makes the logic simple.
want to find F(D,B)
I drop an egg from some floor, if it breaks it will break on some
floor below, and I have left B-1 breaks and D-1 drops. If it doesn't
break I have to find a floor above the current floor and have B breaks
and D-1 drops.
so total breaks become,
1 + F(D-1, B-1) + F(D-1,B)

So you will start droping in the floor F(D-1,B-1)+1; then you move
accordingly up or down.

when B= 0,  F(D,B) = 0
when B= 1,  F(D,1) = D if D != 0

For solving you can make a 2d array and tryout.

On 9/8/09, Sergey Ochkin  wrote:
>
> The problem statement looks quite clear to me. Specifically, it tells
> that every test case in input file is "solvable", which means that
> there is an algorythm for determining the lowest floor where the egg
> breaks...
> However I discovered an inconsistency in the first (small) input file.
> It contains the following test case: 63 7 3.
> I simply do not believe that it is possible to determine the lowest
> crash-floor in a 63-floor building with only 7 drops and 3 breaks!
> Can anyone give a hint if I am mad or the test case is incorrect?
> --
> On Sep 8, 5:45 pm, Paul Smith  wrote:
>> The sample input has 2 test cases.  The first, 3 3 3, tell you that
>> Solvable(3,3,3) is true. So, you are asked,
>>
>> what is the maximum number F such that Solveable(F,3,3) is true,
>> what is the minimum number D such that Solveable(3,D,3) is true,
>> what is the minimum number B such that Solveable(3,3,B) is true.
>>
>> The answer for this case is 7 2 1, as S(7,3,3), S(3,2,3) and S(3,3,1)
>> are all true.
>>
>> Similarly, given that S(7,5,3) is true, S(25, 5, 3), S(7,3,3) and
>> S(7,5,2) are all true, 7 5 3 -> 25 3 2
>>
>> On Tue, Sep 8, 2009 at 1:48 PM, LeppyR64 wrote:
>>
>> > I'm having trouble understanding the problem statement.
>>
>> > I understand what is expected for output, but not how to get from the
>> > sample input to the output.
>> > Could someone please explain the sample test case?
>>
>> --
>> Paul Smithhttp://www.nomadicfun.co.uk
>>
>> p...@pollyandpaul.co.uk
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Intuitive explanation of an efficient solution for problem C "Welcome to Code Jam"

2009-09-08 Thread Vitus

Hey smloh,

thanks for the excellent code. After a night of pondering I arrived at
the same solution albeit counting from the back of the string.
I did it in PHP and do some cleaning before counting (superfluous
chars, chars that occur before/after their place in the pattern,
replacing double chars in the pattern making all unique). I can post
the code, if someone wants...
I had some minor errors that I was able to expunge using your code and
solutions to my input.
Now we both arrive at the same solution for all inputs.
Sadly, the practice-mode judge says that they are both wrong for the
large input set.
Any idea whats going on?

On Sep 4, 1:14 am, smloh  wrote:
> I'm going to try to provide an intuitive explanation of the logic I
> used for Problem C, in the hope it may help some fellow programmers.
>
> First the code, in old-fashioned C:
> #include 
> #include 
> #include 
> int main(int argc,char *argv[])
> { [...]

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Egg Drop

2009-09-08 Thread Hawston LLH
in case, if you drop on 8, it breaks, then you cannot tell whether it will
break on 7 or not, but for sure it will break on 8. So 3 drop + 3 break only
work for 7 floor, not 8.

On Wed, Sep 9, 2009 at 1:02 AM, Satyajit Malugu
wrote:

> Then why not the number is 8? Using your logic, 3 attempts and 3 broken
> eggs can be used on a 8 floor building.
>
> Part of the explanation.
>
> Attempt on 4, does not break, attempt on 6- does not break, attempt on 8.
> If breaks answer is 7 does not answer is 8.
>
> Attemp on 4, breaks, attempt on 2, breaks, attempt on 1- breaks then answer
> is 1.
>
> IMHO binary search on 7 and 8 are similar.
>
> On Tue, Sep 8, 2009 at 12:41 PM, Paul Smith wrote:
>
>>
>> No.  With 3 drops, allowing 3 breaks, you can test 7 floors.  3,3,3
>> doesn't come into the solution, it's just a starting point.
>>
>> You drop the first egg at floor 4.  If it breaks then you try floor 2
>> next, else you try floor 6.  The 3rd egg goes either at floor 1, 3, 5,
>> or 7.  It's a simple binary search.
>>
>> (The implicit assumption is that if an egg breaks on floor 4, it will
>> also break on any higher floor.  If an egg does not break on floor 4,
>> it will also not break on any lower floor)
>>
>> On Tue, Sep 8, 2009 at 5:42 PM, Jason Lepack wrote:
>> > I don't understand how 7 is achieved for max F in the first test case.
>>  Since S(3,3,3) is true, it is determined that within three drops, allowing
>> 3 breaks, it's known whether or not the egg will break at all floors less
>> than or equal to 3.  Right?
>> >
>> > The leap to 7 is foggy for me.  I could see the answer being 6, as with
>> three drops we could check 4,5, and 6.
>> >
>> > I know i'm missing something but I don't know what it is.  I'll admit
>> it's a little frustrating ;)
>> > Sent on the TELUS Mobility network with BlackBerry
>> >
>> > -Original Message-
>> > From: Paul Smith 
>> >
>> > Date: Tue, 8 Sep 2009 14:45:39
>> > To: 
>> > Subject: [gcj] Re: Egg Drop
>> >
>> >
>> >
>> > The sample input has 2 test cases.  The first, 3 3 3, tell you that
>> > Solvable(3,3,3) is true. So, you are asked,
>> >
>> > what is the maximum number F such that Solveable(F,3,3) is true,
>> > what is the minimum number D such that Solveable(3,D,3) is true,
>> > what is the minimum number B such that Solveable(3,3,B) is true.
>> >
>> > The answer for this case is 7 2 1, as S(7,3,3), S(3,2,3) and S(3,3,1)
>> > are all true.
>> >
>> > Similarly, given that S(7,5,3) is true, S(25, 5, 3), S(7,3,3) and
>> > S(7,5,2) are all true, 7 5 3 -> 25 3 2
>> >
>> > On Tue, Sep 8, 2009 at 1:48 PM, LeppyR64 wrote:
>> >>
>> >> I'm having trouble understanding the problem statement.
>> >>
>> >> I understand what is expected for output, but not how to get from the
>> >> sample input to the output.
>> >> Could someone please explain the sample test case?
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > Paul Smith
>> > http://www.nomadicfun.co.uk
>> >
>> > p...@pollyandpaul.co.uk
>> >
>> >
>> >
>> > >
>> >
>>
>>
>>
>> --
>> Paul Smith
>> http://www.nomadicfun.co.uk
>>
>> p...@pollyandpaul.co.uk
>>
>>
>>
>
>
> --
> Satyajit
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Participation Statistics Qualification Round 2009

2009-09-08 Thread Siddiq Akbar
Yes JSON it is!

It has pretty much replaced XML from AJAX... making it AJAJ ... :p








On Wed, Sep 9, 2009 at 6:01 AM, qasim zeeshan wrote:

> Oh, seems like some JSON. Is it?
>
>
> On Wed, Sep 9, 2009 at 5:59 AM, Siddiq Akbar  wrote:
>
>> @Vivek
>>
>> I recommend you play around with Firebug. Its is a nice place to start
>> investigating websites.
>>
>> Check this:
>> http://code.google.com/codejam/contest/scoreboard/do?cmd=GetScoreboard&contest_id=90101&show_type=all&start_pos=1&views_time=0&views_file=0&csrfmiddlewaretoken=
>>
>> Have fun
>>
>> Regards,
>> Siddiq
>>
>> http://siddiq.info
>>
>>
>>
>> On Mon, Sep 7, 2009 at 6:35 AM, vgbhat  wrote:
>>
>>>
>>> Hi Siddiq,
>>>
>>> Nice job! BTW, how did you extract the data from code jam dashboard?
>>> Did you use any script again?
>>>
>>> I am learning on some web stuff. So, want to know :-)
>>>
>>> Thanks,
>>> Vivek
>>>
>>> On Sep 6, 1:09 pm, Siddiq Akbar  wrote:
>>> > @vexorian
>>> > I agree with you, everybody who achieved 99 score is more meaningful.
>>> > I have removed the top 100 and top 50...
>>> > Instead I added the list with all participants who achieved 99 score
>>> grouped
>>> > by country...
>>> http://siddiq-technology.blogspot.com/2009/09/google-code-jam-qualifi...
>>> >
>>> > And a complete list just for fun... and find your name...
>>> http://siddiq.info/jam2009/all-participants-google-code-jam-2009-qual...
>>> >
>>> >
>>> >
>>> > On Sun, Sep 6, 2009 at 3:14 AM, vexorian  wrote:
>>> >
>>> > > Those rankings are biased as the start time of the round was
>>> > > friendlier for US and also my country. Many European and Asian
>>> > > contestants started later.
>>> >
>>> > > I think it would be more meaningful to see the percentages of each
>>> > > country considering everybody who achieved 99, not just top 100.
>>> >
>>> > > Nevertheless, this bias problem won't apply for the next rounds, and
>>> > > it would be nice these stats were published for the next rounds.
>>> >
>>> > > On Sep 4, 3:53 pm, Siddiq Akbar  wrote:
>>> > > > Here are some nice statistics...
>>> > >
>>> http://siddiq-technology.blogspot.com/2009/09/google-code-jam-qualifi...
>>> >
>>> > > > USA rocked on the charts for top positions...
>>>
>>>
>>
>>
>>
>
>
> --
> Qasim Zeeshan
> PUCIT, PU Alumni '04
> Software Engineer
> CambridgeDocs Pakistan
> A Division of Document Science | EMC USA
> http://qzeeshan.blogspot.com/
>
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Participation Statistics Qualification Round 2009

2009-09-08 Thread qasim zeeshan
Oh, seems like some JSON. Is it?

On Wed, Sep 9, 2009 at 5:59 AM, Siddiq Akbar  wrote:

> @Vivek
>
> I recommend you play around with Firebug. Its is a nice place to start
> investigating websites.
>
> Check this:
> http://code.google.com/codejam/contest/scoreboard/do?cmd=GetScoreboard&contest_id=90101&show_type=all&start_pos=1&views_time=0&views_file=0&csrfmiddlewaretoken=
>
> Have fun
>
> Regards,
> Siddiq
>
> http://siddiq.info
>
>
>
> On Mon, Sep 7, 2009 at 6:35 AM, vgbhat  wrote:
>
>>
>> Hi Siddiq,
>>
>> Nice job! BTW, how did you extract the data from code jam dashboard?
>> Did you use any script again?
>>
>> I am learning on some web stuff. So, want to know :-)
>>
>> Thanks,
>> Vivek
>>
>> On Sep 6, 1:09 pm, Siddiq Akbar  wrote:
>> > @vexorian
>> > I agree with you, everybody who achieved 99 score is more meaningful.
>> > I have removed the top 100 and top 50...
>> > Instead I added the list with all participants who achieved 99 score
>> grouped
>> > by country...
>> http://siddiq-technology.blogspot.com/2009/09/google-code-jam-qualifi...
>> >
>> > And a complete list just for fun... and find your name...
>> http://siddiq.info/jam2009/all-participants-google-code-jam-2009-qual...
>> >
>> >
>> >
>> > On Sun, Sep 6, 2009 at 3:14 AM, vexorian  wrote:
>> >
>> > > Those rankings are biased as the start time of the round was
>> > > friendlier for US and also my country. Many European and Asian
>> > > contestants started later.
>> >
>> > > I think it would be more meaningful to see the percentages of each
>> > > country considering everybody who achieved 99, not just top 100.
>> >
>> > > Nevertheless, this bias problem won't apply for the next rounds, and
>> > > it would be nice these stats were published for the next rounds.
>> >
>> > > On Sep 4, 3:53 pm, Siddiq Akbar  wrote:
>> > > > Here are some nice statistics...
>> > >http://siddiq-technology.blogspot.com/2009/09/google-code-jam-qualifi.
>> ..
>> >
>> > > > USA rocked on the charts for top positions...
>>
>>
>
> >
>


-- 
Qasim Zeeshan
PUCIT, PU Alumni '04
Software Engineer
CambridgeDocs Pakistan
A Division of Document Science | EMC USA
http://qzeeshan.blogspot.com/

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Participation Statistics Qualification Round 2009

2009-09-08 Thread Siddiq Akbar
@Vivek

I recommend you play around with Firebug. Its is a nice place to start
investigating websites.

Check this:
http://code.google.com/codejam/contest/scoreboard/do?cmd=GetScoreboard&contest_id=90101&show_type=all&start_pos=1&views_time=0&views_file=0&csrfmiddlewaretoken=

Have fun

Regards,
Siddiq

http://siddiq.info


On Mon, Sep 7, 2009 at 6:35 AM, vgbhat  wrote:

>
> Hi Siddiq,
>
> Nice job! BTW, how did you extract the data from code jam dashboard?
> Did you use any script again?
>
> I am learning on some web stuff. So, want to know :-)
>
> Thanks,
> Vivek
>
> On Sep 6, 1:09 pm, Siddiq Akbar  wrote:
> > @vexorian
> > I agree with you, everybody who achieved 99 score is more meaningful.
> > I have removed the top 100 and top 50...
> > Instead I added the list with all participants who achieved 99 score
> grouped
> > by country...
> http://siddiq-technology.blogspot.com/2009/09/google-code-jam-qualifi...
> >
> > And a complete list just for fun... and find your name...
> http://siddiq.info/jam2009/all-participants-google-code-jam-2009-qual...
> >
> >
> >
> > On Sun, Sep 6, 2009 at 3:14 AM, vexorian  wrote:
> >
> > > Those rankings are biased as the start time of the round was
> > > friendlier for US and also my country. Many European and Asian
> > > contestants started later.
> >
> > > I think it would be more meaningful to see the percentages of each
> > > country considering everybody who achieved 99, not just top 100.
> >
> > > Nevertheless, this bias problem won't apply for the next rounds, and
> > > it would be nice these stats were published for the next rounds.
> >
> > > On Sep 4, 3:53 pm, Siddiq Akbar  wrote:
> > > > Here are some nice statistics...
> > >http://siddiq-technology.blogspot.com/2009/09/google-code-jam-qualifi.
> ..
> >
> > > > USA rocked on the charts for top positions...
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Solution check

2009-09-08 Thread Lucas Piva

On Sun, Sep 6, 2009 at 11:42 PM, tog wrote:
>
> My fault :) I did not realize that the input was changing for every
> trial ... I kept on trying to upload the same result because I knew it
> was correct ... but for the previous input set.
I'm sorry for you.

This, however, shows how important it is to read the rules, and
practice with previous problems before the contest.

>
> Next year, I will be more careful about this :)
>
> Good luck for the next round ... I will keep on playing but for fun now.
>
>
> On Sun, Sep 6, 2009 at 8:58 PM, ASTS wrote:
>> Comparing to my small output file your generated output is incorrect...check
>> it again...
>>
>> On Sun, Sep 6, 2009 at 6:15 PM, tog  wrote:
>>>
>>> Here it is ...
>>>
>>> On Sun, Sep 6, 2009 at 5:34 PM, Luke Pebody wrote:
>>> >
>>> > I also need the .in file.
>>> >
>>> > On Sun, Sep 6, 2009 at 12:41 PM, tog wrote:
>>> >> Hi Luke
>>> >> Thanks for the help, this is what I did before posting on the list.
>>> >> Here is (my far from optimal code) and the solution I got.
>>> >>
>>> >> One question: What is checked ? The solution or the code ?
>>> >>
>>> >> Cheers
>>> >> Guillaume
>>> >>
>>> >> On Sun, Sep 6, 2009 at 2:28 PM, Luke Pebody
>>> >> wrote:
>>> >>>
>>> >>> http://code.google.com/codejam/contest/dashboard?c=90101#
>>> >>>
>>> >>> Log in if necessary.
>>> >>>
>>> >>> Click on "View my submissions". You can download the input and output.
>>> >>> If that doesn't shed any light, then attach them to your reply to this
>>> >>> message, and I'll try and help.
>>> >>>
>>> >>>
>>> >>> On Sun, Sep 6, 2009 at 3:37 AM, tog wrote:
>>> 
>>>  Hi,
>>> 
>>>  I did submit it under "tog" ...
>>>  I thought that you check the outputs ...
>>>  I cannot see any difference with my output and outputs generated by
>>>  other candidates (even for A-small which is announced to be wrong)
>>> 
>>>  I must admit that this is quite frustrating ;)
>>> 
>>>  Cheers
>>>  Guillaume
>>> 
>>>  On Sun, Sep 6, 2009 at 3:19 AM, Luke Pebody
>>>  wrote:
>>> >
>>> > Under what name did you submit your code?
>>> >
>>> > On Sat, Sep 5, 2009 at 5:22 AM, tog
>>> > wrote:
>>> >>
>>> >> Hi coders,
>>> >>
>>> >> I am a bit surprised - I got the right answer to A-large while my
>>> >> answer to A-small is considered wrong. I am a bit puzzled since I
>>> >> used
>>> >> the same code (I checked) ...
>>> >>
>>> >> The fact is that I ended up with only 23 pts ;)
>>> >>
>>> >> Can anyone help me to understand ?
>>> >>
>>> >> Cheers
>>> >> Guillaume
>>> >>
>>> >> >
>>> >>
>>> >
>>> > >
>>> >
>>> 
>>> 
>>> 
>>>  --
>>>  PGP KeyID: 1024D/69B00854  subkeys.pgp.net
>>> 
>>>  http://cheztog.blogspot.com
>>> 
>>>  >
>>> 
>>> >>>
>>> >>> >
>>> >>>
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> PGP KeyID: 1024D/69B00854  subkeys.pgp.net
>>> >>
>>> >> http://cheztog.blogspot.com
>>> >>
>>> >> >
>>> >>
>>> >
>>> > >
>>> >
>>>
>>>
>>>
>>> --
>>> PGP KeyID: 1024D/69B00854  subkeys.pgp.net
>>>
>>> http://cheztog.blogspot.com
>>>
>>>
>>
>>
>> >
>>
>
>
>
> --
> PGP KeyID: 1024D/69B00854  subkeys.pgp.net
>
> http://cheztog.blogspot.com
>
> >
>



-- 
Piva

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Subrounds

2009-09-08 Thread oberon
Thanks

On Sat, Sep 5, 2009 at 6:17 AM, Bartholomew Furrow  wrote:

> http://code.google.com/codejam/contest/registration?cmd=Update
>
>
> On Fri, Sep 4, 2009 at 7:49 AM, Yura Znovyak  wrote:
>
>>
>> Hello,
>>
>> I forgot which sub-rounds I selected during registration. Is there a
>> way to find that out?
>>
>>
>>
>
> >
>


-- 
Best regards,
 Yuriy Znovyak mailto:oberon...@gmail.com

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Egg Drop

2009-09-08 Thread Jason Lepack

Sergey,

You don't need to know why/how S(63,7,3) is possible, just know that it IS.

On Tue, Sep 8, 2009 at 9:30 AM, Sergey Ochkin wrote:
>
> The problem statement looks quite clear to me. Specifically, it tells
> that every test case in input file is "solvable", which means that
> there is an algorythm for determining the lowest floor where the egg
> breaks...
> However I discovered an inconsistency in the first (small) input file.
> It contains the following test case: 63 7 3.
> I simply do not believe that it is possible to determine the lowest
> crash-floor in a 63-floor building with only 7 drops and 3 breaks!
> Can anyone give a hint if I am mad or the test case is incorrect?
> --
> On Sep 8, 5:45 pm, Paul Smith  wrote:
>> The sample input has 2 test cases.  The first, 3 3 3, tell you that
>> Solvable(3,3,3) is true. So, you are asked,
>>
>> what is the maximum number F such that Solveable(F,3,3) is true,
>> what is the minimum number D such that Solveable(3,D,3) is true,
>> what is the minimum number B such that Solveable(3,3,B) is true.
>>
>> The answer for this case is 7 2 1, as S(7,3,3), S(3,2,3) and S(3,3,1)
>> are all true.
>>
>> Similarly, given that S(7,5,3) is true, S(25, 5, 3), S(7,3,3) and
>> S(7,5,2) are all true, 7 5 3 -> 25 3 2
>>
>> On Tue, Sep 8, 2009 at 1:48 PM, LeppyR64 wrote:
>>
>> > I'm having trouble understanding the problem statement.
>>
>> > I understand what is expected for output, but not how to get from the
>> > sample input to the output.
>> > Could someone please explain the sample test case?
>>
>> --
>> Paul Smithhttp://www.nomadicfun.co.uk
>>
>> p...@pollyandpaul.co.uk
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Egg Drop

2009-09-08 Thread Jason Lepack

Satyajit,

That's not true.  If you jump to 8 from 6, instead of seven and the
egg breaks on 8, you don't have an egg left to determine whether or
not the egg would break on floor seven, and therefore S(8,3,3) is
false.  You can't assume that since the egg broke on 8 that it
will/won't break on 7.

On Tue, Sep 8, 2009 at 10:02 AM, Satyajit
Malugu wrote:
> Then why not the number is 8? Using your logic, 3 attempts and 3 broken eggs
> can be used on a 8 floor building.
>
> Part of the explanation.
> Attempt on 4, does not break, attempt on 6- does not break, attempt on 8. If
> breaks answer is 7 does not answer is 8.
> Attemp on 4, breaks, attempt on 2, breaks, attempt on 1- breaks then answer
> is 1.
> IMHO binary search on 7 and 8 are similar.
>
> On Tue, Sep 8, 2009 at 12:41 PM, Paul Smith 
> wrote:
>>
>> No.  With 3 drops, allowing 3 breaks, you can test 7 floors.  3,3,3
>> doesn't come into the solution, it's just a starting point.
>>
>> You drop the first egg at floor 4.  If it breaks then you try floor 2
>> next, else you try floor 6.  The 3rd egg goes either at floor 1, 3, 5,
>> or 7.  It's a simple binary search.
>>
>> (The implicit assumption is that if an egg breaks on floor 4, it will
>> also break on any higher floor.  If an egg does not break on floor 4,
>> it will also not break on any lower floor)
>>
>> On Tue, Sep 8, 2009 at 5:42 PM, Jason Lepack wrote:
>> > I don't understand how 7 is achieved for max F in the first test case.
>> >  Since S(3,3,3) is true, it is determined that within three drops, allowing
>> > 3 breaks, it's known whether or not the egg will break at all floors less
>> > than or equal to 3.  Right?
>> >
>> > The leap to 7 is foggy for me.  I could see the answer being 6, as with
>> > three drops we could check 4,5, and 6.
>> >
>> > I know i'm missing something but I don't know what it is.  I'll admit
>> > it's a little frustrating ;)
>> > Sent on the TELUS Mobility network with BlackBerry
>> >
>> > -Original Message-
>> > From: Paul Smith 
>> >
>> > Date: Tue, 8 Sep 2009 14:45:39
>> > To: 
>> > Subject: [gcj] Re: Egg Drop
>> >
>> >
>> >
>> > The sample input has 2 test cases.  The first, 3 3 3, tell you that
>> > Solvable(3,3,3) is true. So, you are asked,
>> >
>> > what is the maximum number F such that Solveable(F,3,3) is true,
>> > what is the minimum number D such that Solveable(3,D,3) is true,
>> > what is the minimum number B such that Solveable(3,3,B) is true.
>> >
>> > The answer for this case is 7 2 1, as S(7,3,3), S(3,2,3) and S(3,3,1)
>> > are all true.
>> >
>> > Similarly, given that S(7,5,3) is true, S(25, 5, 3), S(7,3,3) and
>> > S(7,5,2) are all true, 7 5 3 -> 25 3 2
>> >
>> > On Tue, Sep 8, 2009 at 1:48 PM, LeppyR64 wrote:
>> >>
>> >> I'm having trouble understanding the problem statement.
>> >>
>> >> I understand what is expected for output, but not how to get from the
>> >> sample input to the output.
>> >> Could someone please explain the sample test case?
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > Paul Smith
>> > http://www.nomadicfun.co.uk
>> >
>> > p...@pollyandpaul.co.uk
>> >
>> >
>> >
>> > >
>> >
>>
>>
>>
>> --
>> Paul Smith
>> http://www.nomadicfun.co.uk
>>
>> p...@pollyandpaul.co.uk
>>
>>
>
>
>
> --
> Satyajit
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Egg Drop

2009-09-08 Thread Jason Lepack

Paul,

That makes sense and I appreciate it!  That's what I was missing.  Cheers!


On Tue, Sep 8, 2009 at 9:41 AM, Paul Smith wrote:
>
> No.  With 3 drops, allowing 3 breaks, you can test 7 floors.  3,3,3
> doesn't come into the solution, it's just a starting point.
>
> You drop the first egg at floor 4.  If it breaks then you try floor 2
> next, else you try floor 6.  The 3rd egg goes either at floor 1, 3, 5,
> or 7.  It's a simple binary search.
>
> (The implicit assumption is that if an egg breaks on floor 4, it will
> also break on any higher floor.  If an egg does not break on floor 4,
> it will also not break on any lower floor)
>
> On Tue, Sep 8, 2009 at 5:42 PM, Jason Lepack wrote:
>> I don't understand how 7 is achieved for max F in the first test case.  
>> Since S(3,3,3) is true, it is determined that within three drops, allowing 3 
>> breaks, it's known whether or not the egg will break at all floors less than 
>> or equal to 3.  Right?
>>
>> The leap to 7 is foggy for me.  I could see the answer being 6, as with 
>> three drops we could check 4,5, and 6.
>>
>> I know i'm missing something but I don't know what it is.  I'll admit it's a 
>> little frustrating ;)
>> Sent on the TELUS Mobility network with BlackBerry
>>
>> -Original Message-
>> From: Paul Smith 
>>
>> Date: Tue, 8 Sep 2009 14:45:39
>> To: 
>> Subject: [gcj] Re: Egg Drop
>>
>>
>>
>> The sample input has 2 test cases.  The first, 3 3 3, tell you that
>> Solvable(3,3,3) is true. So, you are asked,
>>
>> what is the maximum number F such that Solveable(F,3,3) is true,
>> what is the minimum number D such that Solveable(3,D,3) is true,
>> what is the minimum number B such that Solveable(3,3,B) is true.
>>
>> The answer for this case is 7 2 1, as S(7,3,3), S(3,2,3) and S(3,3,1)
>> are all true.
>>
>> Similarly, given that S(7,5,3) is true, S(25, 5, 3), S(7,3,3) and
>> S(7,5,2) are all true, 7 5 3 -> 25 3 2
>>
>> On Tue, Sep 8, 2009 at 1:48 PM, LeppyR64 wrote:
>>>
>>> I'm having trouble understanding the problem statement.
>>>
>>> I understand what is expected for output, but not how to get from the
>>> sample input to the output.
>>> Could someone please explain the sample test case?
>>> >
>>>
>>
>>
>>
>> --
>> Paul Smith
>> http://www.nomadicfun.co.uk
>>
>> p...@pollyandpaul.co.uk
>>
>>
>>
>> >
>>
>
>
>
> --
> Paul Smith
> http://www.nomadicfun.co.uk
>
> p...@pollyandpaul.co.uk
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: A late question about 'watersheds'..

2009-09-08 Thread Nactive

Well, I had the same problem but in the example input the last case
is:

8 8 8 8 8 8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8 8 8 8 8 8

The answer is:

a b c d e f g h i j k l m
n o p q r s t u v w x y z

That made it pretty clear for me.

On Sep 7, 4:55 am, jz  wrote:
> hey folks, good job with gcj.
>
> i couldn't understand something in prob B 'watersheds'.
>
> in following case in sample input,
> [2 3]
> 7 6 7
> 7 6 7
>
> now upper 6 and downer 6 has same altitude.
>
> So what i thought was i should follow "NORTH WEST EAST SOUTH" rule,
>
> so upper 6 must be the sink, and the basin map should be
>
> a a a
> a a a
>
> not
> a a a
> b b b
>
> i don't understand why BOTH 6s are sinks. 'flows' follow 'tie
> situations' but 'sinks' don't?
--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Кто решил зада чу С на квалификейшн рау нде?

2009-09-08 Thread romanr
Решай "в лоб" с кешированием - это называется "динамическое
программирование".

Misha Marchenko wrote:
> Смотрел. Мне интереснее какой алгоритм был использован, какого его
> название?
> В том году я узнал, например, про венгерский алгоритм
>
> 7 сентября 2009 г. 22:08 пользователь Satyajit Malugu
> mailto:malugu.satya...@gmail.com>> написал:
>
> Last year the contest was won by a chinese. Though the questions
> are given in English and we'd be interested in knowing what all
> the talking, we can't force anyone to communicate with rest of us :)
>


--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Solution check

2009-09-08 Thread blue lightning

nice spirit...!!
keep fighting!! there still another chance ;)

On Sep 7, 9:42 am, tog  wrote:
> My fault :) I did not realize that the input was changing for every
> trial ... I kept on trying to upload the same result because I knew it
> was correct ... but for the previous input set.
>
> Next year, I will be more careful about this :)
>
> Good luck for the next round ... I will keep on playing but for fun now.
>
>
>
> On Sun, Sep 6, 2009 at 8:58 PM, ASTS wrote:
> > Comparing to my small output file your generated output is incorrect...check
> > it again...
>
> > On Sun, Sep 6, 2009 at 6:15 PM, tog  wrote:
>
> >> Here it is ...
>
> >> On Sun, Sep 6, 2009 at 5:34 PM, Luke Pebody wrote:
>
> >> > I also need the .in file.
>
> >> > On Sun, Sep 6, 2009 at 12:41 PM, tog wrote:
> >> >> Hi Luke
> >> >> Thanks for the help, this is what I did before posting on the list.
> >> >> Here is (my far from optimal code) and the solution I got.
>
> >> >> One question: What is checked ? The solution or the code ?
>
> >> >> Cheers
> >> >> Guillaume
>
> >> >> On Sun, Sep 6, 2009 at 2:28 PM, Luke Pebody
> >> >> wrote:
>
> >> >>>http://code.google.com/codejam/contest/dashboard?c=90101#
>
> >> >>> Log in if necessary.
>
> >> >>> Click on "View my submissions". You can download the input and output.
> >> >>> If that doesn't shed any light, then attach them to your reply to this
> >> >>> message, and I'll try and help.
>
> >> >>> On Sun, Sep 6, 2009 at 3:37 AM, tog wrote:
>
> >>  Hi,
>
> >>  I did submit it under "tog" ...
> >>  I thought that you check the outputs ...
> >>  I cannot see any difference with my output and outputs generated by
> >>  other candidates (even for A-small which is announced to be wrong)
>
> >>  I must admit that this is quite frustrating ;)
>
> >>  Cheers
> >>  Guillaume
>
> >>  On Sun, Sep 6, 2009 at 3:19 AM, Luke Pebody
> >>  wrote:
>
> >> > Under what name did you submit your code?
>
> >> > On Sat, Sep 5, 2009 at 5:22 AM, tog
> >> > wrote:
>
> >> >> Hi coders,
>
> >> >> I am a bit surprised - I got the right answer to A-large while my
> >> >> answer to A-small is considered wrong. I am a bit puzzled since I
> >> >> used
> >> >> the same code (I checked) ...
>
> >> >> The fact is that I ended up with only 23 pts ;)
>
> >> >> Can anyone help me to understand ?
>
> >> >> Cheers
> >> >> Guillaume
>
> >>  --
> >>  PGP KeyID: 1024D/69B00854  subkeys.pgp.net
>
> >> http://cheztog.blogspot.com
>
> >> >> --
> >> >> PGP KeyID: 1024D/69B00854  subkeys.pgp.net
>
> >> >>http://cheztog.blogspot.com
>
> >> --
> >> PGP KeyID: 1024D/69B00854  subkeys.pgp.net
>
> >>http://cheztog.blogspot.com
>
> --
> PGP KeyID: 1024D/69B00854  subkeys.pgp.net
>
> http://cheztog.blogspot.com
--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Egg Drop

2009-09-08 Thread Sergey Ochkin

The problem statement looks quite clear to me. Specifically, it tells
that every test case in input file is "solvable", which means that
there is an algorythm for determining the lowest floor where the egg
breaks...
However I discovered an inconsistency in the first (small) input file.
It contains the following test case: 63 7 3.
I simply do not believe that it is possible to determine the lowest
crash-floor in a 63-floor building with only 7 drops and 3 breaks!
Can anyone give a hint if I am mad or the test case is incorrect?
--
On Sep 8, 5:45 pm, Paul Smith  wrote:
> The sample input has 2 test cases.  The first, 3 3 3, tell you that
> Solvable(3,3,3) is true. So, you are asked,
>
> what is the maximum number F such that Solveable(F,3,3) is true,
> what is the minimum number D such that Solveable(3,D,3) is true,
> what is the minimum number B such that Solveable(3,3,B) is true.
>
> The answer for this case is 7 2 1, as S(7,3,3), S(3,2,3) and S(3,3,1)
> are all true.
>
> Similarly, given that S(7,5,3) is true, S(25, 5, 3), S(7,3,3) and
> S(7,5,2) are all true, 7 5 3 -> 25 3 2
>
> On Tue, Sep 8, 2009 at 1:48 PM, LeppyR64 wrote:
>
> > I'm having trouble understanding the problem statement.
>
> > I understand what is expected for output, but not how to get from the
> > sample input to the output.
> > Could someone please explain the sample test case?
>
> --
> Paul Smithhttp://www.nomadicfun.co.uk
>
> p...@pollyandpaul.co.uk

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Still have no email

2009-09-08 Thread Bryan

When are we supposed to get the emails letting us know what are two
slots are for round 1? Round 1A is only in 3 days.

Thanks,
Bryan

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: I'm in???

2009-09-08 Thread Taichi

May I ask when the estimating date of sending the mail is ?

On Sep 8, 4:11 am, Bartholomew Furrow  wrote:
> > I make 33 points in the qualification round.. I can participate in the
> > round 1?? Google don't send emails to notify this?
>
> Yes, with 33 points you qualified.  We will send out an email to people who
> qualified, but we have a large number of reports of cheating that we'd like
> to address first.  Sorry for the delay, and congratulations!
>
> Bartholomew

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Problem C "Welcome to Code Jam"

2009-09-08 Thread Pratyush

In case, you have used recursion, just try and check if you have used
dynamic programming/ memoization or not..
In case you haven't, your code will run for years and not show an
output.. :P
Regards,
Pratyush

On Sep 5, 1:59 am, Bey  wrote:
> Hi
> I noticed that there are a large number of people who go the small
> input correct for prob C but not the large input. I was wondering why
> that might be. I am one of those people. I think I applied Dynamic
> Programming, and it worked on the small input, but not the large
> input. I still can't figure it out. Does anyone know why a lot of
> people are in the same lot? Basically, I think I am counting the
> number of ways so far of being in one of the 18 states, of having
> observed 'w', 'we', 'wel' etc. And then I write out the number of
> ways  of being in the 18th state at the end. Why do I fail on large
> values? I also mod everytime I add numbers.
>
> What is going on? Did you fail on large input too? Did you figure out
> why?

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Egg Drop

2009-09-08 Thread Bartholomew Furrow
>
> Attempt on 4, does not break, attempt on 6- does not break, attempt on 8.
> If breaks answer is 7 does not answer is 8.
>

"If breaks answer is 7" -- or 6, if you're looking for the highest floor
from which it doesn't break.

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: favorite programming language?

2009-09-08 Thread Bartholomew Furrow
>
> http://www.cplusplus.com/reference/algorithm/
>
> I believe the most important to learn are STL algorithms and containers.
>
> P.S. I can link to other sites right?
>

You seem to be able to!

Please feel free to link to them and use them -- as long as a site isn't
about the current round (technically: the site was last changed before the
current round started), you can use it during the competition as well.

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Egg Drop

2009-09-08 Thread Satyajit Malugu
Then why not the number is 8? Using your logic, 3 attempts and 3 broken eggs
can be used on a 8 floor building.

Part of the explanation.

Attempt on 4, does not break, attempt on 6- does not break, attempt on 8. If
breaks answer is 7 does not answer is 8.

Attemp on 4, breaks, attempt on 2, breaks, attempt on 1- breaks then answer
is 1.

IMHO binary search on 7 and 8 are similar.

On Tue, Sep 8, 2009 at 12:41 PM, Paul Smith wrote:

>
> No.  With 3 drops, allowing 3 breaks, you can test 7 floors.  3,3,3
> doesn't come into the solution, it's just a starting point.
>
> You drop the first egg at floor 4.  If it breaks then you try floor 2
> next, else you try floor 6.  The 3rd egg goes either at floor 1, 3, 5,
> or 7.  It's a simple binary search.
>
> (The implicit assumption is that if an egg breaks on floor 4, it will
> also break on any higher floor.  If an egg does not break on floor 4,
> it will also not break on any lower floor)
>
> On Tue, Sep 8, 2009 at 5:42 PM, Jason Lepack wrote:
> > I don't understand how 7 is achieved for max F in the first test case.
>  Since S(3,3,3) is true, it is determined that within three drops, allowing
> 3 breaks, it's known whether or not the egg will break at all floors less
> than or equal to 3.  Right?
> >
> > The leap to 7 is foggy for me.  I could see the answer being 6, as with
> three drops we could check 4,5, and 6.
> >
> > I know i'm missing something but I don't know what it is.  I'll admit
> it's a little frustrating ;)
> > Sent on the TELUS Mobility network with BlackBerry
> >
> > -Original Message-
> > From: Paul Smith 
> >
> > Date: Tue, 8 Sep 2009 14:45:39
> > To: 
> > Subject: [gcj] Re: Egg Drop
> >
> >
> >
> > The sample input has 2 test cases.  The first, 3 3 3, tell you that
> > Solvable(3,3,3) is true. So, you are asked,
> >
> > what is the maximum number F such that Solveable(F,3,3) is true,
> > what is the minimum number D such that Solveable(3,D,3) is true,
> > what is the minimum number B such that Solveable(3,3,B) is true.
> >
> > The answer for this case is 7 2 1, as S(7,3,3), S(3,2,3) and S(3,3,1)
> > are all true.
> >
> > Similarly, given that S(7,5,3) is true, S(25, 5, 3), S(7,3,3) and
> > S(7,5,2) are all true, 7 5 3 -> 25 3 2
> >
> > On Tue, Sep 8, 2009 at 1:48 PM, LeppyR64 wrote:
> >>
> >> I'm having trouble understanding the problem statement.
> >>
> >> I understand what is expected for output, but not how to get from the
> >> sample input to the output.
> >> Could someone please explain the sample test case?
> >> >
> >>
> >
> >
> >
> > --
> > Paul Smith
> > http://www.nomadicfun.co.uk
> >
> > p...@pollyandpaul.co.uk
> >
> >
> >
> > >
> >
>
>
>
> --
> Paul Smith
> http://www.nomadicfun.co.uk
>
> p...@pollyandpaul.co.uk
>
> >
>


-- 
Satyajit

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Egg Drop

2009-09-08 Thread Paul Smith

No.  With 3 drops, allowing 3 breaks, you can test 7 floors.  3,3,3
doesn't come into the solution, it's just a starting point.

You drop the first egg at floor 4.  If it breaks then you try floor 2
next, else you try floor 6.  The 3rd egg goes either at floor 1, 3, 5,
or 7.  It's a simple binary search.

(The implicit assumption is that if an egg breaks on floor 4, it will
also break on any higher floor.  If an egg does not break on floor 4,
it will also not break on any lower floor)

On Tue, Sep 8, 2009 at 5:42 PM, Jason Lepack wrote:
> I don't understand how 7 is achieved for max F in the first test case.  Since 
> S(3,3,3) is true, it is determined that within three drops, allowing 3 
> breaks, it's known whether or not the egg will break at all floors less than 
> or equal to 3.  Right?
>
> The leap to 7 is foggy for me.  I could see the answer being 6, as with three 
> drops we could check 4,5, and 6.
>
> I know i'm missing something but I don't know what it is.  I'll admit it's a 
> little frustrating ;)
> Sent on the TELUS Mobility network with BlackBerry
>
> -Original Message-
> From: Paul Smith 
>
> Date: Tue, 8 Sep 2009 14:45:39
> To: 
> Subject: [gcj] Re: Egg Drop
>
>
>
> The sample input has 2 test cases.  The first, 3 3 3, tell you that
> Solvable(3,3,3) is true. So, you are asked,
>
> what is the maximum number F such that Solveable(F,3,3) is true,
> what is the minimum number D such that Solveable(3,D,3) is true,
> what is the minimum number B such that Solveable(3,3,B) is true.
>
> The answer for this case is 7 2 1, as S(7,3,3), S(3,2,3) and S(3,3,1)
> are all true.
>
> Similarly, given that S(7,5,3) is true, S(25, 5, 3), S(7,3,3) and
> S(7,5,2) are all true, 7 5 3 -> 25 3 2
>
> On Tue, Sep 8, 2009 at 1:48 PM, LeppyR64 wrote:
>>
>> I'm having trouble understanding the problem statement.
>>
>> I understand what is expected for output, but not how to get from the
>> sample input to the output.
>> Could someone please explain the sample test case?
>> >
>>
>
>
>
> --
> Paul Smith
> http://www.nomadicfun.co.uk
>
> p...@pollyandpaul.co.uk
>
>
>
> >
>



-- 
Paul Smith
http://www.nomadicfun.co.uk

p...@pollyandpaul.co.uk

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Egg Drop

2009-09-08 Thread Jason Lepack
I don't understand how 7 is achieved for max F in the first test case.  Since 
S(3,3,3) is true, it is determined that within three drops, allowing 3 breaks, 
it's known whether or not the egg will break at all floors less than or equal 
to 3.  Right?

The leap to 7 is foggy for me.  I could see the answer being 6, as with three 
drops we could check 4,5, and 6.

I know i'm missing something but I don't know what it is.  I'll admit it's a 
little frustrating ;)
Sent on the TELUS Mobility network with BlackBerry

-Original Message-
From: Paul Smith 

Date: Tue, 8 Sep 2009 14:45:39 
To: 
Subject: [gcj] Re: Egg Drop



The sample input has 2 test cases.  The first, 3 3 3, tell you that
Solvable(3,3,3) is true. So, you are asked,

what is the maximum number F such that Solveable(F,3,3) is true,
what is the minimum number D such that Solveable(3,D,3) is true,
what is the minimum number B such that Solveable(3,3,B) is true.

The answer for this case is 7 2 1, as S(7,3,3), S(3,2,3) and S(3,3,1)
are all true.

Similarly, given that S(7,5,3) is true, S(25, 5, 3), S(7,3,3) and
S(7,5,2) are all true, 7 5 3 -> 25 3 2

On Tue, Sep 8, 2009 at 1:48 PM, LeppyR64 wrote:
>
> I'm having trouble understanding the problem statement.
>
> I understand what is expected for output, but not how to get from the
> sample input to the output.
> Could someone please explain the sample test case?
> >
>



-- 
Paul Smith
http://www.nomadicfun.co.uk

p...@pollyandpaul.co.uk



--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: favorite programming language?

2009-09-08 Thread Lucas Piva

When I was learning C++, I used this reference site a lot (still use):

http://www.cplusplus.com/reference/algorithm/

I believe the most important to learn are STL algorithms and containers.

P.S. I can link to other sites right?

On Tue, Sep 8, 2009 at 1:09 PM, blue
lightning wrote:
>
>
> Hi Cheng Li,
> Thanks for the explanation.. I am curious about C++ STL, I have heard
> about it
> but I haven't explored it yet. Any ideas where I can start learning
> about this STL?
>
> Thanks
> Blue Lightning
>
> On Sep 6, 12:33 pm, Cheng Li  wrote:
>> Things is C++ is more efficient to solve these algorithm problems,  and C++
>> is short. Actually, most people in the top use C-style code in C++. I think
>> they want to take advantage of C++ STL although STL is not necessary for
>> qualificaiton round.   But C++ STL is very useful sometime. Only mine mind.
>>
>> On Sat, Sep 5, 2009 at 8:40 AM, blue lightning <
>>
>> blue.lightning.thun...@gmail.com> wrote:
>>
>> > Hi all, I am new to this competition.
>> > I was using java to solve the qualification problems. After the
>> > qualification round ended, I downloaded some of the top scorer source
>> > code, and it looks like most of them are using c++. And their source
>> > code is extremely short. This may be a noob question, but I am
>> > wondering how can you write the solution in such a short codes, and is
>> > there some advantages with using c++?
>>
>> > thanks,
>> > blue lightning
>>
>> --
>> Best Regards,
>>                                         Cheng Li
> >
>



-- 
Piva

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: favorite programming language?

2009-09-08 Thread blue lightning


Hi Cheng Li,
Thanks for the explanation.. I am curious about C++ STL, I have heard
about it
but I haven't explored it yet. Any ideas where I can start learning
about this STL?

Thanks
Blue Lightning

On Sep 6, 12:33 pm, Cheng Li  wrote:
> Things is C++ is more efficient to solve these algorithm problems,  and C++
> is short. Actually, most people in the top use C-style code in C++. I think
> they want to take advantage of C++ STL although STL is not necessary for
> qualificaiton round.   But C++ STL is very useful sometime. Only mine mind.
>
> On Sat, Sep 5, 2009 at 8:40 AM, blue lightning <
>
> blue.lightning.thun...@gmail.com> wrote:
>
> > Hi all, I am new to this competition.
> > I was using java to solve the qualification problems. After the
> > qualification round ended, I downloaded some of the top scorer source
> > code, and it looks like most of them are using c++. And their source
> > code is extremely short. This may be a noob question, but I am
> > wondering how can you write the solution in such a short codes, and is
> > there some advantages with using c++?
>
> > thanks,
> > blue lightning
>
> --
> Best Regards,
>                                         Cheng Li
--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Egg Drop

2009-09-08 Thread Paul Smith

The sample input has 2 test cases.  The first, 3 3 3, tell you that
Solvable(3,3,3) is true. So, you are asked,

what is the maximum number F such that Solveable(F,3,3) is true,
what is the minimum number D such that Solveable(3,D,3) is true,
what is the minimum number B such that Solveable(3,3,B) is true.

The answer for this case is 7 2 1, as S(7,3,3), S(3,2,3) and S(3,3,1)
are all true.

Similarly, given that S(7,5,3) is true, S(25, 5, 3), S(7,3,3) and
S(7,5,2) are all true, 7 5 3 -> 25 3 2

On Tue, Sep 8, 2009 at 1:48 PM, LeppyR64 wrote:
>
> I'm having trouble understanding the problem statement.
>
> I understand what is expected for output, but not how to get from the
> sample input to the output.
> Could someone please explain the sample test case?
> >
>



-- 
Paul Smith
http://www.nomadicfun.co.uk

p...@pollyandpaul.co.uk

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Egg Drop

2009-09-08 Thread LeppyR64

I'm having trouble understanding the problem statement.

I understand what is expected for output, but not how to get from the
sample input to the output.
Could someone please explain the sample test case?
--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: "Square Fields" Problem 2008 Practice Round ?

2009-09-08 Thread Aditya Vikram Daga
But please tell me how are u varying length?

On Tue, Sep 8, 2009 at 3:08 AM,  wrote:

>
> On Sun, 6 Sep 2009 20:07:47 -0700 (PDT), decor  wrote:
> > Can anyone explain How to solve 2008 Practice Round "Square Fields"
> > Problem? I m not getting even the slightest of idea of how to go about
> > it??
>
> Since no one replied I'll give you my solution. It's probably
> overcomplicated, but that's the first thing that came to my mind and it
> works ;-)
>
> First, observation: It's enough to consider only squares that have at least
> one point on their left and top edges (possibly same point if it's a
> corner). Other squares can be moved to such position without "uncovering"
> any points. So each square can be described by this pair of points.
>
> Now let's write a function that checks if given length is enough to cover n
> points with k squares. First, sort all points (top-bottom, left-right).
> Then we can use recursion:
> [parameters:
>left - number of squares left
>cover[] - which points have been covered already
> ]
> 0. If every point is covered return 1, if left = 0 return 0
> 1. Out of all free (not covered) points pick top one as UP
> 2. For each free point as LEFT
>1. If UP and LEFT can't be covered with same square -> continue
>2. Copy cover[] to newcover[]
>3. Mark all points that are covered by square(UP, LEFT) with given
> length
> in newcover[]
>4. Run same function with parameters (left-1, newcover[])
>5. Return 1 if (4) returned 1
> 3. Return 0
>
> This can take a lot of time, but cover has only 2^16-1 possible states and
> left has only 15 states, so we can remember results of this function, which
> will give us huge speed boost.
>
> Now that we know how to check if given length is sufficient we can perform
> simple binary search for smallest possible value (~16 runs of check for
> each test case, so it's very quick).
>
> I'm not really good at explaining stuff like that, but I hope it helps.
>
> Adam
>
>
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: "Square Fields" Problem 2008 Practice Round ?

2009-09-08 Thread Aditya Vikram Daga
Thank u  very much for ur reply

On Tue, Sep 8, 2009 at 3:08 AM,  wrote:

>
> On Sun, 6 Sep 2009 20:07:47 -0700 (PDT), decor  wrote:
> > Can anyone explain How to solve 2008 Practice Round "Square Fields"
> > Problem? I m not getting even the slightest of idea of how to go about
> > it??
>
> Since no one replied I'll give you my solution. It's probably
> overcomplicated, but that's the first thing that came to my mind and it
> works ;-)
>
> First, observation: It's enough to consider only squares that have at least
> one point on their left and top edges (possibly same point if it's a
> corner). Other squares can be moved to such position without "uncovering"
> any points. So each square can be described by this pair of points.
>
> Now let's write a function that checks if given length is enough to cover n
> points with k squares. First, sort all points (top-bottom, left-right).
> Then we can use recursion:
> [parameters:
>left - number of squares left
>cover[] - which points have been covered already
> ]
> 0. If every point is covered return 1, if left = 0 return 0
> 1. Out of all free (not covered) points pick top one as UP
> 2. For each free point as LEFT
>1. If UP and LEFT can't be covered with same square -> continue
>2. Copy cover[] to newcover[]
>3. Mark all points that are covered by square(UP, LEFT) with given
> length
> in newcover[]
>4. Run same function with parameters (left-1, newcover[])
>5. Return 1 if (4) returned 1
> 3. Return 0
>
> This can take a lot of time, but cover has only 2^16-1 possible states and
> left has only 15 states, so we can remember results of this function, which
> will give us huge speed boost.
>
> Now that we know how to check if given length is sufficient we can perform
> simple binary search for smallest possible value (~16 runs of check for
> each test case, so it's very quick).
>
> I'm not really good at explaining stuff like that, but I hope it helps.
>
> Adam
>
>
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Intuitive explanation of an efficient solution for problem C "Welcome to Code Jam"

2009-09-08 Thread sameer mhatre
Yes smloh you are right. Hash map does not return objects in order they
inserted. Thats why I have used Array List inside hash map. I have made
 pair inside hash map. The Character key will hold all
distinct characters from "welcome to google code jam" string. The
corresponding value for the each Characters is a ArrayList (which is also a
Collection) in which I am adding that Character locations one by one in the
descending order (as I am processing test string from right to left then the
second 'o' should get processed before first 'o'). So while processing each
characters from test string, I m just retrieving Array List for the
character using hash map and traversing it for further process. I have used
Array List because it is definitely going to return positions in order I
have inserted ie. desceding order.

This is my code snippet:

final int MOD = 1;
int N = Integer.parseInt(reader.readLine());
String welcome = "welcome to code jam";

HashMap> map = new
HashMap>();

for(int i = welcome.length() - 1; i >= 0; i--){
char ch = welcome.charAt(i);
if(map.containsKey(ch)){
ArrayList get = map.get(ch);
get.add(i);
}else{
ArrayList te = new ArrayList();
te.add(i);
map.put(ch, te);
}
}

long [] mul = new long[welcome.length()];

for(int i = 1; i <= N; i++){
String line = reader.readLine();
Arrays.fill(mul, 0);

for(int j = line.length() - 1; j >= 0; j--){
char ch = line.charAt(j);
if(map.containsKey(ch)){
ArrayList get = map.get(ch);
for(Iterator iter = get.iterator(); iter.hasNext();){
int col = (Integer)iter.next();
if(col < welcome.length()-1){
mul[col] = (mul[col] + mul[col+1]) % MOD;
}else if(col == welcome.length()-1){
mul[col]++;
}
}
}
}
out.printf("Case #%d: %04d\n",i,mul[0]);
}


On Mon, Sep 7, 2009 at 9:37 PM, smloh  wrote:

>
> Love that optimization, Sameer.  Great example of replacing what is
> basically an inefficient linear-time search in the inner loop with the
> magic of hash tables for a usually constant-time performance.
> Although would need to make sure to be a little careful when using
> this technique for other similar problems, as I don't think the hash
> map guarantees you'll get the characters back in the same order
> they're put in.  If the target string had two adjacent repeated
> characters (like if it said "welcome to google code jam"), then would
> need to ensure the first 'o' is processed before the second one.
>
>
> On Sep 6, 3:03 am, sameer mhatre  wrote:
> > Your solution is same as mine. Only difference is that I am traversing
> test
> > string backward and using hash map to improve running time.
> >
> > You can improve the running time of your code by avoiding inner loop
> which
> > traverse 0 to 18. We can keep each distinct characters of target string
> > "welcome to code jam" in the hash map as a key and value for the key will
> be
> > the array holding respective positions in the target string.
> >
> > So while traversing outer loop for test string you just need to check
> > whether the character is available in the hash map. If it is not then no
> > need to traverse inner loop. But if the character exist then just need to
> > traverse it's respective positions (retrieve array values corresponding
> to
> > that key) only.
> >
> > You can check my solution user "sam6230i". My solution is in JAVA.
> >
> > On Fri, Sep 4, 2009 at 1:44 PM, smloh  wrote:
> >
> > > I'm going to try to provide an intuitive explanation of the logic I
> > > used for Problem C, in the hope it may help some fellow programmers.
> >
> > > First the code, in old-fashioned C:
> > > #include 
> > > #include 
> > > #include 
> > > int main(int argc,char *argv[])
> > > {
> > >   char *wstr="welcome to code jam";
> > >   FILE * pFile, *pOut;
> > >   char buffer [600];
> > >   int mults[19];
> > >   int numCases;
> > >   pFile = fopen ("c-large.in" , "r");
> > >   pOut= fopen("c-large.out","w");
> > >   if (pFile == NULL) perror ("Error opening file");
> > >   else
> > >   {
> > > fscanf(pFile, "%d\n", &numCases);
> > > for (int num=0;num > > {
> > >fgets(buffer, 600, pFile);
> > >for (int i=0;i<19;i++) mults[i]=0;
> > >fprintf(pOut,"Case #%d: ",num+1);
> > >int len=strlen(buffer);
> > >for (int i=0;i > >for (int j=0;j<19;j++){
> > >if (j==0) {
> > >if (buffer[i]==wstr[j]) mults[j]++;
> > >}else if (mults[j-1]>0){
> > >  

[gcj] Re: Round 1B 2008 - Number sets

2009-09-08 Thread Miguel Oliveira

Ops, the last frase should be "but not merging which is what this
problem is really about."

On Sep 8, 10:57 am, Miguel Oliveira 
wrote:
> The "No" was meant to "which I think uses this Union find mechanism.".
> Those Set classes allows you to insert, delete or find in an efficient
> way, mas not merging which is what this problem is really about.
>
> On Sep 8, 9:49 am, Miguel Oliveira 
> wrote:
>
> > No. You have to write the code yourself. If you understand the code.
> > You'll be able to write it from scratch easily ;)    
> > Checkhttp://en.wikipedia.org/wiki/Disjoint-set_data_structure
>
> > On Sep 8, 12:51 am, Satyajit Malugu  wrote:
>
> > > > I think that it's harder to do it that way. Do you know how to do
>
> > > those set merge operations efficiently?
>
> > > From the contest analysis its union find (graph operation) Set operations
> > > can be done efficiently in C++ STL sets or java Set which I think uses 
> > > this
> > > Union find mechanism.
>
> > > I will try to code it and see.
--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Round 1B 2008 - Number sets

2009-09-08 Thread Miguel Oliveira

The "No" was meant to "which I think uses this Union find mechanism.".
Those Set classes allows you to insert, delete or find in an efficient
way, mas not merging which is what this problem is really about.

On Sep 8, 9:49 am, Miguel Oliveira 
wrote:
> No. You have to write the code yourself. If you understand the code.
> You'll be able to write it from scratch easily ;)    
> Checkhttp://en.wikipedia.org/wiki/Disjoint-set_data_structure
>
> On Sep 8, 12:51 am, Satyajit Malugu  wrote:
>
> > > I think that it's harder to do it that way. Do you know how to do
>
> > those set merge operations efficiently?
>
> > From the contest analysis its union find (graph operation) Set operations
> > can be done efficiently in C++ STL sets or java Set which I think uses this
> > Union find mechanism.
>
> > I will try to code it and see.
--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---



[gcj] Re: Round 1B 2008 - Number sets

2009-09-08 Thread Miguel Oliveira

No. You have to write the code yourself. If you understand the code.
You'll be able to write it from scratch easily ;)Check
http://en.wikipedia.org/wiki/Disjoint-set_data_structure

On Sep 8, 12:51 am, Satyajit Malugu  wrote:
> > I think that it's harder to do it that way. Do you know how to do
>
> those set merge operations efficiently?
>
> From the contest analysis its union find (graph operation) Set operations
> can be done efficiently in C++ STL sets or java Set which I think uses this
> Union find mechanism.
>
> I will try to code it and see.
--~--~-~--~~~---~--~~
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 from this group, send email to 
google-code+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~--~~~~--~~--~--~---