My knowledge of C++ isn't exactly at expert level, but:

1) In the line int n = (X/C) - (CPS/F); are you getting the rounding
behaviour that you're expecting?
2) Have you tried defining CPS as the floating point value 2.0f instead of
the integer value 2?
3) It's also strange that you're writing differently to cout and to
outfile, but I'm sure you would have realised if that was you're problem
(Most people I think use cout for the output, and use shell redirection to
redirect stdout to a file when submitting.  Your debug output can go to
cerr instead.

Paul Smith

[email protected]


On Tue, Apr 15, 2014 at 11:39 PM, Cristi Mihai <[email protected]>wrote:

> If you're still dying to find out what tests you failed, I would download
> someone else's implementation and run it through the test case, and then
> run yours, and do a diff / text compare on the 2 outputs and you'll see
> which one you failed.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/4c8c581e-44e7-4771-9719-dc1a5fba8fde%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAJej63%2Btok0F%2BpiRuH2bV0U%3Di3uA%2B%2B0ybdYRSnEkgv26fCtbcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to