Тест на знание C++
Русский
Advanced
А вы всё знаете о C++? Уверены? Тогда этот тест именно для вас!
Description
C++, C, С++, С, Cpp, Си++, Си, Информатика, Программирование, Программа, Программы, Кодинг, Код, Коды, Компьютер, Язык программирования, Языки программирования
Tags
32
Questions
30 sec
Per question
5:03
Average time
4.0
Contest Score
4.0
Community Rating
13
Participants
Educational explanations. 👍 Explanations cover why the correct answers are correct and why the
wrong answers are wrong. E.g.: #q1, #q2, #q5, etc.
https://en.cppreference.com/w/cpp/container/vector/erase
Это вправе за имплементацией реаллоцировать вектор при удалении элементов
https://stackoverflow.com/questions/50599555/does-vectorerase-reduce-vectorcapacity
the assignment operator of T is called the number of times equal to the number of elements in the vector after the erased elements.
Насколько я понимаю, это возможно только, если именно сдвигаются элементы, а не реаллоцируется вектор.