第29738题 单选题
给定C++中int类型数组arr = {3, 1, 4, 2, 5}(下标从0开始),若构造前缀和数组pre求解区间[1,3](闭区间,包含两端下标元素)的和,以下结果正确的是?

提示:前缀和数组pre采用常用定义规则:pre[0] = 0,pre[i]表示数组arr前i个元素(即arr[0]到arr[i-1])的累加和。

{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析