编程语言单选难度 3真题改编 · 2023
3361. 以下 C++ 程序的输出结果的是()
#include <iostream>
#include <map>
#include <memory>
int main(int argc, const char * argv[]) {
std::map<int, std::shared_ptr<int>> map;
std::shared_ptr<int> value1 = std::make_shared<int>(1);
map[1] = value1;
std::shared_ptr<int> value2 = std::make_shared<int>(2);
value1.swap(value2);
printf("%d\n", *value1);
printf("%d\n", *value2);
auto value3 = map[1];
printf("%d\n", *value3);
return 0;
}
练习本题 ›
算法与数据结构单选难度 3真题改编 · 2024
3370. 对关键字序列{47,61,34(1),76,54,13,34(2),97},目标是排列成由小到大的关键字集合,则使用快速排序,枢纽为48,则快速排序一趟后的序列为( ),其中34(1)代表第一个34,34(2)代表第二个34
练习本题 ›