Hello, Codeforces!
Together with Vladosiya, we've added support for the 64-bit g++14 C++23. You can find it under the name GNU G++23 14.2 (64 bit, winlibs)
.
If you're using Windows, you can easily install it via our minimalistic package manager, PBOX, by running the command pbox install gcc14-64-winlibs
.
Thanks to the WinLibs project! We used the distribution from this page: https://winlibs.com/ GCC 14.2.0 (with POSIX threads) + LLVM/Clang/LLD/LLDB 18.1.8 + MinGW-w64 12.0.0 UCRT - release 1, Win64
.
Your solutions will be compiled using the following command line: g++ -Wall -Wextra -Wconversion -static -DONLINE_JUDGE -Wl,--stack=268435456 -O2 -std=c++23 program.cpp
.
Now you can start using C++23 features!
Please note that support for GNU G++23 14.2 (64 bit, winlibs)
is currently experimental. We invite you to join in the testing and experimentation process. Share your thoughts and experiences in the comments!
It seems this distribution experiences performance degradation, which can lead to time limit exceeded
verdict in some cases. For now, we don't recommend using it in real contests.
Cool
clang diag when back
ha?
Finally the wait is over...[Hooray]
its perf is really bad, last contest's E1 gave 1800ms in +23, 1600ms in +20 and 1200ms in +17
That's great! Thanks a lot!
first comment hooray!!! attractors
I'd just tried to use new compiler in this submission 277680488, got TLE
but previously absolutely same solution 277680737 (1 char difference to be able to submit it again) gave me AC
MikeMirzayanov please pay attention on it
yeah and i get tle
Cant use print :(
You can refer to this.
Savior-of-Cross bro can finally rest after asking from last 5 months.
Oh finally!, it is amazing, thanks a lot!!!
Thank you.
std::format will be very useful to make many output statements cleaner for those not using printf style format strings.
Before:
std::cout << a << " + " << b << " = " << a+b << '\n';
After:
std::cout << std::format("{} + {} = {}\n", a, b, a+b);
Quick benchmarking got really weird: an $$$\mathcal{O}(n \log^2{n})$$$ code on 1991C - Absolute Zero used like double runtime in C++23 compared to C++20:
Was it a bug, or was it intended that way...?
Extra: trying to use
set
in that approach yielded 1500ms for C++20 (TL=2s), and instant TLE for C++23.Extra #2: The runtime difference is seven-fold for $$$\mathcal{O}(n \log{n})$$$ ? [more precisely, $$$\mathcal{O}(n \log{\left( \max{a_i} - \min{a_i} \right)})$$$ ]
As of now, C++23 is not in the best shape, but when GCC will finally implement it, it will go hard.
Mainly for competitive programming, a C++23 gold nugget is
std::print
.Finally clunky output with
std::cout
goes away in favor of elegant:"Oh, nice printing, cool" you might think, but it gets better:
std::cout
orprintf
(so maybe fast io hack won't be as used)Also additional cool things are
std::flat_set
andstd::flat_map
that are basically(very roughly speaking) more cache-friendly counterparts ofstd::set
andstd::map
. Will it be better thanstd::set
andstd::map
for competitive programming? Time will tell, right now they are not even implemented in GCC.Also there's
deducing this
which makes recursive lambdas not as weird (i am a certified lambda glazer, which means that deducing this is epic and cool)Summarizing, C++23 adds great features for competitive programming. In theory. In reality, GCC 14.2 doesn't implement most features that folks on codeforces would find interesting
Amazing! No more cout (=
Thank you very much for the effort put into making c++23 available!
Thanks a lot!!!!!