Hello, Codeforces.
Please, welcome c++20 support on Codeforces. Yes, it is 64-bit. Thanks to Brecht Sanders: I used his distribution GCC-11.2.0-64 from https://winlibs.com/.
If you have installed PBOX, you can add this compiler with the line pbox install gcc11-64-winlibs
. Probably, a good idea is to add C:\Programs\gcc11-64-winlibs\bin
into the PATH. More about PBOX you can read here.
I use the compilation command line similar to other GCC installations: g++ -Wall -Wextra -Wconversion -static -DONLINE_JUDGE -Wl,--stack=268435456 -O2 -std=c++20 <source>
. The only differences are -std=c++20
and -Wall -Wextra -Wconversion
(I plan to use somehow such warnings in Polygon to suggest fixes in uploaded files).
Now you can use c++20 in your solutions. I'm not sure there are many features useful in competitive programming. Probably, I'm wrong. For example, now you can write vector v{vector{1, 2}};
instead of vector<vector<int>> v{vector<int>{1, 2}};
. What else is useful? Please, if you are good with modern C++ then write.
You might be interested in looking at such a table. Before implementation, I always test every C++ distribution for the efficiency of reading and writing large amounts of data. For example, the latest GCC compiler from MSYS2 is terribly slow in some cases. I don't want to use it here. Also, it happens that some specifiers like lld
or Lf
work unexpectedly. In the table by reference, the second line is the added compiler. The columns correspond to different tests. The cell contains the time of the test execution. If I have time, I will someday publish scripts for testing c++ compiler installations.
Bye for now,
— Mike