A while ago the GNU G++ 11.2.0 (64 bit, winlibs) option was added to Codeforces to facilitate the use of C++20 on the platform. However, C++20 support is still being worked on and over the past year many features have been added. It would be nice to upgrade the GCC compiler to 12.2.0, which is also available via winlibs. There is also a "Clang++20 Diagnostics" option. Which version of clang does it use?
Neither compiler seems to support #include <ranges>
currently, which includes functions such as std::views::iota
. Also, the GCC compiler does not have support for constexpr std::string
and constexpr std::vector
(and this is probably also the case for the clang compiler, although I haven't tested it).
ranges
work for me just fine. See 195071427.constexpr string and vector don't, though.
Oh yeah you're correct, it works on GCC. Doesn't work on Clang though: https://mirror.codeforces.com/contest/26/submission/194861105