-
个人简介
#include <bits/stdc++.h> using namespace std; int a[1005], b[1005]; int main() { int n, m, k; cin >> n >> m; for(int i = 1; i <= n; i++) { cin >> a[i]; b[i] = b[i-1]+a[i];//b[i]表示原数组的前i项之和 } //询问m次,每次求该数组的前k项之和 while(m--) { cin >> k; cout << b[k] << endl; } return 0; }
题目 状态 最后递交于 题目 没有递交 - P968 前缀和 没有递交 - P346 初次爬楼梯 没有递交 - P343 查找路径 没有递交 - P591 查找路径2 没有递交 - P800 吃糖果 没有递交 - P804 上台阶 没有递交 - P348 放米 成绩表 我的最近递交记录 帮助 状态正在进行…题目7开始时间2025-5-1 0:00截止时间2026-5-9 23:59可延期24 小时 状态 评测队列 服务状态 开发 开源 API 支持 帮助 QQ 群 关于联系我们隐私服务条款版权申诉 Language 兼容模式 主题 Worker 0, 32msPowered by Hydro v4.14.1 Community
-
通过的题目
-
最近活动
This person is lazy and didn't join any contests or homework.
题目标签
- 数论
- 1
- 略有小成
- 1