Always use scanf() and printf(). They are much, much faster than cin and cout. Also use stl algorithms, like sort, reverse and find, especialy if they are member functions of a container class you use.
brahle
0
Newbie Poster
Recommended Answers
Jump to Post>Always use scanf() and printf().
Dangerous overgeneralization.>They are much, much faster than cin and cout.
Uninformed generalization.>Also use stl algorithms, like sort, reverse and find, especialy
>if they are member functions of a container class you use.
This is actually good advice, though I would have …
Jump to PostAnd, btw, have you heard for a coder SnapDragon? He's such a good competitior that he recently stared in the film 'Rent'.
This is out of C/C++. But do you mean the Musical called Rent? Starring Mark Cohen?
Jump to PostAnd I know everything isn't in competitions, but at my age, it certainly is. And, btw, have you heard for a coder SnapDragon? He's such a good competitior that he recently stared in the film 'Rent'.
Jump to PostThere are three things you must do when you write a solution to a problem:
1. write an algotihm by hand on the paperBTW, I don't think the English word 'must' means what you think it means.
Jump to Post>I will agree that when writing c++ program use c++ stream classes and not resort to C.
But we all knew that. It's just that Brahle didn't.
And his justification for using printf was rather poor. Coding competitions, he said. Pfft, where apparently the code is judged on …
All 45 Replies
Narue
5,707
Bad Cop
Team Colleague
brahle
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
brahle
0
Newbie Poster
SpS
commented:
dumb
+0
Narue
5,707
Bad Cop
Team Colleague
brahle
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
brahle
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
iamthwee
Narue
5,707
Bad Cop
Team Colleague
brahle
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
iamthwee
jwenting
1,889
duckman
Team Colleague
Toba
99
Junior Poster
Rashakil Fol
978
Super Senior Demiposter
Team Colleague
jwenting
1,889
duckman
Team Colleague
Rashakil Fol
978
Super Senior Demiposter
Team Colleague
Toba
99
Junior Poster
brahle
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
brahle
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
brahle
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
WolfPack
491
Posting Virtuoso
Team Colleague
iamthwee
Rashakil Fol
978
Super Senior Demiposter
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.