### Riaru_Covece's blog

By Riaru_Covece, history, 5 weeks ago,

Here is the link to my submission: link and here is the link to Tourist's submission: link

I am new to CF, or if there's a better way to ask my questions or if I am violating any rules please do let me know.

• +78

 » 5 weeks ago, # |   +9 add these 2 magic lines:ios::sync_with_stdio(false); cin.tie(0);
•  » » 5 weeks ago, # ^ |   +11 Okay, sorry I had never heard of these functions before. I tried to read about it here:linkMy understanding is that the ios::sync line is needed to synchronize the outputs when we use both cout of C++ and print() of C but I have only used C++ then why should I use that line?
•  » » » 5 weeks ago, # ^ |   +60 My understanding is that the ios::sync line is needed to synchronize the outputs when we use both cout of C++ and print() of C No, it's the opposite.By default, the C++ streams have some complicated and relatively time-expensive logic to make sure that if you mix printf-style and std::cout-style streams everything will still be read and printed in the correct order.However, if you're sure your program only uses cin and cout you can turn off this synchronization with ios::sync_with_stdio(false) and make input considerably faster.
 » 5 weeks ago, # |   +15 You said "identical" it's not.ios::sync_with_stdio(false); cin.tie(0);Also you need to be careful with "endl" too.
 » 5 weeks ago, # | ← Rev. 2 →   +40 He is new in cf. why some people are downvoting his post? I think we should appreciate him at the beginning and help him to find out his mistake.
•  » » 5 weeks ago, # ^ | ← Rev. 3 →   0 Downvotes can teach as well.When I opened my account I also shitposted and I got a lot of downvotes.I got very angry that day but now I understand why it was downvoted.
•  » » » 5 weeks ago, # ^ |   +9 the thing is, he isn't trash-posting...
»
5 weeks ago, # |
Rev. 2   0
Points to remember
•  » » 5 weeks ago, # ^ |   -22 or #define endl '\n' 
•  » » 5 weeks ago, # ^ |   +32 Lmao, agree with the first 2
•  » » 5 weeks ago, # ^ |   0 Just was curious about the last line. Why should we avoid endl?
•  » » » 5 weeks ago, # ^ |   +1 if you are using endl more than 1e4 time, then you should use "\n" instead , since endl is slower, as it also flush the output.
•  » » 5 weeks ago, # ^ |   -16 Never underestimate a specialist
•  » » » 5 weeks ago, # ^ |   +1 Unless you're Umnik
•  » » » 5 weeks ago, # ^ |   0 Stop flexing your new colour which you obtained by luck and isn't even worthy of any brag.
•  » » » » 5 weeks ago, # ^ |   -7 Cyan isn't my new color and I find no meaning in showing it off.What I have achieved so far in cf isn't even 10% of my potential and it didn't happen by luck.So shut your mouth up and do some work.I will become red very soon and brag that day.Till then keep hating me.
•  » » » » » 5 weeks ago, # ^ |   +2 You were confident of becoming expert in the contest after becoming specialist but you became newbie instead haha noob. Stop being cocky and so conceited of your worth ("specialist" after 80+ contests is no achievement and is in act wayyy below par for that many contests).
•  » » » » » » 5 weeks ago, # ^ |   +3 Do you know when a sportsman goes to next level??When some idiot in the crowd shouts and the sportsman doesn't give a fuckActually it is the first tip of emotional intelligence
•  » » 5 weeks ago, # ^ |   -9 Agree with the third
 » 5 weeks ago, # |   0 if input of a problem contains number <= 10^18, u should use ios::sync_with_stdio(false); cin.tie(0);. It will be much faster
•  » » 5 weeks ago, # ^ |   0 Got it, thanks!
•  » » 5 weeks ago, # ^ |   0 Why he got downvotes, I think there's nothing wrong.
•  » » » 5 weeks ago, # ^ |   0 maybe they're german and they downvoted because of my avatar .-.