Probably I am not using sync_with_stdio properly... I ran a program which reads a 125 MB file, with cin and with sync and without sync... They both read the file in 20 secs... (Where as the Fast IO read within 4 secs... )
Could you anyone help me understand the importance of sync_with_stdio? I did google, most of the pages say, this would stop syncing with c style streams (stdin, stdout, stderr). I dont understand what exactly that means.. :( On Tue, Dec 25, 2012 at 11:55 AM, ZHANG Xiongqi, Parker < [email protected]> wrote: > Simply cin and cout, but without sync with stdio > > Parker > > > On 2012/12/24 13:47, thefourtheye dIVi wrote: > >> Hi Parker, >> >> Are you using just scanf and printf? >> >> >> On Sun, Dec 23, 2012 at 11:52 AM, thefourtheye dIVi < >> [email protected] >> <mailto:thechargingvolcano@**gmail.com<[email protected]>>> >> wrote: >> >> Ya Parker... Thanks a lot... I just got AC in both of them... But >> trying to improve performance... I ll try without FastIO... Spent >> two days writing and debugging the FastIO class... :( >> >> >> On Sun, Dec 23, 2012 at 11:36 AM, ZHANG Xiongqi, Parker >> <[email protected] <mailto:[email protected]**>> wrote: >> >> Hey, you forgot to clear Weight[i] for different test case >> before pushing new edges for new cities ! ! >> >> :) >> >> and FastIO is not needed. >> >> Parker >> >> >> On 2012/12/23 11:25, thefourtheye dIVi wrote: >> >> Hi, >> >> I think this is one of the simple problems which would >> have got a lot TLEs. >> >> This is what I do, http://ideone.com/7XE0UU My actual >> starts at Line 228. >> >> It TLE's in >> https://www.spoj.com/problems/**SHPATH/<https://www.spoj.com/problems/SHPATH/>whereas >> it WA's in >> http://www.spoj.com/problems/**TSHPATH/<http://www.spoj.com/problems/TSHPATH/>(which >> is >> same as the SHPATH problem with 60 sec Time limit) >> >> Could anyone please help me with this? >> -- You received this message because you are >> subscribed to >> the Google Groups "Google Code Jam" group. >> To post to this group, send email to >> [email protected] >> >> <mailto:google-code@**googlegroups.com<[email protected]> >> >. >> >> To unsubscribe from this group, send email to >> >> google-code+unsubscribe@**googlegroups.com<google-code%[email protected]> >> >> <mailto:google-code%**[email protected]<google-code%[email protected]> >> **>. >> >> For more options, visit >> >> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >> . >> >> >> >> -- You received this message because you are subscribed >> to the >> Google Groups "Google Code Jam" group. >> To post to this group, send email to >> [email protected] >> <mailto:google-code@**googlegroups.com<[email protected]> >> >. >> >> To unsubscribe from this group, send email to >> >> google-code+unsubscribe@**googlegroups.com<google-code%[email protected]> >> >> <mailto:google-code%**[email protected]<google-code%[email protected]> >> **>. >> >> For more options, visit https://groups.google.com/** >> groups/opt_out <https://groups.google.com/groups/opt_out>. >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Code Jam" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to google-code+unsubscribe@** >> googlegroups.com <google-code%[email protected]>. >> For more options, visit >> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >> . >> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to google-code+unsubscribe@** > googlegroups.com <google-code%[email protected]>. > For more options, visit > https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> > . > > > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" 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 https://groups.google.com/groups/opt_out.
