GCC 5.1 is too old and slow for today standard! I have encountered so many problem because of it
"qsort" implementation is slow:
"%lf" on printf is not working (scanf is worked), should be "%f" but that for float not double:
-
- comment: you can see on my WA submission that I just printing
2.0but output always0.0for unknown reason :(
- comment: you can see on my WA submission that I just printing
sscanf / sprintf is slow:
"%hhu" is not working (can't scan / print unsigned char number from stdin / to stdout directly):
-
- comment: compiler is too old for the
%hhufeature :(
- comment: compiler is too old for the
Calling printf frequently is slow in C but fast on C++:
-
- Comment from me: https://mirror.codeforces.com/blog/entry/152448?#comment-1356222
Conclusion: The old compiler has a lot of problem! Imagine using unoptimized gcc 5 on 2026 >,< Now there is gcc 15 which is 10 versions above. Why not upgrade the compiler? @MikeMirzayanov








What stops you from writing C code in C++?
we want to submit in the best language to us
C would run faster then C++ on it's compiler, but if we submit in C++ compiler, then they are of same speed(as I know)
g++ is optimized for c++ not c
First of all my background is not computer science, I'm from electronic and robotic student, so my primary language is pure C (without plus-plus), I never touches c++ because is was not necessary. I'm here because of my computer science friend and because of just curiosity (also want some brain work out) ;)
Second, C++ is not strict super-set of C, there are a lot of differences between it, see this Wiki for details: https://en.wikipedia.org/wiki/Compatibility_of_C_and_C++
Man, using C is kind of Flex at this stage I'd say!
You have my respect.
Thank you <3 but I'm not flexing, I'm using C because it is the only programming language I know (for now).