Would you mind sharing your code?

And I assume you know the consequence of using those fastIO tricks.

> ios_base::sync_with_stdio(false);

This means you can no longer mix scanf/cin or printf/cout

> cin.tie(NULL);

This means cout (or any other stream) will NOT be flushed before you read any 
data from cin.


I highly discourage using any fast I/O trick in interaction problem because the 
data your program is not a static file but generated using your output.
Any fast I/O trick that put cin/cout un-synced would cause unexpected result. 


> Golf Gophers was an interactive problem that was asked recently in CodeJam 
> Round A.
> 
> I used fast IO during the contest but I was getting TLE verdict because i was 
> using :
> 
> ios_base::sync_with_stdio(false);cin.tie(NULL);
> 
> After the contest, when I tried to run it without the above line of code it 
> passed. 
> 
> Now this line of code is being used by C++ programmers for ages for fast IO 
> but for some reason it didn't work during the contest.
> 
> Can we not use fast io in interactive problems or is this a bug in compiler?

-- 
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/7d594e14-8346-4eff-8e71-69f52a7a52c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to