I am using Turbo C++ Version 3.0 on Windows 7(32bit). Still i got the
problems in case of large output every time i compile the program. In case
of this output, I compared with your one and found that the problem occurs
in case of large no.s such as of Case 3, Case 5, Case 6 etc.

What should I do to remove such type of errors?

On Tue, May 25, 2010 at 6:13 AM, Carlos Guia <[email protected]> wrote:

>
> I uploaded both small and large output files I get using your code, with a
> minimal modification, I had to change the includes.
>
> You had
>
>> #include<stdio.h>
>
> #include<conio.h>
>
> #include<process.h>
>
> #include<fstream.h>
>
>
> I changed it to
>
>> #include<stdio.h>
>
> #include<conio.h>
>
> #include<process.h>
>
> #include<fstream>
>
> using namespace std;
>
>
>
> That shouldn't change the outcome since you didn't even use any class from
> fstream in this code, but with your includes I had compilation errors
> thrown. I believe <fstream.h> is deprecated, and you shouldn't add ".h" for
> c++ STL headers. I tried to find a source stating that, the closest is this,
> from http://www.sgi.com/tech/stl/Vector.html, if you go to "Definition" it
> reads.
>
> Defined in the standard header vector <http://www.sgi.com/tech/stl/vector>,
>> and in the nonstandard backward-compatibility header 
>> vector.h<http://www.sgi.com/tech/stl/vector.h>
>
>
> So those STL ".h" files are some old nonstandard files, I would try to keep
> myself away from them if possible.
>
> I didn't upload them to GCJ practice room, but I "compared"(quick
> look) them with mine and both seem correct. Moreover, I think the code is
> correct.
>
> In order to be a little bit more helpful in avoiding such issues in the
> future I need to know a few things.
> - What compiler (name and version) are you using?
> - What operating system (most importantly 32 or 64 bit system)? Or even if
> it is 16 bit? I hope not.
>
> Hope it helps,
> Carlos Guía
>
>
>
> On Mon, May 24, 2010 at 6:18 PM, Amitesh Purwar <
> [email protected]> wrote:
>
>> Thank you for response.
>>
>> But I would like to tell you that the same problem occurs in my code when
>> i execute problem B of the qualification round. Could you please attached
>> the output of my code which comes in your system.
>>
>> On Tue, May 25, 2010 at 3:10 AM, Carlos Guia <[email protected]> wrote:
>>
>>> In my computer it has no difference, thought it may in some systems, but
>>> the standard format for "long int" is "%ld". In my computer long and int are
>>> both 32 bits long so there's no difference, maybe on a 64-bit system long is
>>> 64 bits long and there is. Other than that I don't see how that code could
>>> give negative results, unless c is overflowing, but seems unlikely.
>>>
>>> Carlos Guía
>>>
>>>
>>> On Sun, May 23, 2010 at 7:57 AM, Amitesh Purwar <
>>> [email protected]> wrote:
>>>
>>>> Hello,
>>>>         I am a newbie in the programming contest. I was looking through
>>>> the xdliutao(rank 4) code and i found that it gives the same output as my
>>>> code. The output does contain some negative values which result in
>>>> cancellation of my code. Do you guys suggest me....that is there a problem
>>>> exists in my code or my machine?
>>>>
>>>> and this is not the first time for me that my code outputs garbage
>>>> value.:)
>>>>
>>>> --
>>>> Thanks & Regards,
>>>>
>>>> Amitesh Purwar.
>>>>
>>>> Twitter : http://bit.ly/jQfDo
>>>> facebook : http://bit.ly/xIlCn
>>>>
>>>> Contact No. :- +91-9718418621
>>>>
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "google-codejam" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected]<google-code%[email protected]>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-code?hl=en.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "google-codejam" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected]<google-code%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-code?hl=en.
>>>
>>
>>
>>
>> --
>> Thanks & Regards,
>>
>> Amitesh Purwar.
>>
>> "Accept the Challenges to feel the exhilaration of Victory."
>>
>>
>> Twitter : http://bit.ly/jQfDo
>> facebook : http://bit.ly/xIlCn
>> orkut : http://bit.ly/RXG6e
>> linkedin : http://bit.ly/YbfZZ
>>
>>
>> Contact No. :- +91-9718418621
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "google-codejam" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<google-code%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-code?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "google-codejam" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-code%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-code?hl=en.
>



-- 
Thanks & Regards,

Amitesh Purwar.

"Accept the Challenges to feel the exhilaration of Victory."

Twitter : http://bit.ly/jQfDo
facebook : http://bit.ly/xIlCn
orkut : http://bit.ly/RXG6e
linkedin : http://bit.ly/YbfZZ

Contact No. :- +91-9718418621

-- 
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en.

Reply via email to