编程语言单选难度 3真题改编 · 2024
2455. 下面 C++ 代码的运行结果为()
#include <iostream>
#include <map>
int main() {
std::map<int, std::string> m = {{1, "one"}, {2, "two"}, {3, "three"}};
auto it = m.find(2);
m.erase(it);
for (const auto& pair : m) {
std::cout << pair.first << ": " << pair.second << " ";
}
std::cout << std::endl;
return 0;
}
练习本题 ›
算法与数据结构单选难度 3真题改编 · 2024
2469. 已知一个有序表(2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22),当二分查找值为15的元素时,查找失败的比较次数为( )
练习本题 ›