第32004题 单选题
以下C++代码对二维向量的操作,运行后输出的结果是?
#include <iostream>
#include <vector>
using namespace std;
int main() {
    vector<vector<int>> arr(3, vector<int>(2, 1));
    arr[1].push_back(3);
    arr.push_back({4,5});
    cout << arr[2][1] + arr[3][0] << endl;
    return 0;
}
A

7

B

6

C

5

D

编译报错

程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析