did codeforces just remove c++11 from the compile languages
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | turmax | 3559 |
| 6 | tourist | 3541 |
| 7 | strapple | 3515 |
| 8 | ksun48 | 3461 |
| 9 | dXqwq | 3436 |
| 10 | Otomachi_Una | 3413 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | adamant | 153 |
| 3 | Um_nik | 147 |
| 4 | Proof_by_QED | 146 |
| 5 | Dominater069 | 145 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
| Название |
|---|



Yes. We cannot submit codes in C++11. We could only submit C++14 or higher versions of C++.
Topcoder disagree
inb4 usaco removes c++11
It's a interesting thing that China Computer Federation don't let competitors use c++11 as well.
They only let us use c++98 :(
Sad, Codeforces has removed C++11 but CCF still only let us use C++98 :(
(In 2077.)
CCF: We can use C++14!!!
Fun fact: In NOI Linux 1.4.1, which is still in use in NOI 2021, the gcc version is 4.8.4, which does not even fully support C++14 features.
Now that the GCC version has been updated to 9.3.0, let's pray that the CCF will allow the use of C++17 in future contests XD
98 > 11
deleted
Me who revised 4 times to see what the comment is
Good.
I hope they add C++20 with GCC 11.2. There are many useful features there.
I only know of three-way comparision operator, default == operator and initializer in for-each loop. Kindly let us know if you know anything more that will be useful in CP.
Concepts, templated lambdas,
std::ranges,std::span, andstd::formatsound like pretty useful features.std::midpointwill do away with a lot of midpoint related overflow/underflow issues, which is a good thing too.There's also a prefix and suffix comparison on strings, which will reduce the amount of code written for brute force string problems. Also, for containers like
std::mapandstd::set, you will be able to check if an element exists using something likeif (a.contains(element)), which would be better than the much more dangerousif (a.count(element))which blows up to $$$O(frequency)$$$ for multisets.For some (warning: very rare) constant-factor optimization,
[[likely]]and[[unlikely]]attributes would be a compiler-agnostic feature (no more using GCC's __builtin_expect anymore, so yay). Also as someone told me yesterday, C++20's[[no_unique_address]]can be useful for optimizing away empty structs.My use-case was making an optionally lazy sparse persistent segment tree, and I was aiming to have the least memory usage possible, but to my dismay empty structs inside structs had a size of 1 byte, which when combined with padding gives an effective extra size of 8 bytes, and I had to do code duplication with some constexpr tricks for reducing memory usage.
Also everything in the
<bit>header, no more ugly intrinsics.I've been using c++11 just because I already had it installed on my computer. Any recommendations on whether to upgrade to 14, 17, or directly to 20?
I would say C++17, it's a bit premature to upgrade to 20
HackerRank.com has already included C++20 among its compiler options in the C++ practice problems section. Perhaps it is time for the Codeforces team to consider installing C++20.
I am glad to use C++20 with GCC 11.2 here.