Re: [gcj] Re: Difference betwen Small and Large inputs

2010-04-17 Thread Bartholomew Furrow
In 2009 there were no problems that required bigint. There were questions that required 64-bit integers, such as http://code.google.com/codejam/contest/dashboard?c=189252#s=p0. As for using a mainframe: you're welcome to do that if you like. The problems are designed with the intention that even

Re: [gcj] Re: Difference betwen Small and Large inputs

2010-04-17 Thread Atanas Banov
I beg to differ - I've been practicing the problems from '09 and i haven't seen a problem that requires 64bit int instead of 32bit one. Sometimes you may need "bignum"s but I doubt very much that being able to hold 19 decimal digits (long long) vs 9 digits (long) will make a difference for the cont

Re: [gcj] Re: Difference betwen Small and Large inputs

2010-04-17 Thread ayman bs
In contest, some problems will produce Timed out message with large input, so I don't advise you to go with this assumption :D On Sat, Apr 17, 2010 at 7:32 PM, Gustavo Pacianotto Gouveia < gustavo.paciano...@gmail.com> wrote: > for google servers, all algorithms are O(1) > > 2010/4/17 Jacob Lyles

Re: [gcj] Re: Difference betwen Small and Large inputs

2010-04-17 Thread Gustavo Pacianotto Gouveia
for google servers, all algorithms are O(1) 2010/4/17 Jacob Lyles > I'm not sure what the rules are, but software is usually far more important > than hardware when it comes to algorithm running times: > > http://en.wikipedia.org/wiki/Analysis_of_algorithms#Run-time_analysis > > There are some c

Re: [gcj] Re: Difference betwen Small and Large inputs

2010-04-17 Thread Jacob Lyles
I'm not sure what the rules are, but software is usually far more important than hardware when it comes to algorithm running times: http://en.wikipedia.org/wiki/Analysis_of_algorithms#Run-time_analysis There are some cases where an efficient algorithm will run in a few seconds on a standard lapto

Re: [gcj] Re: Difference betwen Small and Large inputs

2010-04-16 Thread Moh Ghooo
i am using "long long" on my 32-bit machine to work with 64 bit numbers but if ur number is greater than 64 bit number u can use "bigint", there is lots of good topics about it just google for "bigint" Regards Mohamed Sayed Ghoneim 016-86-56-215 On Fri, Apr 16, 2010 at 7:29 PM, tonka wrote: >

[gcj] Re: Difference betwen Small and Large inputs

2010-04-16 Thread tonka
is there any rule that says that one cannot use a mainframe computer to run the code? because in those computers you can use the code written for small dataset (which generally uses brute force) for large dataset and get outputs instantly? On Apr 16, 1:28 pm, Narasimha Datta wrote: > long int is

Re: [gcj] Re: Difference betwen Small and Large inputs

2010-04-16 Thread Narasimha Datta
long int is 32 bits only on a 32-bit system; it is 64 bits on a 64-bit system. - ND On Fri, Apr 16, 2010 at 1:39 AM, Felipe Sodré Silva wrote: > If you are using C/C++, long int is supposed to be 32-bit. If you want > 64-bit integer, you must use long long int. > > > On Thu, Apr 15, 2010 at 11:0

Re: [gcj] Re: Difference betwen Small and Large inputs

2010-04-15 Thread Qasim Zeeshan
Yes, absolutely correct. In the latest compilers of C++, the sizeof(long int) = sizeof(int). On Fri, Apr 16, 2010 at 1:09 AM, Felipe Sodré Silva wrote: > If you are using C/C++, long int is supposed to be 32-bit. If you want > 64-bit integer, you must use long long int. > > > On Thu, Apr 15, 2010

Re: [gcj] Re: Difference betwen Small and Large inputs

2010-04-15 Thread Felipe Sodré Silva
If you are using C/C++, long int is supposed to be 32-bit. If you want 64-bit integer, you must use long long int. On Thu, Apr 15, 2010 at 11:00 AM, tonka wrote: > i was working with the large input data but then i found out that the > long int datatype allocates 4 bytes of memory whereas it is

Re: [gcj] Re: Difference betwen Small and Large inputs

2010-04-15 Thread ayman bs
64bits ==> 8bytes Look here: http://en.wikipedia.org/wiki/Long_integer On Thu, Apr 15, 2010 at 8:00 PM, tonka wrote: > i was working with the large input data but then i found out that the > long int datatype allocates 4 bytes of memory whereas it is supposed > to be 64 bits. i am using vista 3

[gcj] Re: Difference betwen Small and Large inputs

2010-04-15 Thread tonka
i was working with the large input data but then i found out that the long int datatype allocates 4 bytes of memory whereas it is supposed to be 64 bits. i am using vista 32-bit OS. in case i want to use 64- bit integers then what OS and compiler should i use? otherwise is there a way to allocate m

[gcj] Re: Difference betwen Small and Large inputs

2010-04-15 Thread kirk79
Very true. I have tried many problems that work on small but fail on large, and when I replace all 32 bit integers with 64 bit integers the large file works. I now try to use long (64 bit integers) whenever there is a chance that they will be required. On Apr 15, 9:39 pm, Nitin Kumar wrote: >

[gcj] Re: Difference betwen Small and Large inputs

2010-04-15 Thread Nitin Kumar
Consider one more case... In case of small input... the result might contain small data amount!! bt.. in case of large input.. if you use the same data type to hold the result the data type is not able to hold the large result .. thus giving a wrong output!! Like.. if in small input we are asked t