That is very good. Thanks a lot! I appreciate!
On Sep 5, 4:14 am, krzych wrote:
> IO manipulators are your friends (include iomanip):
>
> cout << "Case #" << i+1 << ": " << setfill('0') << setw(4) << res <<
> en
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 num<1000, add '00' if num<100, add '000' if num<10;
can anyone have a better way? BTW, do not use C-style output like
fprintf(ofp, "Case #%d: %04d\n",
gt;
> >> Pablo
> >> Picasso<http://www.brainyquote.com/quotes/authors/p/pablo_picasso.html> -
> >> "Computers are useless. They can only give you answers."
>
> >> On Fri, Sep 4, 2009 at 6:55 AM, MagicLi wrote:
>
> >>> I fini
I finish problem A&B, for problem C, I finish the small input, my
program fail the large input. I think there is better algorithm to
work it out.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"google-codejam" group
long long
> - VC++ type: __int64
>
> If you simply want to reach 2^32-1 and don't need negative numbers
> you may simply use the data type "unsigned long" which goes from 0 to
> 2^32-1.
>
> I hope it helps.
>
> João Alves
>
> On Sep 2, 4:36 pm, MagicLi
C++ in Windows, both int and long type are 4bytes, that means the
biggest number can store is 2^31-1=2,147,483,647 , you may say the
unsigned int could be larger, yes, but only twice lager, still under
10^10; for question like Round 1 B, B. Number Sets, the large input :
1 <= A <= B <= 10^12, 10
hi,
I have joined google code jam 2009 contest. I'd like to talk to
friends who are also interested in this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"google-codejam" group.
To post to this group, send email