P
peter_k
Hi,
Last time i'm interested in optimizing small c programs. On my studies
we are sending the programs using the web interface to online judge.
The person who will wrote the faster program get the bonus score. This
are usually simple problems, like sorting small numbers, parsing the
text and checking something etc... To get the bonus the good algorithm
is not everything, you have to do a lot of optimizations on c level (or
asembler sometimes). Ok..., so usually my programs are very fast, but
"the best" students are sendings programs few seconds/miliseconds
faster. Because i like optimizing sometimes i'm spending 1-2 days
coding. But nearly everytime i'm touching the run-time, which i cannot
beat, even i'll code few days more And i'm interested how faster
code can look, i want to learn something
Can anyone send me some example sources + problem content of very
optimized sources? I mean small programs (1 file) in c language, text
mode, parameters given in standard input, return in standard output...
Of course i'll send sources of my "optimized" applications. Please use
my email (in header of the message).
For example the one of optimization is using read() instead of scanf(),
and "parsing the number" using own code...
Greets&Thanks,
Peter_K
Last time i'm interested in optimizing small c programs. On my studies
we are sending the programs using the web interface to online judge.
The person who will wrote the faster program get the bonus score. This
are usually simple problems, like sorting small numbers, parsing the
text and checking something etc... To get the bonus the good algorithm
is not everything, you have to do a lot of optimizations on c level (or
asembler sometimes). Ok..., so usually my programs are very fast, but
"the best" students are sendings programs few seconds/miliseconds
faster. Because i like optimizing sometimes i'm spending 1-2 days
coding. But nearly everytime i'm touching the run-time, which i cannot
beat, even i'll code few days more And i'm interested how faster
code can look, i want to learn something
Can anyone send me some example sources + problem content of very
optimized sources? I mean small programs (1 file) in c language, text
mode, parameters given in standard input, return in standard output...
Of course i'll send sources of my "optimized" applications. Please use
my email (in header of the message).
For example the one of optimization is using read() instead of scanf(),
and "parsing the number" using own code...
Greets&Thanks,
Peter_K