did codeforces just remove c++11 from the compile languages
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | maomao90 | 163 |
2 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | nor | 153 |
9 | Dominater069 | 153 |
Название |
---|
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
But now, CCF let us use C++14.
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::format
sound like pretty useful features.std::midpoint
will 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::map
andstd::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.