Title |
User |
Message |
Date Posted |
New case |
hansonw1 |
K ≤ 2,147,483,647 now. Use dynamic programming! |
Mar 04, 2009 - 3:51:21 am UTC |
Re: Re: Re: Re: Re: Re: Re: Re: What does this mea |
DrSane |
strtol/strtoul? |
Mar 04, 2009 - 3:12:29 am UTC |
Re: Re: Re: Re: Re: Re: Re: What does this mean? |
SourSpinach |
If you don't wanna use sprintf (which is a bit complicated but does stuff for you), you just gotta code your own version of itoa. It's not too hard, just a loop. |
Mar 03, 2009 - 7:32:03 pm UTC |
Re: Re: Re: Re: Re: Re: What does this mean? |
purohit3105 |
I don't get that. What do I do with sprintf? How does it work? What do I use if I want to output the binary digits in a char array like I have done in my original solution that doesn't work on judge? |
Mar 03, 2009 - 4:16:37 am UTC |
Re: Re: Re: Re: Re: What does this mean? |
bbi5291 |
No, but see this link for instructions on how to use sprintf instead of itoa. |
Mar 03, 2009 - 3:20:32 am UTC |
Re: Re: Re: Re: What does this mean? |
purohit3105 |
Why? Is that gonna make itoa() work?? |
Mar 03, 2009 - 1:57:46 am UTC |
Re: Re: Re: What does this mean? |
bbi5291 |
You may consider using sscanf and sprintf as alternatives, or the istringstream and ostringstream classes in the header. |
Mar 03, 2009 - 1:55:08 am UTC |
Re: Re: What does this mean? |
purohit3105 |
NNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOO~!!!!!!!!!!!!!!!!!!!!!! Thanks Though! :( |
Mar 03, 2009 - 1:52:00 am UTC |
Re: What does this mean? |
hansonw1 |
itoa isn't standard, and thus doesn't exist in g++. Sorry :( |
Mar 03, 2009 - 1:51:25 am UTC |
Re: Re: What does this mean? |
purohit3105 |
Result of the compile: : In function 'int main()': :21: error: 'itoa' was not declared in this scope Compile Failed It still fails... |
Mar 03, 2009 - 1:50:19 am UTC |