This prob deal with flows ,I think it means make every flow is shortest, so
every time chioce the lowest position as next position ,and we consider every
flow as a word.
在2009-09-05?11:53:00,Cong?Thanh?Tran?congth...@gmail.com?写道:
Look?at?the?sample?in?the?problem:
9?6?3
5?9?6
3?5?9
Like in qualification round for Problem C, we have to show
instead of 0, I did it in a ugly way, change int to string type and
then add '0' if num1000, add '00' if num100, add '000' if num10;
can anyone have a better way? BTW, do not use C-style output like
fprintf(ofp, Case #%d: %04d\n, t,
maybe they will check the sourcecode pairwisely to determine any cheating :)
On Sat, Sep 5, 2009 at 1:26 PM, Carlos Guia zyx3d...@gmail.com wrote:
I guess anything that is against the rules is considered cheating
Carlos Guía
On Fri, Sep 4, 2009 at 11:14 PM, Dhruva Sagar
Technically it should eat as much whitespace as it can (including
spaces on the next line). As I recall, space and newline are not
differentiated and putting either into the scanf format simply
signifies ignore whitespace
On Sep 4, 2009, at 10:46 PM, Carlos Guia zyx3d...@gmail.com wrote:
IMHO, getline in C++ is not that clean. Please have a look at this:
#include iostream
using namespace std;
int main()
{
int i;
string s;
cin i;
getline(cin, s);
cout i endl;
cout s endl;
return 0;
}
With this input:
1
Hello
What output will you expect?
getline() is delimited by '\n', so there is no ambiguos.
2009/9/5 周 游弋 zhou.yo...@gmail.com
IMHO, getline in C++ is not that clean. Please have a look at this:
#include iostream
using namespace std;
int main()
{
int i;
string s;
cin i;
getline(cin, s);
cout
lol :D
Thanks Regards,
Dhruva Sagar.
Mike Ditka http://www.brainyquote.com/quotes/authors/m/mike_ditka.html -
If God had wanted man to play soccer, he wouldn't have given us arms.
On Sat, Sep 5, 2009 at 11:56 AM, Hawston LLH haws...@gmail.com wrote:
maybe they will check the sourcecode
There's a book called Programming Challenges, it should be a nice
place to start from.
You can find it's PDF free somewhere online, that's where Google comes
to serve =)
On Sep 5, 9:59 am, CodeJunky pure.vintage@gmail.com wrote:
thanks buddy!!
im actually new in coding arena
maybe you can read more on dynamic programming first, it is about how to
divide the problem into smaller piece of elements recursively.
simple example - write a factorial function N!
int factorial(int N)
{
//bounday or stopping condition
if (N=1)
return 1;
//here, try to process 1 step
Personally speaking i did %1000 instead %1! And this kind of error
has come out only in the large input! ;)
On Fri, Sep 4, 2009 at 10:59 PM, Beybaltc...@gmail.com 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
IO manipulators are your friends (include iomanip):
cout Case # i+1 : setfill('0') setw(4) res
endl;
On Sep 5, 8:24 am, MagicLi musicl...@gmail.com wrote:
Like in qualification round for Problem C, we have to show
instead of 0, I did it in a ugly way, change int to string type
Also Group C get to practice on the problems from the 1st subround,
and losers from B get to practice on the problems from the 2nd
subround.
On Sat, Sep 5, 2009 at 6:50 AM, Hawston LLHhaws...@gmail.com wrote:
Is there any different about the choice of picking which two subrounds? I
think it
If you are checking each word against a regex that you make from the
input, you can make a big speed up by surrounding the regex with ^
and $. Here is my program in AWK:
(NR == 1){numWords = $2}
((NR = 2) (NR = (1+numWords))){words[$1] = 1}
(NR (1+numWords)){
gsub(/\(/,[);
gsub(/\)/,]);
$1=^
In the competition like Google Code Jam the language is just a tool to
implement your algorithms and ideas of solving the problem. So you
should select the tool you are most comfortable with. The main job for
the participant is to come up with a correct and efficient algorithm
for solving the
I am also new to this programming contest and after Qualification round,
I strongly believe that
people grow the most when they enter the Zone of the Unknown.
So, its the best opportunity for coders like me, who are used to live
in small coding world to get real exposure...
Hope to be a good
Jason, I did the same as you but using a bitmask instead of an
aditional [26] array. But the speedup of about a factor of 26 wasn't
an issue here.
Ken, I have several years of experience in C++ and so I'm not thinking
in switching. I also have a few years of experience in Java but never
used the
I expect 1 followed by an empty line. It may be tricky the first time,
but once you understand how it works you know about it, it is not
really ambiguous.
On Sep 5, 2:45 am, 周 游弋 zhou.yo...@gmail.com wrote:
IMHO, getline in C++ is not that clean. Please have a look at this:
#include iostream
I completely ignored the existence of regexes when solving it. It just
seemed logical to just use bitmasks. I was surprised to see so many
people using regexes later.
A good C/C++ can use sscanf to the same effect as the regexes
solutions. Though sscanf is a lost art that not a lot of people
Thank you carlos for the useful site.. I will sure register in
topcoder site,
On Sep 5, 11:07 am, Carlos Guia zyx3d...@gmail.com wrote:
I'm sorry to hear that, but keep track of the contest and use the problems
to practice.
I guess the next Google Code Jam at the very least is about in a
That is very good. Thanks a lot! I appreciate!
On Sep 5, 4:14 am, krzych krzychoo...@gmail.com wrote:
IO manipulators are your friends (include iomanip):
cout Case # i+1 : setfill('0') setw(4) res
endl;
On Sep 5, 8:24 am, MagicLi musicl...@gmail.com wrote:
Like in
you can also use printf(Case #%d: %04d\n,i++,value);
maybe you like to use the functions from C++, but printf is faster than
cout.. and, in this case, is a little bit easier to code.
2009/9/5 MagicLi musicl...@gmail.com
That is very good. Thanks a lot! I appreciate!
On Sep 5, 4:14 am,
gustavo pacianotto gouveia wrote:
you can also use printf(Case #%d: %04d\n,i++,value);
maybe you like to use the functions from C++, but printf is faster
than cout.. and, in this case, is a little bit easier to code.
printf is faster but no safer
every IO is slow by definition, so no reason
I looked into the http://www.go-hero.net/jam/09/solutions/0/1/Perl
site to list all the solutions for Alien Language, solved by Perl.
But, it only lists 100 coders. Does it list first 100, or efficient
codes, or any error in this site?
I solved the first problem in perl, and got 33, and my rank
How can I know how many contestants there will be in each sub-round?
--~--~-~--~~~---~--~~
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
I am a Ruby coder myself.self taught.you can also learn from
www.rubylearning.com
On Wed, Sep 2, 2009 at 2:20 PM, Rishabh Sonthalia rishabh...@gmail.comwrote:
Ruby is it something that u all learnt on ur own, or was it thaught 2 u?
if thaught, where can we learn it from?
Thanks!
Just wondering, how did you arrive at the solution? In hindsight it
seems obvious, but I must admit I did not think of it during the
competition :-) Certainly I don't see a way to think of it in 10
minutes or so.
So I wonder if similar algorithms have come up in other programming
Dude that factorial example is not DP!!!
On Sep 5, 12:43 am, Hawston LLH haws...@gmail.com wrote:
maybe you can read more on dynamic programming first, it is about how to
divide the problem into smaller piece of elements recursively.
simple example - write a factorial function N!
int
no, your opinion is wrong. they picked whoever got 33 or more and
didn't cheat.
On Sep 4, 7:13 pm, Kishore Reddy enigma2006.kish...@gmail.com wrote:
Its obvious that with the same 33 points I got 6000+ rank and some guy
got 7830+ rank means they considered the time, number of penalties,
etc.,
Could anyone please tell, when we will get final mail of clearing the
qualifying round..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
google-codejam group.
To post to this group, send email to
I used fgets of C, but I forgot to trim the newline(\n) of each input line
It is so tricky that my output for small input is correct
On Fri, Sep 4, 2009 at 4:59 PM, Bey baltc...@gmail.com wrote:
Hi
I noticed that there are a large number of people who go the small
input correct for
This was my first programming competition and I am only learning some
of the algorithms by and by.
I've looked at some of the submitted solutions and then tried to
figure out the logic behind them.
Since the solutions from the top contestants usually don't explain
much, I wonder if it would be
actually you can download the correct source code of other contestants
from the scoreboard. After running the programm, it's easy get the
correct output.
On 9月5日, 上午5时18分, manish manish...@gmail.com wrote:
Can anyone give me the correct output of this question for large test
cases. Thanks in
You advanced if you got at least 33 points and didn't cheat. We'll send the
official announcement, as well as an email about round assignments, some
time in the next few days.
On Sat, Sep 5, 2009 at 5:33 AM, gun gunjan.m...@gmail.com wrote:
Could anyone please tell, when we will get final
Search for Dynamic Programming (DP) and his close cousin memoization (not a
typo).
A very high percent of programming contests have at least one DP problem, so
getting familiar with it will certainly help you improve in this type of
competitions.
You can check the tutorials at
I prefer %[^\n]s%*c to eat the newline (* signifies that there is no
variable to capture the character into).
On Sep 4, 11:46 pm, Carlos Guia zyx3d...@gmail.com wrote:
I'm not a 100% sure, so who likes this will have to test it before a real
contest, but I think you can eat the '\n' like this:
I thought that.
On Sat, Sep 5, 2009 at 5:13 PM, itissiditis...@gmail.com wrote:
Dude that factorial example is not DP!!!
On Sep 5, 12:43 am, Hawston LLH haws...@gmail.com wrote:
maybe you can read more on dynamic programming first, it is about how to
divide the problem into smaller piece
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
Under what name did you submit your code?
On Sat, Sep 5, 2009 at 5:22 AM, togguillaume.all...@gmail.com 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) ...
Java is the 2nd most popular language. There are candidates who find
it much harder to find peers who used the same language.
On Sat, Sep 5, 2009 at 7:33 PM, Bartholomew Furrowfur...@gmail.com wrote:
http://www.go-hero.net/jam/09/solutions
http://www.go-hero.net/jam/09/regions
The latter
ACRush. did. Not ACRush, ACRush..
On Sat, Sep 5, 2009 at 2:48 PM, Luke Pebody luke.peb...@gmail.com wrote:
Did anyone answer more than one large problem set but no small problem
sets?
On Sat, Sep 5, 2009 at 7:39 PM, Bartholomew Furrowfur...@gmail.com
wrote:
Once again: if you have at
Kudos to these guys who prepared these qualification round problem.
Credits
Problem A. Alien Language Written by Junbin Teng. Prepared by Marius
Andrei.
Problem B. Watersheds Written by Andrew Gove. Prepared by Xiaomin Chen
and Igor Naverniouk.
Problem C. Welcome to Code Jam Written by Xiaomin
CLRS is the definitive book but its prettty pretty big and intimidating. I
have it before me and dozing off ;)
On Sat, Sep 5, 2009 at 3:42 PM, SB santosh.bhus...@gmail.com wrote:
Kudos to these guys who prepared these qualification round problem.
Credits
Problem A. Alien Language Written
@rahul
go for programming challenges..by skienna(sponger verlag)
On Sep 6, 12:26 am, Matteo Landi landima...@gmail.com wrote:
Why you said that?
Recursion is part of dynamic programming (top down approach), am i wrong?
On Sat, Sep 5, 2009 at 6:13 PM, itissiditis...@gmail.com wrote:
Dude
hi i am very new to coding first of all i want to know the solution of
the first problem how you people decide the size array you take
initially means some take [5000] [17],and kindly explain me in detail
and second that what should i do to improve my coding skill means so
that i can solve
44 matches
Mail list logo